Execute Workflow
execute_workflow · Tools · Workflows
Execute a workflow. Pass node_ids: [] for summary/status only. Specify nodes to retrieve specific detailed output.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | object | No | Optional input data for the workflow. Its shape is the workflow's own, so anything is allowed here. |
node_ids | string[] | Yes | Required. Pass [] for summary/status only. Specify nodes to retrieve specific detailed output. Do not pass every node unless the user explicitly asks for full execution details. |
start_node | string | Yes | The graph-local node ID to execute from |
workflow_id | string | Yes | The workflow slug or id ULID to execute |
Execute Workflow Tool#
Executes a workflow run by workflow ID.
Target workflows intended for agent/tool/MCP use should set their caller-visible result with set_workflow_output. That value is returned as output when the run completes successfully. set_workflow_output is not a terminator or success marker; later or parallel failures still fail the workflow. Leave base_config.failure_mode at the default "stop" for required goal/effect nodes, including AI calls and uploads: the failed node's dependent branch does not run, independent branches continue, the failure appears in the results, and the workflow is marked failed. Reserve "stop_workflow" for rare emergencies where a failure must immediately terminate the entire workflow, including independent branches. Use "route_to_error" when the graph handles the failure itself: the node's other outputs carry a skip, its trailing error output carries { node_id, node_type, message, causes }, and the run reports completed_with_warnings.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_id |
string | Yes | Workflow slug or ULID |
start_node |
string | Yes | Graph-local node ID to start execution from |
node_ids |
array[string] | Yes | Graph-local node IDs whose outputs and results should be returned (must contain at least 1 node ID) |
input |
object | No | Input payload passed to the start node |
Returns#
Completed#
{
"success": true,
"status": "completed",
"job_id": "01...",
"workflow_id": "01...",
"workflow_name": "Workflow Name",
"workflow_slug": "workflow-slug",
"output": { "...": "..." },
"nodes": [
{
"node_id": "node-a",
"results": [
{
"success": true,
"final_status": "completed",
"input": { "input": { "x": 1 } },
"output": { "value": "A1" }
}
]
}
],
"executed": [
{ "node_id": "node-a", "success": true }
]
}
Failed or timed out#
{
"success": false,
"status": "failed | timeout",
"job_id": "01...",
"workflow_id": "workflow-slug",
"workflow_name": "Workflow Name",
"workflow_output": null,
"error": "..."
}
Notes#
node_idsmust be present and non-empty.- The workflow's persisted timeout controls both execution and this tool's wait. It must be between 1 second and 24 hours.
workflow_idaccepts a workflow slug or ULID.job_idis a ULID and is the run's id: a run has no id of its own. Use it when fetching persisted results.- Workflow graph node IDs are local strings, not persisted entity IDs.
- Response includes only requested node results, not full
node_results. - Each result's
final_statussays how that node visit ended:completed,failed,failed_stop_workflow,failed_routed,skipped,timed_outorcancelled.failed_routedis a node inroute_to_errorthat failed and sent its error to itserroroutput: it hassuccess: true, itserrorholds the failure, and itsoutputholds the skips on its other outputs and the error value onerror. Older runs can also showfailed_ignore: the node failed and passed a default value on. - For callable workflows, request the
set_workflow_outputnode and treatoutputas the caller-visible result. - Use
get_workflow_execution_resultswith thatjob_idas itsexecution_idand explicitnode_idsto inspect older runs or additional nodes.