Workflow startTrigger.data has the wrong input

I have a very simple workflow that takes two params: case_id and status.
In the code panel, it shows the evaluated value for status is "Declined"


but the workflow run history shows the input data is the value before the change

Is this a bug on workflow or is there something I did wrong?

It looks like the workflow is just using the sample data defined in startTrigger and ignoring the data passed in the parameters


Hello @patrick-shoreline!

For the first issue with the changes of the select component not being reflected in the workflow, the issue might be that the workflow is being triggered before the frontend state is able to save the change(in your example from 'Needs follow-up' to 'Declines').

To get around this, I would recommend adding a debounce to the have the button click wait for a half second (500ms) and see if that is able to fix the discrepency.

For the second issue, you are correct the workflow seems to be trying to use the data that was hard coded into the trigger.

May I ask how you are triggering the workflow to run? Can you share the option you selected in the app for the button click that is meant to trigger the workflow?

This can help us figure out where the data is being lost in the transfer to the workflow. My guess is that you might need to remove the dummy data in the Test JSON Parameters :thinking: and either have the trigger update to the data from the app/query or skip/change the trigger(Potentially switch the trigger to an API endpoint).

Which version of Retool are you using/are you self hosted or on retool cloud? I just tried to replicate this data flow and it looks like we have made some updates to the workflow query in app :sweat_smile:

@Jack_T Im currently facing the same issue where the workflow takes as an input the example only. No matter what I pass to the workflow. What should I do?

Hello @nickfind,

I would guess that removing the example input block and using another method to trigger the workflow.

I would recommend following the docs for setting up an API endpoint and deleting the manual trigger block.

If your workflow is getting data from an app, there is an Action for triggering workflows that allows for specifying params to be passed in as well. I think the issues is that if the default auto block is there when the workflow is triggered that the code thinks that dummy example input is what it should be using.

Also we can try to live debug from our office hours as well!