create_workflow
Create a new workflow in your organization from a JSON node/edge graph. Call get_workflow_schema first to learn the format. Always run with preview: true first, resolve any validation_errors, then call again with preview: false to persist.
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | yes | Workflow name | |
description | string | no | "" | Short description |
task_description | string | no | "" | What the workflow does |
node_config | array | string | no | JSON array of node objects (or a JSON string). See get_workflow_schema for per-node-type data fields. | |
edge_config | array | string | no | JSON array of edge objects (or a JSON string) | |
node_credentials | object | no | {node_id: account_id} map for credentialed nodes — ids from list_authoring_resources | |
usecase | string | no | "default" | Workflow usecase key |
preview | boolean | no | false | If true, build + validate inside a rolled-back transaction and return validation results without persisting |
Returns#
On preview:
json
{ "preview": true, "valid": false, "validation_errors": ["node_2: unknown llm_model"], "name": "Enrich Contact", "node_count": 3, "edge_count": 2 }On apply:
json
{ "id": "agent_abc", "name": "Enrich Contact", "valid": true, "validation_errors": [], "url": "https://app.adlyse.com/workflows/agent_abc" }Errors#
error_type | When |
|---|---|
auth_error | Missing / invalid API key |
validation_error | Malformed node_config / edge_config JSON, missing name |
See also#
get_workflow_schema— the graph contractupdate_workflow— iterate on the resultrun_workflow— smoke-test withtarget="draft"