Trace Workflows with Express.js and LocalTunnel

So I sometimes run into the issue where my workflow is not behaving how I expect it to. I once made a table and was logging to the DB to try and peer into the issue of some of my loops.

I wanted something that was real-time, a way to watch what was happening since I am usually pretty good at spotting anomalies.

I figured that if the workflow can make requests, why not have it make requests to me?

Here is a super simple server, that you can run with one command, to create a logging endpoint.

I created a Function in my workflow that sends requests the the tunnel endpoint

Inserted calls to my function it in my troubled workflow block and then view the streaming data from the server during execution :slight_smile:

2 Likes

You can set up a simple logging server using the provided code and run it locally or remotely. Make your endpoint publicly accessible with a tool like localtunnel. In your Retool workflow, create a function that sends POST requests with debug data to this server. Insert calls to this logging function at important steps in your workflow to stream real-time info as the workflow runs. Monitor the server output to instantly spot issues and understand your workflow’s behavior.

1 Like