8
n8n 中文网amn8n.com

使用Perplexity Sonar Pro到Gmail的AI新闻研究代理

中级

这是一个Market Research, AI Summarization领域的自动化工作流,包含 11 个节点。主要使用 Gmail, Perplexity, Agent, ScheduleTrigger, LmChatOpenAi 等节点。 基于Perplexity Pro、GPT格式和Gmail发送的每日AI新闻摘要

前置要求
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "KCrlYuUlMRdpLfKw",
  "meta": {
    "instanceId": "f1ddac76345e25fbcb39be5dda61ac252c301456dbe2cab4155317eaddbb7562",
    "templateCredsSetupCompleted": true
  },
  "name": "使用 Perplexity Sonar Pro 到 Gmail 的 AI 新闻研究代理",
  "tags": [],
  "nodes": [
    {
      "id": "708a8c6b-d521-4dd3-a093-ddc21c95c122",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -160,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "645b1d90-c9f8-4ec9-9266-48eb3f6fa70c",
      "name": "发送消息",
      "type": "n8n-nodes-base.gmail",
      "position": [
        800,
        0
      ],
      "webhookId": "c90e86e9-2fcb-459d-8141-b9b819c3839b",
      "parameters": {
        "sendTo": "",
        "message": "={{ $json.output }}",
        "options": {},
        "subject": "AI News Update in the last 24 hours",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2cfe4f99-2215-4a20-9d9a-b8c683c5eba4",
      "name": "格式化器 AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        360,
        0
      ],
      "parameters": {
        "text": "={{ $json.choices[0].message.content }}",
        "options": {
          "systemMessage": "You are a helpful formatter assistant, you will receive a chunk of AI Headlines and news, your job is to format it such that it is in an easily readable format for email."
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "f7bc9b62-e051-430b-a269-395b22da6157",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        380,
        200
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "93da545a-da0d-4c65-ab59-962aa1257771",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        540,
        200
      ],
      "parameters": {
        "sessionKey": "={{ $('Research Agent').item.json.id }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "3a109ff0-4f5e-4da3-bda9-6103923d9ad8",
      "name": "研究代理",
      "type": "n8n-nodes-base.perplexity",
      "position": [
        80,
        0
      ],
      "parameters": {
        "model": "sonar-pro",
        "options": {
          "searchRecency": "day"
        },
        "messages": {
          "message": [
            {
              "role": "system",
              "content": "You are a cutting‑edge AI news researcher. Every time you run, search for and retrieve the most recent developments in artificial intelligence published within the last 24 hours. \n\nFor each news item you return:\n- Include the full headline.\n- Provide a one‑sentence summary.\n- Unfurl the full URL (no shortened links or footnote markers).\n- List the publication date and the source name."
            },
            {
              "content": "What are the latest headlines in AI Development in the past 24 hours? Include any model launches or notable market news."
            }
          ]
        },
        "requestOptions": {}
      },
      "credentials": {
        "perplexityApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f006dbcc-794d-477e-8835-a1762e5a6719",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -200
      ],
      "parameters": {
        "height": 560,
        "content": "计划触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "044d8c27-bc57-4e29-b57b-757794aaaf49",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -200
      ],
      "parameters": {
        "height": 560,
        "content": "Perplexity 研究代理"
      },
      "typeVersion": 1
    },
    {
      "id": "43d45d64-c592-4a1e-8b4f-f4d3bfa83d37",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -200
      ],
      "parameters": {
        "width": 400,
        "height": 560,
        "content": "格式化器代理"
      },
      "typeVersion": 1
    },
    {
      "id": "b324e00e-9838-49a9-b758-c3c6a53011ab",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        700,
        -200
      ],
      "parameters": {
        "width": 320,
        "height": 560,
        "content": "Gmail 输出节点"
      },
      "typeVersion": 1
    },
    {
      "id": "505ab0d1-a982-497a-b920-8ac3fd95c1b0",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -260
      ],
      "parameters": {
        "width": 720,
        "height": 1120,
        "content": "🧠 每 24 小时 AI 新闻更新(使用 Perplexity + GPT 格式化器)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ebf980fb-4544-483c-81fc-0579e5619fd2",
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Formatter AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Research Agent": {
      "main": [
        [
          {
            "node": "Formatter AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Research Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Formatter AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Formatter AI Agent": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 市场调研, AI 摘要总结

需要付费吗?

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

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

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

作者
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 查看

分享此工作流