add_node
Add a new node to an existing n8n workflow, defining its type, position, parameters, and name. Specify workflow details and optional webhook ID or path for precise integration.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
node_name | No | The name for the new node (e.g., 'My Gmail Node') | |
node_type | Yes | The type of node to add (e.g., 'gmail', 'slack', 'openAi'). You can specify with or without the 'n8n-nodes-base.' prefix. The system will handle proper casing (e.g., 'openai' will be converted to 'openAi' if that's the correct casing). | |
parameters | No | The parameters for the node | |
position | No | The position of the node {x,y} - will be converted to [x,y] for N8nWorkflowNode | |
typeVersion | No | The type version for the node (e.g., 1, 1.1). Defaults to 1 if not specified. | |
webhookId | No | Optional webhook ID for certain node types like triggers. | |
workflow_name | Yes | The Name of the workflow to add the node to | |
workflow_path | No | Optional direct path to the workflow file (absolute or relative to current working directory). If not provided, uses standard workflow_data directory approach. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"node_name": {
"description": "The name for the new node (e.g., 'My Gmail Node')",
"type": "string"
},
"node_type": {
"description": "The type of node to add (e.g., 'gmail', 'slack', 'openAi'). You can specify with or without the 'n8n-nodes-base.' prefix. The system will handle proper casing (e.g., 'openai' will be converted to 'openAi' if that's the correct casing).",
"type": "string"
},
"parameters": {
"additionalProperties": {},
"description": "The parameters for the node",
"type": "object"
},
"position": {
"additionalProperties": false,
"description": "The position of the node {x,y} - will be converted to [x,y] for N8nWorkflowNode",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"required": [
"x",
"y"
],
"type": "object"
},
"typeVersion": {
"description": "The type version for the node (e.g., 1, 1.1). Defaults to 1 if not specified.",
"type": "number"
},
"webhookId": {
"description": "Optional webhook ID for certain node types like triggers.",
"type": "string"
},
"workflow_name": {
"description": "The Name of the workflow to add the node to",
"type": "string"
},
"workflow_path": {
"description": "Optional direct path to the workflow file (absolute or relative to current working directory). If not provided, uses standard workflow_data directory approach.",
"type": "string"
}
},
"required": [
"workflow_name",
"node_type"
],
"type": "object"
}