n8n-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseN8N Workflow Skill
N8N工作流技能
Overview
概述
This skill enables document workflow automation using n8n - the most popular workflow automation platform with 7800+ community templates. Chain document operations, integrate with 400+ apps, and build complex document pipelines.
本技能借助n8n实现文档工作流自动化——n8n是最受欢迎的工作流自动化平台,拥有7800+社区模板。你可以串联文档操作、集成400+应用,并构建复杂的文档处理流水线。
How to Use
使用方法
- Describe what you want to accomplish
- Provide any required input data or files
- I'll execute the appropriate operations
Example prompts:
- "Automate PDF → OCR → Translation → Email workflow"
- "Watch folder for new contracts → Review → Notify Slack"
- "Daily report generation from multiple data sources"
- "Batch document processing with conditional logic"
- 描述你想要实现的目标
- 提供所需的输入数据或文件
- 我将执行相应的操作
示例提示:
- "自动化PDF → OCR → 翻译 → 邮件工作流"
- "监控文件夹中的新合同 → 审核 → 通知Slack"
- "从多数据源生成每日报告"
- "带条件逻辑的批量文档处理"
Domain Knowledge
领域知识
n8n Fundamentals
n8n基础
n8n uses a node-based workflow approach:
Trigger → Action → Action → Output
│ │ │
└─────────┴─────────┴── Data flows between nodesn8n采用基于节点的工作流方式:
Trigger → Action → Action → Output
│ │ │
└─────────┴─────────┴── 数据在节点间流转Key Node Types
关键节点类型
| Type | Examples | Use Case |
|---|---|---|
| Triggers | Webhook, Schedule, File Watcher | Start workflow |
| Document | Read PDF, Write DOCX, OCR | Process files |
| Transform | Code, Set, Merge | Manipulate data |
| Output | Email, Slack, Google Drive | Deliver results |
| 类型 | 示例 | 适用场景 |
|---|---|---|
| 触发节点 | Webhook、Schedule、File Watcher | 启动工作流 |
| 文档节点 | Read PDF、Write DOCX、OCR | 处理文件 |
| 转换节点 | Code、Set、Merge | 处理数据 |
| 输出节点 | Email、Slack、Google Drive | 交付结果 |
Workflow Example: Contract Review Pipeline
工作流示例:合同审核流水线
json
{
"nodes": [
{
"name": "Watch Folder",
"type": "n8n-nodes-base.localFileTrigger",
"parameters": {
"path": "/contracts/incoming",
"events": ["add"]
}
},
{
"name": "Extract Text",
"type": "n8n-nodes-base.readPdf"
},
{
"name": "AI Review",
"type": "n8n-nodes-base.anthropic",
"parameters": {
"model": "claude-sonnet-4-20250514",
"prompt": "Review this contract for risks..."
}
},
{
"name": "Save Report",
"type": "n8n-nodes-base.writeFile"
},
{
"name": "Notify Team",
"type": "n8n-nodes-base.slack"
}
]
}json
{
"nodes": [
{
"name": "Watch Folder",
"type": "n8n-nodes-base.localFileTrigger",
"parameters": {
"path": "/contracts/incoming",
"events": ["add"]
}
},
{
"name": "Extract Text",
"type": "n8n-nodes-base.readPdf"
},
{
"name": "AI Review",
"type": "n8n-nodes-base.anthropic",
"parameters": {
"model": "claude-sonnet-4-20250514",
"prompt": "Review this contract for risks..."
}
},
{
"name": "Save Report",
"type": "n8n-nodes-base.writeFile"
},
{
"name": "Notify Team",
"type": "n8n-nodes-base.slack"
}
]
}Self-Hosting vs Cloud
自部署 vs 云服务
| Option | Pros | Cons |
|---|---|---|
| Self-hosted | Free, full control, data privacy | Maintenance required |
| n8n Cloud | No setup, auto-updates | Costs at scale |
bash
undefined| 选项 | 优势 | 劣势 |
|---|---|---|
| 自部署 | 免费、完全可控、数据隐私有保障 | 需要维护 |
| n8n云服务 | 无需配置、自动更新 | 大规模使用时产生成本 |
bash
undefinedDocker quick start
Docker快速启动
docker run -it --rm
-p 5678:5678
-v ~/.n8n:/home/node/.n8n
n8nio/n8n
-p 5678:5678
-v ~/.n8n:/home/node/.n8n
n8nio/n8n
undefineddocker run -it --rm
-p 5678:5678
-v ~/.n8n:/home/node/.n8n
n8nio/n8n
-p 5678:5678
-v ~/.n8n:/home/node/.n8n
n8nio/n8n
undefinedBest Practices
最佳实践
- Start with existing templates, customize as needed
- Use error handling nodes for reliability
- Store credentials securely with n8n's credential manager
- Test workflows with sample data before production
- 从现有模板入手,按需自定义
- 使用错误处理节点提升可靠性
- 借助n8n的凭证管理器安全存储凭证
- 上线前使用示例数据测试工作流
Installation
安装
bash
undefinedbash
undefinedInstall required dependencies
安装所需依赖
pip install python-docx openpyxl python-pptx reportlab jinja2
undefinedpip install python-docx openpyxl python-pptx reportlab jinja2
undefined