Click the “Publish” button in the top right corner
Your workflow is now ready to be called via the API
After publishing your workflow you’ll need to retrieve the workflow_id and the trigger_id you want to use.Here’s a quick example of how you can publish and retrieve these values:
When running a workflow through the API, it follows an asynchronous pattern:
First, you call the Run Workflow endpoint which immediately returns a workflow run id. The workflow execution happens asynchronously in the background.
Then, you use the Get Workflow Run endpoint using the id returned from the Run Workflow endpoint to check on the status and retrieve the results. A common pattern is to poll this endpoint every few seconds until the workflow run is complete.
Here’s a typical flow:
Call /v2/runs with your workflow configuration
Receive a workflow run id immediately
Poll /v2/runs/{workflow_run_id} periodically to check status and get results
Once the status indicates completion, retrieve your workflow output
This asynchronous approach allows you to handle long-running workflows efficiently without keeping connections open for extended periods.