Return custom webhook data in Retool Workflows
The Response block in Retool Workflows allows for synchronous webhook runs. Workflows can now return data as a webhook response at any time during a run or upon completion.
The Response block works in conjunction with the Webhook trigger and enables you to configure your own responses. You can specify the HTTP status code and a JSON response body to return, which can include any data from the workflow. For example, use a workflow to look up a customer's mailing address based on their email, use multiple blocks to return different types of data depending on execution logic, or even use a Response block as an error handler to signal that something went wrong.
Response blocks are represented as a new block type; just drag out a block, select Response in the context menu, and your webhook will now wait until the Response block is executed to return. Check out the docs to learn more.