Add Workflow Node
add_workflow_node · Tools · Workflows
Add one node to a workflow graph. Nodes are automatically positioned visually in the graph by Verdalia. Returns the id the node got; use it to connect the node.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
config | object | Yes | Node configuration as normal nested JSON. Do not stringify this value. Must be a JSON object. Nodes are automatically positioned visually in the graph by Verdalia. May include base_config: { failure_mode: 'stop' | 'stop_workflow' | 'route_to_error' }. failure_mode 'stop' (default) is the normal choice almost always, including required AI calls, uploads, and other effects: the node fails, nodes depending on it do not run, independent branches continue, the failure shows in the workflow results, and the workflow is marked failed when a failed branch cannot reach its end. 'stop_workflow' is a rare emergency setting: the failure immediately terminates the entire workflow, including independent branches; reserve it for exceptional major failures where continued execution must stop at once, not for ordinary required or critical-path failures. 'route_to_error' adds one trailing output named 'error' and hands the failure to the graph: on success the node's outputs carry its values and 'error' carries a skip; on failure its normal outputs carry a skip, so nodes fed only by them are skipped, and 'error' carries { node_id, node_type, message, causes }. The node is recorded as failed_routed and the run completes with warnings instead of failing. For a fallback value, wire 'error' into a js_script step that returns the constant, and wire that step's output into the same input socket the node's own output feeds. To fail the run after handling the error, for example after logging it, wire 'error' into a raise_error node. 'ignore' was removed: use 'route_to_error' with that fallback step. For code, prompts, markdown, and JSON-like text fields, prefer readable multiline content. For js_script.script, write formatted JavaScript, not minified one-line code. |
disabled | boolean | No | When true, the node still builds and validates but no-ops at runtime by emitting null outputs. |
id | string | No | The node's id in this workflow: lowercase kebab-case (lowercase letters, digits and single hyphens, e.g. 'fetch-emails'), unique in the workflow. Omit it to have one derived from the label, or from the node type when the label has no letter or digit, with a numeric suffix where needed (e.g. 'fetch-emails-2'). |
label | string | No | Optional display label |
node_type | string | Yes | Node type tag |
workflow_id | string | Yes | Workflow slug or id ULID |