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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workflow_name": "<workflow_name>",
"node_type": "<node_type>"
},
"name": "add_node"
}
}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. |