Accessing Parameters for Use in Workflows

Hello everyone!

I am looking for some assistance is accessing workflow parameters. I am able to set up the workflow parameters from the app edit screen

But I need some assistance when it comes to accessing them from the workflow screen

Any tips would be greatly appreciated!

1 Like

Hi @lenoradgray,

Welcome to Retool!

I think the way you have it configured in your code block is correct, but it looks like you've got a circular reference in your sample JSON since it's referencing itself.

Your call to the workflow looks like it should be working as well, but you can test it, and use it as sample data by doing the following:

  1. Open up the workflow run history from the bottom left of your screen.

  2. Click on one of the workflow runs that originated from your app, it usually has the highlighted workflow icon (3 circles) to the right of it.

  3. From there, click the startTrigger in the middle pane, the data tab, and then click "Use as example JSON".

That will populate the sample JSON in your startTrigger with actual data from your app. You can obviously manipulate this yourself to test things, but right now your sample data is referencing itself, which probably results in an error, so the data isn't available to call later in your workflow. The sample data is used whenever you run the workflow manually via the "run" button, or by "playing" each step manually.

1 Like

This is what the run history currently look like:

Hi @lenoradgray,

Definitely odd that there is no data coming from the calls made by your app. For starters, try changing your the workflow parameters in your get_all_time2 workflow call to something static that makes sense. For example, change the value for from_date to "2023" and to_date to "2024" and set client to something real, as a string. Then see if the values are getting passed to your workflow.

That should help debug if it's something to do with your app or the workflow itself.

You can also change the workflow parameters in your app to be JSON you spell out directly. Change the parameters from JSON to RAW and use something like

  from_date: '2023',
  to_data: '2024',
  client: 'Valid Client Name'

Press Run, and then check your workflow history to see if the values come through.

I got it all figured out! I even got the webhook return working well.

Thanks so much for your help!

1 Like