n8n-node-configuration by czlonkowski/n8n-skills
npx skills add https://github.com/czlonkowski/n8n-skills --skill n8n-node-configuration面向操作感知的节点配置专家指南,涵盖属性依赖关系。
渐进式披露:从最小配置开始,按需增加复杂性
配置最佳实践:
get_node 并设置 detail: "standard" 是最常用的发现模式关键洞察:大多数配置只需要标准详情,而非完整模式!
并非所有字段都始终必需 - 这取决于操作!
示例:Slack 节点
// 对于 operation='post'
{
"resource": "message",
"operation": "post",
"channel": "#general", // post 操作必需
"text": "Hello!" // post 操作必需
}
// 对于 operation='update'
{
"resource": "message",
"operation": "update",
"messageId": "123", // update 操作必需(不同!)
"text": "Updated!" // update 操作必需
// channel 对于 update 操作不是必需的
}
:资源 + 操作决定了哪些字段是必需的!
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
字段根据其他字段的值显示/隐藏
示例:HTTP 请求节点
// 当 method='GET' 时
{
"method": "GET",
"url": "https://api.example.com"
// sendBody 不显示(GET 没有请求体)
}
// 当 method='POST' 时
{
"method": "POST",
"url": "https://api.example.com",
"sendBody": true, // 现在可见!
"body": { // 当 sendBody=true 时必需
"contentType": "json",
"content": {...}
}
}
机制:displayOptions 控制字段可见性
使用正确的详情级别:
get_node({detail: "standard"}) - 默认
get_node({mode: "search_properties", propertyQuery: "..."})(用于查找特定字段)
get_node({detail: "full"})(完整模式)
1. 识别节点类型和操作
↓
2. 使用 get_node(标准详情是默认值)
↓
3. 配置必需字段
↓
4. 验证配置
↓
5. 如果字段不明确 → get_node({mode: "search_properties"})
↓
6. 根据需要添加可选字段
↓
7. 再次验证
↓
8. 部署
步骤 1:识别需求
// 目标:向 API 发送 POST JSON 请求
步骤 2:获取节点信息
const info = get_node({
nodeType: "nodes-base.httpRequest"
});
// 返回:method, url, sendBody, body, authentication 必需/可选信息
步骤 3:最小配置
{
"method": "POST",
"url": "https://api.example.com/create",
"authentication": "none"
}
步骤 4:验证
validate_node({
nodeType: "nodes-base.httpRequest",
config,
profile: "runtime"
});
// → 错误:"POST 需要 sendBody"
步骤 5:添加必需字段
{
"method": "POST",
"url": "https://api.example.com/create",
"authentication": "none",
"sendBody": true
}
步骤 6:再次验证
validate_node({...});
// → 错误:"当 sendBody=true 时需要 body"
步骤 7:完成配置
{
"method": "POST",
"url": "https://api.example.com/create",
"authentication": "none",
"sendBody": true,
"body": {
"contentType": "json",
"content": {
"name": "={{$json.name}}",
"email": "={{$json.email}}"
}
}
}
步骤 8:最终验证
validate_node({...});
// → 有效! ✅
✅ 开始配置
get_node({
nodeType: "nodes-base.slack"
});
// detail="standard" 是默认值
返回(约 1-2K tokens):
使用场景:95% 的配置需求
✅ 当标准详情不足时
get_node({
nodeType: "nodes-base.slack",
detail: "full"
});
返回(约 3-8K tokens):
警告:响应较大,仅在标准详情不足时使用
✅ 查找特定字段
get_node({
nodeType: "nodes-base.httpRequest",
mode: "search_properties",
propertyQuery: "auth"
});
使用场景:查找认证、请求头、请求体字段等
┌─────────────────────────────────┐
│ 开始新的节点配置? │
├─────────────────────────────────┤
│ 是 → get_node(标准详情) │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ 标准详情包含所需内容? │
├─────────────────────────────────┤
│ 是 → 使用它进行配置 │
│ 否 → 继续 │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ 查找特定字段? │
├─────────────────────────────────┤
│ 是 → search_properties 模式 │
│ 否 → 继续 │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ 仍需要更多详情? │
├─────────────────────────────────┤
│ 是 → get_node({detail: "full"}) │
└─────────────────────────────────┘
字段具有可见性规则:
{
"name": "body",
"displayOptions": {
"show": {
"sendBody": [true],
"method": ["POST", "PUT", "PATCH"]
}
}
}
解释:"body" 字段在以下情况显示:
示例:HTTP 请求 sendBody
// sendBody 控制 body 的可见性
{
"sendBody": true // → body 字段出现
}
示例:Slack 资源/操作
// 不同的操作 → 不同的字段
{
"resource": "message",
"operation": "post"
// → 显示:channel, text, attachments 等
}
{
"resource": "message",
"operation": "update"
// → 显示:messageId, text(不同的字段!)
}
示例:IF 节点条件
{
"type": "string",
"operation": "contains"
// → 显示:value1, value2
}
{
"type": "boolean",
"operation": "equals"
// → 显示:value1, value2, 不同的操作符
}
使用 get_node 的 search_properties 模式:
get_node({
nodeType: "nodes-base.httpRequest",
mode: "search_properties",
propertyQuery: "body"
});
// 返回匹配 "body" 的属性路径及其描述
或者使用完整详情获取完整模式:
get_node({
nodeType: "nodes-base.httpRequest",
detail: "full"
});
// 返回包含 displayOptions 规则的完整模式
使用时机:验证失败且不理解字段缺失/必需的原因时
示例:Slack、Google Sheets、Airtable
结构:
{
"resource": "<entity>", // 操作对象类型
"operation": "<action>", // 对其执行的操作
// ... 操作特定字段
}
如何配置:
示例:HTTP 请求、Webhook
结构:
{
"method": "<HTTP_METHOD>",
"url": "<endpoint>",
"authentication": "<type>",
// ... 方法特定字段
}
依赖关系:
示例:Postgres、MySQL、MongoDB
结构:
{
"operation": "<query|insert|update|delete>",
// ... 操作特定字段
}
依赖关系:
示例:IF、Switch、Merge
结构:
{
"conditions": {
"<type>": [
{
"operation": "<operator>",
"value1": "...",
"value2": "..." // 仅用于二元操作符
}
]
}
}
依赖关系:
{
"resource": "message",
"operation": "post",
"channel": "#general", // 必需
"text": "Hello!", // 必需
"attachments": [], // 可选
"blocks": [] // 可选
}
{
"resource": "message",
"operation": "update",
"messageId": "1234567890", // 必需(与 post 不同!)
"text": "Updated!", // 必需
"channel": "#general" // 可选(可以推断)
}
{
"resource": "channel",
"operation": "create",
"name": "new-channel", // 必需
"isPrivate": false // 可选
// 注意:此操作不需要 text
}
{
"method": "GET",
"url": "https://api.example.com/users",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpHeaderAuth",
"sendQuery": true, // 可选
"queryParameters": { // 当 sendQuery=true 时显示
"parameters": [
{
"name": "limit",
"value": "100"
}
]
}
}
{
"method": "POST",
"url": "https://api.example.com/users",
"authentication": "none",
"sendBody": true, // POST 必需
"body": { // 当 sendBody=true 时必需
"contentType": "json",
"content": {
"name": "John Doe",
"email": "john@example.com"
}
}
}
{
"conditions": {
"string": [
{
"value1": "={{$json.status}}",
"operation": "equals",
"value2": "active" // 二元:需要 value2
}
]
}
}
{
"conditions": {
"string": [
{
"value1": "={{$json.email}}",
"operation": "isEmpty",
// 没有 value2 - 一元操作符
"singleValue": true // 由清理功能自动添加
}
]
}
}
场景:body 字段必需,但仅在某些情况下
规则:
body 在以下情况必需:
- sendBody = true 并且
- method 属于 (POST, PUT, PATCH, DELETE)
如何发现:
// 选项 1:读取验证错误
validate_node({...});
// 错误:"当 sendBody=true 时需要 body"
// 选项 2:搜索属性
get_node({
nodeType: "nodes-base.httpRequest",
mode: "search_properties",
propertyQuery: "body"
});
// 显示:body 属性及其 displayOptions 规则
// 选项 3:尝试最小配置并迭代
// 开始时没有 body,验证会告知是否需要
场景:singleValue 属性出现在一元操作符中
规则:
singleValue 在以下情况应为 true:
- operation 属于 (isEmpty, isNotEmpty, true, false)
好消息:自动清理功能会修复此问题!
手动检查:
get_node({
nodeType: "nodes-base.if",
detail: "full"
});
// 显示包含操作符特定规则的完整模式
错误做法:
// 添加所有可能的字段
{
"method": "GET",
"url": "...",
"sendQuery": false,
"sendHeaders": false,
"sendBody": false,
"timeout": 10000,
"ignoreResponseCode": false,
// ... 还有 20 多个可选字段
}
正确做法:
// 从最小配置开始
{
"method": "GET",
"url": "...",
"authentication": "none"
}
// 仅在需要时添加字段
错误做法:
// 配置并部署而不验证
const config = {...};
n8n_update_partial_workflow({...}); // 冒险操作
正确做法:
// 部署前验证
const config = {...};
const result = validate_node({...});
if (result.valid) {
n8n_update_partial_workflow({...});
}
错误做法:
// 所有 Slack 操作使用相同配置
{
"resource": "message",
"operation": "post",
"channel": "#general",
"text": "..."
}
// 然后切换操作而不更新配置
{
"resource": "message",
"operation": "update", // 已更改
"channel": "#general", // update 的错误字段!
"text": "..."
}
正确做法:
// 更改操作时检查要求
get_node({
nodeType: "nodes-base.slack"
});
// 查看 update 操作需要什么(messageId,而不是 channel)
从 get_node(标准详情)开始
迭代验证
遇到困难时使用 search_properties 模式
get_node({mode: "search_properties", propertyQuery: "..."})尊重操作上下文
信任自动清理功能
立即跳转到 detail="full"
盲目配置
不理解就复制配置
手动修复自动清理问题
关于特定主题的全面指南:
配置策略:
get_node 开始(标准详情是默认值)关键原则:
相关技能:
每周安装量
1.2K
仓库
GitHub 星标数
3.3K
首次出现
2026年1月20日
安全审计
安装于
opencode1.0K
gemini-cli986
codex956
github-copilot865
cursor789
claude-code785
Expert guidance for operation-aware node configuration with property dependencies.
Progressive disclosure : Start minimal, add complexity as needed
Configuration best practices:
get_node with detail: "standard" is the most used discovery patternKey insight : Most configurations need only standard detail, not full schema!
Not all fields are always required - it depends on operation!
Example : Slack node
// For operation='post'
{
"resource": "message",
"operation": "post",
"channel": "#general", // Required for post
"text": "Hello!" // Required for post
}
// For operation='update'
{
"resource": "message",
"operation": "update",
"messageId": "123", // Required for update (different!)
"text": "Updated!" // Required for update
// channel NOT required for update
}
Key : Resource + operation determine which fields are required!
Fields appear/disappear based on other field values
Example : HTTP Request node
// When method='GET'
{
"method": "GET",
"url": "https://api.example.com"
// sendBody not shown (GET doesn't have body)
}
// When method='POST'
{
"method": "POST",
"url": "https://api.example.com",
"sendBody": true, // Now visible!
"body": { // Required when sendBody=true
"contentType": "json",
"content": {...}
}
}
Mechanism : displayOptions control field visibility
Use the right detail level :
get_node({detail: "standard"}) - DEFAULT
get_node({mode: "search_properties", propertyQuery: "..."}) (for finding specific fields)
get_node({detail: "full"}) (complete schema)
1. Identify node type and operation
↓
2. Use get_node (standard detail is default)
↓
3. Configure required fields
↓
4. Validate configuration
↓
5. If field unclear → get_node({mode: "search_properties"})
↓
6. Add optional fields as needed
↓
7. Validate again
↓
8. Deploy
Step 1 : Identify what you need
// Goal: POST JSON to API
Step 2 : Get node info
const info = get_node({
nodeType: "nodes-base.httpRequest"
});
// Returns: method, url, sendBody, body, authentication required/optional
Step 3 : Minimal config
{
"method": "POST",
"url": "https://api.example.com/create",
"authentication": "none"
}
Step 4 : Validate
validate_node({
nodeType: "nodes-base.httpRequest",
config,
profile: "runtime"
});
// → Error: "sendBody required for POST"
Step 5 : Add required field
{
"method": "POST",
"url": "https://api.example.com/create",
"authentication": "none",
"sendBody": true
}
Step 6 : Validate again
validate_node({...});
// → Error: "body required when sendBody=true"
Step 7 : Complete configuration
{
"method": "POST",
"url": "https://api.example.com/create",
"authentication": "none",
"sendBody": true,
"body": {
"contentType": "json",
"content": {
"name": "={{$json.name}}",
"email": "={{$json.email}}"
}
}
}
Step 8 : Final validation
validate_node({...});
// → Valid! ✅
✅ Starting configuration
get_node({
nodeType: "nodes-base.slack"
});
// detail="standard" is the default
Returns (~1-2K tokens):
Use : 95% of configuration needs
✅ When standard isn't enough
get_node({
nodeType: "nodes-base.slack",
detail: "full"
});
Returns (~3-8K tokens):
Warning : Large response, use only when standard insufficient
✅ Looking for specific field
get_node({
nodeType: "nodes-base.httpRequest",
mode: "search_properties",
propertyQuery: "auth"
});
Use : Find authentication, headers, body fields, etc.
┌─────────────────────────────────┐
│ Starting new node config? │
├─────────────────────────────────┤
│ YES → get_node (standard) │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ Standard has what you need? │
├─────────────────────────────────┤
│ YES → Configure with it │
│ NO → Continue │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ Looking for specific field? │
├─────────────────────────────────┤
│ YES → search_properties mode │
│ NO → Continue │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ Still need more details? │
├─────────────────────────────────┤
│ YES → get_node({detail: "full"})│
└─────────────────────────────────┘
Fields have visibility rules :
{
"name": "body",
"displayOptions": {
"show": {
"sendBody": [true],
"method": ["POST", "PUT", "PATCH"]
}
}
}
Translation : "body" field shows when:
Example : HTTP Request sendBody
// sendBody controls body visibility
{
"sendBody": true // → body field appears
}
Example : Slack resource/operation
// Different operations → different fields
{
"resource": "message",
"operation": "post"
// → Shows: channel, text, attachments, etc.
}
{
"resource": "message",
"operation": "update"
// → Shows: messageId, text (different fields!)
}
Example : IF node conditions
{
"type": "string",
"operation": "contains"
// → Shows: value1, value2
}
{
"type": "boolean",
"operation": "equals"
// → Shows: value1, value2, different operators
}
Use get_node with search_properties mode :
get_node({
nodeType: "nodes-base.httpRequest",
mode: "search_properties",
propertyQuery: "body"
});
// Returns property paths matching "body" with descriptions
Or use full detail for complete schema :
get_node({
nodeType: "nodes-base.httpRequest",
detail: "full"
});
// Returns complete schema with displayOptions rules
Use this when : Validation fails and you don't understand why field is missing/required
Examples : Slack, Google Sheets, Airtable
Structure :
{
"resource": "<entity>", // What type of thing
"operation": "<action>", // What to do with it
// ... operation-specific fields
}
How to configure :
Examples : HTTP Request, Webhook
Structure :
{
"method": "<HTTP_METHOD>",
"url": "<endpoint>",
"authentication": "<type>",
// ... method-specific fields
}
Dependencies :
Examples : Postgres, MySQL, MongoDB
Structure :
{
"operation": "<query|insert|update|delete>",
// ... operation-specific fields
}
Dependencies :
Examples : IF, Switch, Merge
Structure :
{
"conditions": {
"<type>": [
{
"operation": "<operator>",
"value1": "...",
"value2": "..." // Only for binary operators
}
]
}
}
Dependencies :
{
"resource": "message",
"operation": "post",
"channel": "#general", // Required
"text": "Hello!", // Required
"attachments": [], // Optional
"blocks": [] // Optional
}
{
"resource": "message",
"operation": "update",
"messageId": "1234567890", // Required (different from post!)
"text": "Updated!", // Required
"channel": "#general" // Optional (can be inferred)
}
{
"resource": "channel",
"operation": "create",
"name": "new-channel", // Required
"isPrivate": false // Optional
// Note: text NOT required for this operation
}
{
"method": "GET",
"url": "https://api.example.com/users",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpHeaderAuth",
"sendQuery": true, // Optional
"queryParameters": { // Shows when sendQuery=true
"parameters": [
{
"name": "limit",
"value": "100"
}
]
}
}
{
"method": "POST",
"url": "https://api.example.com/users",
"authentication": "none",
"sendBody": true, // Required for POST
"body": { // Required when sendBody=true
"contentType": "json",
"content": {
"name": "John Doe",
"email": "john@example.com"
}
}
}
{
"conditions": {
"string": [
{
"value1": "={{$json.status}}",
"operation": "equals",
"value2": "active" // Binary: needs value2
}
]
}
}
{
"conditions": {
"string": [
{
"value1": "={{$json.email}}",
"operation": "isEmpty",
// No value2 - unary operator
"singleValue": true // Auto-added by sanitization
}
]
}
}
Scenario : body field required, but only sometimes
Rule :
body is required when:
- sendBody = true AND
- method IN (POST, PUT, PATCH, DELETE)
How to discover :
// Option 1: Read validation error
validate_node({...});
// Error: "body required when sendBody=true"
// Option 2: Search for the property
get_node({
nodeType: "nodes-base.httpRequest",
mode: "search_properties",
propertyQuery: "body"
});
// Shows: body property with displayOptions rules
// Option 3: Try minimal config and iterate
// Start without body, validation will tell you if needed
Scenario : singleValue property appears for unary operators
Rule :
singleValue should be true when:
- operation IN (isEmpty, isNotEmpty, true, false)
Good news : Auto-sanitization fixes this!
Manual check :
get_node({
nodeType: "nodes-base.if",
detail: "full"
});
// Shows complete schema with operator-specific rules
Bad :
// Adding every possible field
{
"method": "GET",
"url": "...",
"sendQuery": false,
"sendHeaders": false,
"sendBody": false,
"timeout": 10000,
"ignoreResponseCode": false,
// ... 20 more optional fields
}
Good :
// Start minimal
{
"method": "GET",
"url": "...",
"authentication": "none"
}
// Add fields only when needed
Bad :
// Configure and deploy without validating
const config = {...};
n8n_update_partial_workflow({...}); // YOLO
Good :
// Validate before deploying
const config = {...};
const result = validate_node({...});
if (result.valid) {
n8n_update_partial_workflow({...});
}
Bad :
// Same config for all Slack operations
{
"resource": "message",
"operation": "post",
"channel": "#general",
"text": "..."
}
// Then switching operation without updating config
{
"resource": "message",
"operation": "update", // Changed
"channel": "#general", // Wrong field for update!
"text": "..."
}
Good :
// Check requirements when changing operation
get_node({
nodeType: "nodes-base.slack"
});
// See what update operation needs (messageId, not channel)
Start with get_node (standard detail)
Validate iteratively
Use search_properties mode when stuck
get_node({mode: "search_properties", propertyQuery: "..."})Respect operation context
Trust auto-sanitization
Jump to detail="full" immediately
Configure blindly
Copy configs without understanding
Manually fix auto-sanitization issues
For comprehensive guides on specific topics:
Configuration Strategy :
get_node (standard detail is default)Key Principles :
Related Skills :
Weekly Installs
1.2K
Repository
GitHub Stars
3.3K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode1.0K
gemini-cli986
codex956
github-copilot865
cursor789
claude-code785
97,600 周安装