8
n8n 中文网amn8n.com

电子邮件新闻MCP模板

高级

这是一个AI Chatbot, Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 GmailTool, PerplexityTool, Agent, McpTrigger, TavilyTool 等节点。 邮件草拟与新闻研究助手 - 集成OpenAI、Gmail、Tavily和Perplexity

前置要求
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "TgpCq3JAieEaFdGJ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "电子邮件新闻 MCP 模板",
  "tags": [],
  "nodes": [
    {
      "id": "0606f766-255e-469c-8e6c-5751537ed3ab",
      "name": "AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        192,
        -160
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a helpful email assistant.\n\n##Tool\nUse attached Email MCP Tool for emails when asked\n\nUse attached Email MCP Tool for "
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "225b0350-6eae-45fc-a158-da9961b8aafe",
      "name": "当收到聊天消息时",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        0,
        -160
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "80fcfcad-1310-4cf2-a4df-bf6746339cfd",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        48,
        48
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "7e3db391-7ede-4e92-9593-7a1288938d80",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        224,
        48
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "1b9a577c-3401-4081-be39-d5051922df38",
      "name": "在Gmail中发送消息",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        -144,
        480
      ],
      "parameters": {
        "sendTo": "<<<REPLACE_WITH_EMAIL>>>",
        "message": "<<<REPLACE_WITH_MESSAGE>>>",
        "options": {},
        "subject": "<<<REPLACE_WITH_SUBJECT>>>"
      },
      "typeVersion": 2.1
    },
    {
      "id": "fa6ae7d8-3d4d-4bd0-a4f9-d1d295f5f14b",
      "name": "在 Gmail1 中发送消息",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        64,
        480
      ],
      "parameters": {
        "sendTo": "<<<REPLACE_WITH_EMAIL>>>",
        "message": "<<<REPLACE_WITH_MESSAGE>>>",
        "options": {},
        "subject": "<<<REPLACE_WITH_SUBJECT>>>"
      },
      "typeVersion": 2.1
    },
    {
      "id": "252988a9-b546-4e1a-9d6f-338618b5781b",
      "name": "在 Gmail2 中发送消息",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        256,
        480
      ],
      "parameters": {
        "sendTo": "<<<REPLACE_WITH_EMAIL>>>",
        "message": "<<<REPLACE_WITH_MESSAGE>>>",
        "options": {},
        "subject": "<<<REPLACE_WITH_SUBJECT>>>"
      },
      "typeVersion": 2.1
    },
    {
      "id": "722718e7-8a84-44b4-98e3-a6eb53902a7c",
      "name": "在 Tavily 中搜索",
      "type": "@tavily/n8n-nodes-tavily.tavilyTool",
      "position": [
        512,
        480
      ],
      "parameters": {
        "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "0bba3a97-e1ee-46f5-abec-7713d6ff2948",
      "name": "在 Perplexity 中向模型发送消息",
      "type": "n8n-nodes-base.perplexityTool",
      "position": [
        688,
        480
      ],
      "parameters": {
        "options": {},
        "messages": {
          "message": [
            {
              "content": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('message0_Text', ``, 'string') }}"
            }
          ]
        },
        "simplify": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Simplify_Output', ``, 'boolean') }}",
        "requestOptions": {}
      },
      "typeVersion": 1
    },
    {
      "id": "60b275c9-9e2f-4e3c-bc11-2477fe0bc951",
      "name": "新闻 MCP 服务器",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        544,
        256
      ],
      "parameters": {
        "path": "<<<REPLACE_WITH_PATH>>>"
      },
      "typeVersion": 2
    },
    {
      "id": "946b0a9d-590f-4633-ac98-ce983bbb205f",
      "name": "电子邮件 MCP 服务器",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -96,
        256
      ],
      "parameters": {
        "path": "<<<REPLACE_WITH_PATH>>>"
      },
      "typeVersion": 2
    },
    {
      "id": "34bff09d-95d1-446f-88cb-1c664d1ad754",
      "name": "电子邮件 MCP 客户端",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        544,
        48
      ],
      "parameters": {
        "endpointUrl": "<<<REPLACE_WITH_ENDPOINT_URL>>>",
        "serverTransport": "httpStreamable"
      },
      "typeVersion": 1.1
    },
    {
      "id": "57587695-df6b-461d-8596-6561ce295f79",
      "name": "新闻 MCP 客户端",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        384,
        48
      ],
      "parameters": {
        "endpointUrl": "<<<REPLACE_WITH_ENDPOINT_URL>>>",
        "serverTransport": "httpStreamable"
      },
      "typeVersion": 1.1
    },
    {
      "id": "2e931983-39af-4b1d-9a16-e30cd536ff0b",
      "name": "在 Tavily1 中搜索",
      "type": "@tavily/n8n-nodes-tavily.tavilyTool",
      "position": [
        848,
        480
      ],
      "parameters": {
        "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "c8fc2868-c029-454f-b47c-6cf2a4f2fb7c",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        -432
      ],
      "parameters": {
        "width": 736,
        "height": 1808,
        "content": "用于电子邮件和新闻研究的 AI Agent MCP"
      },
      "typeVersion": 1
    },
    {
      "id": "226bc7c3-d026-4dea-adec-1d8fc5a5481b",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -304
      ],
      "parameters": {
        "color": 5,
        "width": 928,
        "height": 512,
        "content": "智能体与 MCP 客户端"
      },
      "typeVersion": 1
    },
    {
      "id": "4d9280da-af9b-4eab-be1a-9c25a6258022",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        224
      ],
      "parameters": {
        "color": 6,
        "width": 672,
        "height": 512,
        "content": "电子邮件 MCP 服务器"
      },
      "typeVersion": 1
    },
    {
      "id": "f55f5515-090b-4c3d-9e60-49e0588292a4",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 512,
        "content": "新闻研究 MCP 服务器"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "News MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Email MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search in Tavily": {
      "ai_tool": [
        [
          {
            "node": "News MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search in Tavily1": {
      "ai_tool": [
        [
          {
            "node": "News MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail": {
      "ai_tool": [
        [
          {
            "node": "Email MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail1": {
      "ai_tool": [
        [
          {
            "node": "Email MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail2": {
      "ai_tool": [
        [
          {
            "node": "Email MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model in Perplexity": {
      "ai_tool": [
        [
          {
            "node": "News MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - AI 聊天机器人, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量18
分类2
节点类型10
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Automate With Marc

Automate With Marc

@marconi

Automating Start-Up and Business processes. Helping non-techies understand and leverage Agentic AI with easy to understand step-by-step tutorials. Check out my educational content: https://www.youtube.com/@Automatewithmarc

外部链接
在 n8n.io 查看

分享此工作流