How to get the response data back to retool app

Hi folks, I'm new to Retool. I've created a workflow that returns data from the response block at the end of a process. Now in the retool app using resource as "Retool workflow" then I selected the workflow that I created and ran it but it is showing no output. May be I'm doing the process wrong. Can someone guide me what is missing in here please? Thanks

Hello @Md_Ridwanur_Rahman Welcome to the Retool Community,

  • Check the Response Block in the Workflow

  • Try running the workflow directly (inside the workflow editor) to check if it outputs data.

1 Like

@WidleStudioLLP Thank you.

The response block does output the data after running the block. Workflow block seems to be okay.

If the response block in the workflow outputs data correctly, but the app isn't displaying it, the issue might be with how the query is handling the response.

Inspect query state:

  • Look at the query's state in the right-hand panel. Pay close attention to the "Data" and "Error" sections.
1 Like

Your picture in the original post has no body - does your workflow not need any input parameters? The sample you put in the start trigger for the workflow isn’t used when you trigger from an app as far as I am aware…

@jg80 Thank you.

Well, I just want the data back to my app, in this case, no inputs were necessary.
"createTable" block was connected with "response1" block then I ran everything and at the end "response1" showed the data (screenshot right now is in a not running state, that's why data can't be seen). Then I tried to run the workflow as shown in the first screenshot but didn't get any output. As I was told to use workflow for this task so I just created a table and inserted all those required data into a new table and then used that table data in my app.

For what it's worth, I think your response block should have a body like

{
  records: loadMissingEncounters.data
}

Then in the app you would be able to reference getMissedEncounters.data.records to get the records.