How to train Cursor and Claude for n8n automation
This guide integrates official n8n terminology and concepts to train AI models to accurately understand, interpret, and generate n8n workflows.
Loading amazing prompts...
This guide integrates official n8n terminology and concepts to train AI models to accurately understand, interpret, and generate n8n workflows.
This guide integrates official n8n terminology and concepts to train AI models to accurately understand, interpret, and generate n8n workflows.
n8n is a workflow automation platform that allows users to build workflows by connecting nodes to automate processes. Official n8n definition states:
A workflow is a collection of nodes connected together to automate a process.
Nodes: The building blocks of a workflow. According to n8n documentation, nodes perform three key functions:
Connections: Links between nodes that route data through the workflow. The official definition states:
A connection establishes a link between nodes to route data through the workflow. A connection between two nodes passes data from one node's output to another node's input.
Sticky Notes: Documentation elements within workflows (not included in the JSON structure but present in the visual editor).
n8n workflows are stored as JSON objects with the following key sections:
{
"id": "uniqueWorkflowId",
"name": "Workflow Name",
"active": true,
"meta": {...},
"tags": [...],
"nodes": [...],
"connections": {...},
"settings": {...}
}
The official n8n documentation categorizes nodes by function:
Start the workflow execution. Examples:
n8n-nodes-base.manualTrigger
): Starts workflow when manually executedn8n-nodes-base.webhook
): Starts workflow when HTTP endpoint receives datan8n-nodes-base.scheduleTrigger
): Starts workflow at scheduled timesProcess data once the workflow has started:
n8n-nodes-base.httpRequest
): Makes API callsn8n-nodes-base.set
): Sets variables and valuesn8n-nodes-base.if
): Creates conditional branchesn8n-nodes-base.code
): Executes custom JavaScript coden8n-nodes-base.function
): Runs predefined functionsn8n-nodes-base.merge
): Combines data from multiple sourcesConnect to specific external services (Google Sheets, Slack, etc.).
According to the n8n docs, expressions allow node parameters to be set dynamically based on data from:
n8n's expression syntax uses the Tournament templating language with custom extensions, enclosed in double curly braces:
{{ expression }}
Accessing data from previous nodes:
{{ $json.propertyName }}
Accessing data from specific nodes:
{{ $('NodeName').item.json.propertyName }}
JavaScript operations:
{{ $json.number * 2 }}
Using libraries (Luxon for date handling):
{{ DateTime.fromISO('2023-01-01').plus({days: 7}).toISODate() }}
The official documentation explains that each node type has specific parameter requirements:
HTTP Request nodes need:
Code nodes contain:
IF nodes contain:
According to n8n docs, workflow execution follows this pattern:
Official n8n docs mention these important node settings:
n8n passes data between nodes as "items" - arrays of JSON objects:
[
{
"json": {
"property1": "value1",
"property2": "value2"
}
},
{
"json": {
"property1": "value3",
"property2": "value4"
}
}
]
n8n can be self-hosted and supports multiple database options:
Workflows are stored in the database as JSON data, including:
Train the AI to:
Train the AI to:
Train the AI to:
{{ }}
For optimal results when interacting with the AI: