Overview
Create a new workflow in your n8n instance. Workflows are created in an inactive state by default. You must activate them separately using the update-partial endpoint.Workflows require at least one trigger node to be executable. Common triggers include Webhook, Schedule, Manual Trigger, or integration-specific triggers.
Endpoint
Request Body
Human-readable workflow name. Must be unique within your instance.Example:
"Customer Onboarding Flow"Array of workflow nodes. Each node represents a step in your automation.
Workflow connections object. Keys are source node names (not IDs), values define output connections.Structure:
Workflow execution settings
Response
Operation success status
Created workflow information
Success message with workflow ID
Error Codes
Causes:
- Missing required fields (name, nodes, connections)
- Invalid node type format (use FULL form:
n8n-nodes-base.*) - Duplicate node names
- Invalid connection references
- Missing workflow metadata
validate_workflow tool before creatingCauses:
- n8n API not configured (missing N8N_API_URL or N8N_API_KEY)
- Network connectivity issues
- n8n instance unavailable
n8n_health_checkCause: Workflow name already existsResolution: Use a unique name or delete the existing workflow
Examples
Best Practices
Related Endpoints
- Get Workflow - Retrieve workflow details
- Update Workflow - Modify existing workflow
- Validate Workflow - Validate before creation
- List Workflows - Browse existing workflows