8
n8n 中文网amn8n.com

本地PDF

中级

这是一个AI, IT Ops领域的自动化工作流,包含 15 个节点。主要使用 ConvertToFile, ReadWriteFile, Agent, ExtractFromFile, LocalFileTrigger 等节点,结合人工智能技术实现智能自动化。 使用Ollama AI处理法律文档并生成HTML报告(100%本地)

前置要求
  • AI 服务 API Key(如 OpenAI、Anthropic 等)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "rqu4dt6kaPwKplr3",
  "meta": {
    "instanceId": "060085c5d2eea8c0bf2c51c6e5fdf206613403cbbbc1f8a472a4dcb6e3e29fdf",
    "templateCredsSetupCompleted": true
  },
  "name": "本地 PDF",
  "tags": [],
  "nodes": [
    {
      "id": "cffc6896-7d35-4183-af3b-4e139199f2e2",
      "name": "从文件提取",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -600,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a0b0bbe8-796d-4ea5-9eaf-d958f72cc79f",
      "name": "本地文件触发器",
      "type": "n8n-nodes-base.localFileTrigger",
      "position": [
        -1040,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f79e5605-677d-4205-8d6d-1b7b4c3bda04",
      "name": "从磁盘读取/写入文件",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -820,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5c5b052c-5e09-423c-b5c4-27408986f36b",
      "name": "AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -380,
        -80
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "8e5108d3-8041-4032-ba14-65c385def2cd",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -360,
        200
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f10e2d2f-c21b-46ed-a36c-2fcc883846ff",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -4,
        -80
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "73f9871a-a759-4de0-8561-68418e2c1e91",
      "name": "从磁盘1读取/写入文件",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        216,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "84fddb7f-1243-4894-903c-024e89c3b9cb",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Local File Trigger": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk1": {
      "main": [
        []
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 人工智能, IT 运维

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量15
分类2
节点类型7
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者

AI & Automation Consultant. Sharing cool stuff on my YouTube Channel

外部链接
在 n8n.io 查看

分享此工作流