8
n8n 中文网amn8n.com

使用 AI 搜索和 SerpAPI 自动发布新闻到社交媒体

高级

这是一个Social Media, AI RAG领域的自动化工作流,包含 20 个节点。主要使用 If, Set, Wait, Twitter, Telegram 等节点。 使用 AI 搜索和 SerpAPI 自动发布新闻到 Telegram、Facebook、Twitter 和 WordPress

前置要求
  • Twitter API 凭证
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
  • Facebook Graph API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "29a623fa-b663-4b10-8ac9-ceb975393cfa",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -448,
        672
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "dca99847-4ba2-4e67-8e84-c072234b6c4c",
      "name": "创建推文文本",
      "type": "n8n-nodes-base.twitter",
      "position": [
        -128,
        1536
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "fcc2b27c-03e8-4136-ab2c-4cd6264f3649",
      "name": "创建WordPress文章",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        -128,
        1392
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "572c8ecb-8bc9-42a0-b64a-2e25cc02858b",
      "name": "Facebook帖子",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -128,
        1088
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cc748482-234b-4f12-b6c0-f168a671108a",
      "name": "等待2秒",
      "type": "n8n-nodes-base.wait",
      "position": [
        -336,
        1312
      ],
      "webhookId": "829ccbe5-ea02-4128-bc8c-43897bca1855",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "9efa0256-ef49-4d91-a42a-3f37e6783d6f",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -1120,
        1088
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "635e17cd-abb2-4822-babd-6112881d2ddb",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -1664,
        1152
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c8383581-a491-49c1-a8a3-daf309f8b756",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -2704,
        1136
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f47a2e80-bbe1-4494-83d0-f490f0d12da5",
      "name": "不执行任何操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -336,
        1536
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "736dd7c5-413d-4dd1-85e7-145bea70fe76",
      "name": "在Google Docs中获取文档",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        -704,
        1776
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "b9788398-8139-441a-8a4c-51b235cc1f0e",
      "name": "HTTP请求",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -704,
        1664
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "e34fedaa-df5b-4a89-98fc-d93b6487154e",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        -832,
        1664
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "41bb1075-3dac-4f63-b1ff-d0dfc6a3a437",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1088,
        1664
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "39e597f6-ee5f-4601-9808-37e1d50a6c05",
      "name": "思考",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        -960,
        1664
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "c1d36fdd-3728-4782-bb69-1e61530a4582",
      "name": "发送短信",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -128,
        1232
      ],
      "webhookId": "d60206f7-b55c-41d9-bb2f-04a43dd9dc93",
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "fca41ba4-b080-43af-ab95-12f2cfb39d83",
      "name": "OpenAI聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1088,
        1776
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "58bafa52-a791-48ba-9fd2-c9f02372e5a6",
      "name": "条件判断1",
      "type": "n8n-nodes-base.if",
      "position": [
        -576,
        1440
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "b427df2c-49b5-40e8-9a85-178a9a24f7e7",
      "name": "AI代理1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -976,
        1440
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "65c0018f-4426-4309-a400-56814eeb777d",
      "name": "编辑字段1",
      "type": "n8n-nodes-base.set",
      "position": [
        -1280,
        1440
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a6aa5a3d-5c4c-41b2-9b9e-f0ef5e21d5d9",
      "name": "定时任务1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1504,
        1440
      ],
      "parameters": {},
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "If1": {
      "main": [
        [
          {
            "node": "Wait 2s",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait 2s": {
      "main": [
        [
          {
            "node": "Create Tweet text",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create WordPress Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Facebook post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule1": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get a document in Google Docs": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 社交媒体, AI RAG 检索增强

需要付费吗?

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

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

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

作者
DevCode Journey

DevCode Journey

@devcodejourney

I build intelligent systems that automate tasks, streamline workflows, and enhance user experiences using tools like n8n, AI chatbots, and modern automation platforms. With a passion for solving real-world problems through smart technology, I create custom solutions that help individuals and businesses save time, scale faster, and work smarter. Whether it's integrating APIs, building no-code/low-code automations, or developing conversational AI, I'm always exploring the edge of what's possible.

外部链接
在 n8n.io 查看

分享此工作流