add_connection
Create a connection between nodes in an n8n workflow by specifying source and target node IDs, their respective handles, and the workflow name.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
source_node_id | Yes | The ID of the source node for the connection | |
source_node_output_name | Yes | The name of the output handle on the source node (e.g., 'main') | |
target_node_id | Yes | The ID of the target node for the connection | |
target_node_input_index | No | The index for the target node's input handle (default: 0) | |
target_node_input_name | Yes | The name of the input handle on the target node (e.g., 'main') | |
workflow_name | Yes | The Name of the workflow to add the connection to |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"source_node_id": {
"description": "The ID of the source node for the connection",
"type": "string"
},
"source_node_output_name": {
"description": "The name of the output handle on the source node (e.g., 'main')",
"type": "string"
},
"target_node_id": {
"description": "The ID of the target node for the connection",
"type": "string"
},
"target_node_input_index": {
"default": 0,
"description": "The index for the target node's input handle (default: 0)",
"type": "number"
},
"target_node_input_name": {
"description": "The name of the input handle on the target node (e.g., 'main')",
"type": "string"
},
"workflow_name": {
"description": "The Name of the workflow to add the connection to",
"type": "string"
}
},
"required": [
"workflow_name",
"source_node_id",
"source_node_output_name",
"target_node_id",
"target_node_input_name"
],
"type": "object"
}