How do I view the data going through a workflow, or the results of each step?

I'm used to Power Automate, where whenever I run a flow as a test you can clearly see the steps progressing, and each "input" and "output" of each step. Is that not possible in Workflows in Retool?

I see history very high level like this:

[Tue August 1st 2023 13:58:12.689 pm] Triggered from: retool-app

[Tue August 1st 2023 13:58:12.691 pm] --- Running query: startTrigger ---

[Tue August 1st 2023 13:58:12.691 pm] --- Successfully finished running query: startTrigger ---

[Tue August 1st 2023 13:58:12.691 pm] --- Running query: query7 ---

[Tue August 1st 2023 13:58:13.440 pm] --- Successfully finished running query: query7 ---

[Tue August 1st 2023 13:58:13.440 pm] --- Running query: branch2 ---

[Tue August 1st 2023 13:58:13.443 pm] --- Successfully finished running query: branch2 ---

[Tue August 1st 2023 13:58:13.443 pm] --- Skipped query: query6 ---

[Tue August 1st 2023 13:58:13.443 pm] --- Running query: query8 ---

[Tue August 1st 2023 13:58:20.322 pm] Error evaluating query8: invalid input syntax for type uuid: "$1"

[Tue August 1st 2023 13:58:20.322 pm] --- Failed running query: query8 ---

[Tue August 1st 2023 13:58:20.322 pm] --- Hit failure ---

But how do I view to see the data passed from the application in the startTrigger? Or if there's a step to run a query against SQL (like query8 above which I realize shows failed; assuming it succeeded, how do I view the output of it?)

I'm feeling really blind when trying to troubleshoot my Workflows in Retool since I can't see what data is being returned or updated on any step to see where issues are.

@Psycho_Bunny

You can add in code block steps to log to the console ( console.log(your stuff here) ) so that you can see what is going on.

You can set the default(or testing)data in startTrigger

and then you can run the next step by clicking
image
run button on the topright of second block, in the second block you can refer the value of startTrigger using something like startTrigger.data.objectType. in the third block you can refer to the second or startTrigger value in the same way - eg: introspect.data.*. If you fails in the third block, then you can run this block, and the error will be throwed out.

you also can add response after third block to return the error for your debug.

Hey folks! Just want to mention here that the Workflows team is working on improving logging so that it should include more information about the state of data in the workflow as it's run. Something to keep an eye out for in the coming weeks! :slightly_smiling_face:

Your feedback here is much appreciated both before and after the release!

2 Likes

Just want to make note here of the changes to the Workflows debugger, you should now have a much more comprehensive history of your Workflows runs with information specific to each block. This includes inputs to each block :tada:

1 Like

@Kabirdas I noticed this awesome new improvement! I also noticed that it seemed like one of my blocks (which has a console.log step) is not showing this output in the Logs tab. Is that intended?

This is awesome!

Hey @pyrrho! Curious to know if you're still seeing any of your blocks not logging properly. If so, do you happen to have a screenshot of the block in question?

Hello @Kabirdas -- yes it does still appear that I don't see console messages in the workflow history output. This was something I could see in the previous iteration of the Run History implementation.

Here's an example from a workflow run this week:

This is an older workflow and I haven't tested at all if recreating the console logging in a brand new workflow has the same result.

Got it, I don't seem to be able to reproduce the behavior in a new workflow:

Curious to know if you redeployed the workflow after the update or if recreating the code block helps.