8
n8n 中文网amn8n.com

收件箱管理代理

中级

这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 Gmail, GmailTrigger, LmChatOpenAi, TextClassifier 等节点。 使用GPT-5分类自动标记Gmail邮件

前置要求
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "iPhhNVPzleZr44YK",
  "meta": {
    "instanceId": "cbbe3d07d282d90d2165a7ab7800571be416166e6eb660e7a28cfe9b84473f49",
    "templateCredsSetupCompleted": true
  },
  "name": "收件箱管理代理",
  "tags": [],
  "nodes": [
    {
      "id": "240f8e93-87f3-4185-bc12-9b82ab43ce9c",
      "name": "Gmail 触发器",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -336,
        -128
      ],
      "parameters": {
        "simple": false,
        "filters": {},
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "c6b683ca-49c4-41b2-aace-9cc434164460",
      "name": "## 步骤1. 将新闻保存在向量存储中(每日运行)",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -112,
        -128
      ],
      "parameters": {
        "options": {},
        "inputText": "={{ $json.text }}",
        "categories": {
          "categories": [
            {
              "category": "High Priority",
              "description": "Emails that require immediate attention or quick response, often from executives, key clients, or internal stakeholders. These usually involve time-sensitive issues, deadlines, or escalations. Keywords/phrases to look for: “urgent,” “ASAP,” “immediate response,” “deadline,” “critical,” “important matter.”"
            },
            {
              "category": "Promotion",
              "description": "Emails related to marketing campaigns, sales offers, product launches, or event invitations. Typically sent in bulk and often contain discounts, new features, or company news. Keywords/phrases to look for: “special offer,” “discount,” “limited time,” “new product,” “webinar,” “sale,” “exclusive invite.”"
            },
            {
              "category": "Finance/Billing",
              "description": "Emails dealing with payments, invoices, receipts, or financial records. May come from vendors, clients, or internal finance teams. Usually involve transactions, balances, or account updates. Keywords/phrases to look for: “invoice,” “payment due,” “billing,” “receipt,” “account statement,” “refund,” “transaction.”"
            },
            {
              "category": "Customer Support",
              "description": "Emails from customers seeking help, troubleshooting, or service requests. Often include questions, complaints, or technical issues that require a response or resolution. Keywords/phrases to look for: “issue,” “not working,” “help,” “support needed,” “error,” “problem with,” “can you fix.”"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "572a1a99-1193-4128-9073-43b5a8a11d11",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -40,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5",
          "cachedResultName": "gpt-5"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "BmIUKpYmW7YRSbaU",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "02ca20f3-241e-42df-8969-0c97119b77f8",
      "name": "高优先级",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        -416
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_2050230922550608961"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "66943ca1-563f-426a-8d81-10be52294555",
      "name": "推广",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        -224
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_4137435394166770583",
          "CATEGORY_PROMOTIONS"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "32916943-2fc8-4b25-b986-bbc5ba64df7a",
      "name": "财务/账单",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        -32
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_123317652592217245"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "ec3002b3-20a6-44c0-855f-43788eedbd4c",
      "name": "客户支持",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        160
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_3866679317291552912"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "fb064df0-b84c-466c-b773-7e71e4fcd863",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -1280
      ],
      "parameters": {
        "width": 1520,
        "height": 2064,
        "content": "# 使用 OpenAI 分类实现智能 Gmail 收件箱整理"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "874dd28f-0458-49bd-9e50-f23fd049c08a",
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "High Priority",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Promotion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Finance/Billings",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Customer Support",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - AI 摘要总结, 多模态 AI

需要付费吗?

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

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

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

作者
Abideen Bello

Abideen Bello

@bideen

Data/Automation consultant with experience helping Sales & Marketing teams to streamline their processes. Use my link to book an initial consultation for custom n8n work.

外部链接
在 n8n.io 查看

分享此工作流