n8n Node Configuration
Expert guidance for operation-aware node configuration.
Based on n8n-skills by Romuald Członkowski
Configuration Philosophy
Progressive disclosure: n8n shows only relevant fields based on your selections.
1. Select resource (what to work with)
2. Select operation (what to do)
3. Required fields appear based on operation
4. Optional fields available for customization
Core Concepts
Operation-Aware Configuration
Different operations require different fields:
// Slack: "Send Message" operation
{
"resource": "message",
"operation": "post",
"channel": "#general", // Required for post
"text": "Hello!" // Required for post
}
// Slack: "Update Message" operation
{
"resource": "message",
"operation": "update",
"channel": "#general", // Required
"ts": "1234567890.123456", // Required for update (timestamp)
"text": "Updated text"
}
Property Dependencies
Fields appear/disappear based on other values:
// HTTP Request node dependencies
sendBody: true
→ reveals: contentType
contentType: "json"
→ reveals: specifyBody
specifyBody: "json"
→ reveals: jsonBody
Common Node Patterns
HTTP Request Node
{
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.example.com/data",
"authentication": "predefinedCredentialType",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{ "name": "Authorization", "value": "Bearer {{ $json.token }}" }
]
},
"sendBody": true,
"contentType": "json",
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify($json.data) }}"
}
}
Webhook Node
{
"type": "n8n-nodes-base.webhook",
"parameters": {
"path": "my-webhook",
"httpMethod": "POST",
"responseMode": "responseNode",
"options": {
"rawBody": true
}
}
}
Slack Node
{
"type": "n8n-nodes-base.slack",
"parameters": {
"resource": "message",
"operation": "post",
"channel": { "mode": "id", "value": "C1234567890" },
"text": "Hello from n8n!",
"otherOptions": {
"mrkdwn": true
}
}
}
PostgreSQL Node
{
"type": "n8n-nodes-base.postgres",
"parameters": {
"operation": "executeQuery",
"query": "SELECT * FROM users WHERE status = $1",
"options": {
"queryParams": "={{ $json.status }}"
}
}
}
IF Node
{
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"options": {
"combinator": "and"
},
"conditions": [
{
"leftValue": "={{ $json.status }}",
"rightValue": "active",
"operator": { "type": "string", "operation": "equals" }
}
]
}
}
}
Set Node
{
"type": "n8n-nodes-base.set",
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{ "name": "fullName", "value": "={{ $json.firstName }} {{ $json.lastName }}" },
{ "name": "createdAt", "value": "={{ $now.toISO() }}" }
]
}
}
}
Code Node (JavaScript)
{
"type": "n8n-nodes-base.code",
"parameters": {
"mode": "runOnceForAllItems",
"jsCode": "const items = $input.all();\nreturn items.map(item => ({\n json: {\n processed: true,\n data: item.json\n }\n}));"
}
}
Schedule Trigger
{
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {
"interval": [{ "field": "hours", "value": 1 }]
}
}
}
OpenAI Node
{
"type": "@n8n/n8n-nodes-langchain.openAi",
"parameters": {
"resource": "chat",
"operation": "complete",
"modelId": "gpt-4",
"messages": {
"values": [
{ "role": "user", "content": "={{ $json.prompt }}" }
]
},
"options": {
"temperature": 0.7,
"maxTokens": 1000
}
}
}
AI Workflow Configuration
AI Agent Setup
{
"type": "@n8n/n8n-nodes-langchain.agent",
"parameters": {
"agent": "conversationalAgent",
"options": {
"systemMessage": "You are a helpful assistant."
}
}
}
Connection Types
| Connection | Purpose |
|---|---|
ai_languageModel | Connect LLM (OpenAI, Anthropic) |
ai_tool | Connect tools (HTTP, Code) |
ai_memory | Connect memory (Buffer, Vector) |
ai_outputParser | Parse structured output |
Configuration Anti-Patterns
❌ Don't
// Hardcode secrets
{ "apiKey": "sk-1234..." }
// Skip authentication setup
{ "authentication": "none" } // when auth is needed
// Use unsafe queries
{ "query": "SELECT * FROM users WHERE id = '" + $json.id + "'" }
✅ Do
// Use credentials
{ "authentication": "predefinedCredentialType" }
// Parameterized queries
{ "query": "SELECT * FROM users WHERE id = $1" }
// Use expressions safely
{ "value": "={{ $json.data }}" }
Best Practices
- Start with required fields - Configure the essential parameters first
- Test incrementally - Validate after each major change
- Use credentials - Never hardcode API keys
- Name nodes clearly - "Fetch User Data" not "HTTP Request 1"
- Handle errors - Configure
onErrorbehavior - Document with sticky notes - Explain complex configurations
Quick Reference
| Need | Node | Key Parameters |
|---|---|---|
| HTTP call | HTTP Request | method, url, authentication, body |
| Receive HTTP | Webhook | path, httpMethod, responseMode |
| Send message | Slack | channel, text, resource, operation |
| Query DB | Postgres/MySQL | operation, query, options |
| Condition | IF | conditions with operators |
| Transform | Set | assignments (name/value pairs) |
| Custom logic | Code | mode, jsCode |
| Schedule | Schedule Trigger | rule (cron or interval) |
| AI chat | OpenAI | resource, operation, messages |
Based on n8n-skills by Romuald Członkowski • Adapted for Moltbot by fazer.ai
