How to pass data from front end app to workflow

New to workflows, can't find any useful info on exactly how to pass data from the front end app into a workflow based on a webhook.

I have a simple test app with a Retool workflow resource, this has a json parameter;
{"week8" : "test"} that 'should' get passed to the workflow which is called by a submit button.
in the workflow its a webhook trigger connected to a send email block. the block has ""
when i click the submit button the workflow gets activated and the email gets sent but the parameter "" = undefined and no error message or reason why!.


1 Like

Here's a simple "hello world" example to show triggering a workflow. It's a bit verbose.


app canvas
Drag text input, text, and button components to the canvas. Set the click event handler to call the query below. Set the text component value to be something like

Screenshot 2023-10-31 at 3.21.37 PM

app query

Screenshot 2023-10-31 at 3.19.00 PM

Type a name in the text input, click the button to update the text.


Yes i have this but still my parameter in the workflow = undefined

oh, I see your updated initial question.

Have you seen "Run History" bottom left? There's some debug info.
Screenshot 2023-10-31 at 3.31.31 PM

Does the workflow work if you provide "Test json parameters" and run the block(s) manually?
Screenshot 2023-10-31 at 3.32.38 PM

1 Like

oh, are you missing the {{ ... }} around your value within the email block?

Should be {{ }}. Some resources need this to reference as JS.

1 Like

i have that.
it is not receiving the json parameters from the app

1 Like

It works with the test json from the workflow when i click run. So it seems that the params from the app are not getting passed in,
I only get "undefined" when clicking submit form the front end app - very frustrating.
Nothing in the history other than it ran successfully.

In the Run History you should see what startTrigger's data is.

Screenshot 2023-10-31 at 3.41.57 PM

What do you see there?


Managed to get it working, by scrapping it and starting again from the beginning.
No idea why it wasn't working before - but thanks for your help!

1 Like

Sometimes I've got the same error and I guess the query has to be triggered to produce the result before we can use it.