create_workflow
Build and activate custom n8n workflows programmatically by defining nodes, connections, and settings. Supports automatic triggers for immediate workflow execution.
Instructions
Creates a new workflow in n8n with specified nodes and connections. Note that only workflows with automatic trigger nodes (schedule, webhook, etc.) can be activated - workflows with only manual triggers cannot be activated. Returns the created workflow with its assigned ID.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
activate | No | Whether to activate the workflow after creation (only works for workflows with automatic triggers) | |
workflow | Yes | Complete workflow structure including nodes, connections, and settings |
Input Schema (JSON Schema)
{
"properties": {
"activate": {
"description": "Whether to activate the workflow after creation (only works for workflows with automatic triggers)",
"type": "boolean"
},
"workflow": {
"description": "Complete workflow structure including nodes, connections, and settings",
"properties": {
"connections": {
"description": "Connections between nodes defining the workflow execution path",
"type": "object"
},
"name": {
"description": "Name of the workflow - use descriptive names for easier identification",
"type": "string"
},
"nodes": {
"description": "Array of workflow nodes (triggers, actions, etc.)",
"items": {
"type": "object"
},
"type": "array"
},
"settings": {
"description": "Workflow settings like error handling, execution timeout, etc.",
"type": "object"
}
},
"required": [
"name",
"nodes",
"connections"
],
"type": "object"
}
},
"required": [
"workflow"
],
"type": "object"
}