Activating Email from Operating Code

I have built a email form using the Work Flow environment that produces great emails from a data file that I will be building from my operating code.

I now would like to activate the email code in the Work Flow environment to run from an instruction in my operating code.

How would I do that?

Mike

Summary

A workflow was built in Retool Workflows that generates emails from a data file, and there's a need to activate/run that workflow on demand from an external application ('operating code').

AI Response

To invoke a workflow from external code, add a webhook trigger to the workflow, then send a POST request to the workflow's endpoint URL. Authenticate the request by passing the workflow's API key in the 'X-Workflow-Api-Key' header (a ready-to-use cURL example is provided in the trigger panel), and include any needed data as a JSON payload with 'Content-Type: application/json'. Values from the payload can be referenced inside the workflow via 'startTrigger.data', so the data driving the emails can be passed in at call time.

Sources

:bookmark: Trigger workflows with webhooks | Retool Docs
Official guide showing how to trigger a workflow from external code via its webhook endpoint, including the required X-Workflow-Api-Key header and a sample cURL request.
:bookmark: Using Retool Workflow Alias on external projects
Solved community topic covering how to call a workflow's endpoint/alias from an external project, mirroring the goal of invoking it from your own code.

The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a :heart:, :+1:, or :-1:. Or by marking this post as the "Solution"! Let us know if you have any feedback here. :rocket: