n8n-workflow

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

N8N 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

使用方法

  1. Describe what you want to accomplish
  2. Provide any required input data or files
  3. 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"
  1. 描述你想要实现的目标
  2. 提供所需的输入数据或文件
  3. 我将执行相应的操作
示例提示:
  • "自动化PDF → OCR → 翻译 → 邮件工作流"
  • "监控文件夹中的新合同 → 审核 → 通知Slack"
  • "从多数据源生成每日报告"
  • "带条件逻辑的批量文档处理"

Domain Knowledge

领域知识

n8n Fundamentals

n8n基础

n8n uses a node-based workflow approach:
Trigger → Action → Action → Output
   │         │         │
   └─────────┴─────────┴── Data flows between nodes
n8n采用基于节点的工作流方式:
Trigger → Action → Action → Output
   │         │         │
   └─────────┴─────────┴── 数据在节点间流转

Key Node Types

关键节点类型

TypeExamplesUse Case
TriggersWebhook, Schedule, File WatcherStart workflow
DocumentRead PDF, Write DOCX, OCRProcess files
TransformCode, Set, MergeManipulate data
OutputEmail, Slack, Google DriveDeliver 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 云服务

OptionProsCons
Self-hostedFree, full control, data privacyMaintenance required
n8n CloudNo setup, auto-updatesCosts at scale
bash
undefined
选项优势劣势
自部署免费、完全可控、数据隐私有保障需要维护
n8n云服务无需配置、自动更新大规模使用时产生成本
bash
undefined

Docker quick start

Docker快速启动

docker run -it --rm
-p 5678:5678
-v ~/.n8n:/home/node/.n8n
n8nio/n8n
undefined
docker run -it --rm
-p 5678:5678
-v ~/.n8n:/home/node/.n8n
n8nio/n8n
undefined

Best Practices

最佳实践

  1. Start with existing templates, customize as needed
  2. Use error handling nodes for reliability
  3. Store credentials securely with n8n's credential manager
  4. Test workflows with sample data before production
  1. 从现有模板入手,按需自定义
  2. 使用错误处理节点提升可靠性
  3. 借助n8n的凭证管理器安全存储凭证
  4. 上线前使用示例数据测试工作流

Installation

安装

bash
undefined
bash
undefined

Install required dependencies

安装所需依赖

pip install python-docx openpyxl python-pptx reportlab jinja2
undefined
pip install python-docx openpyxl python-pptx reportlab jinja2
undefined

Resources

资源