8
n8n 中文网amn8n.com

终极博客内容作者 RAG AI Agent + Perplexity 研究

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 14 个节点。主要使用 GoogleDocs, SlackTrigger, PerplexityTool, Agent, LmChatAnthropic 等节点。 使用Slack、Perplexity、Pinecone和Google Docs创建研究支持的博客内容

前置要求
  • Slack Bot Token 或 Webhook URL
  • Anthropic API Key
  • OpenAI API Key
  • Pinecone API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "Uz3L0EpsCqsr7aFV",
  "meta": {},
  "name": "终极博客内容作者 RAG AI Agent + Perplexity 研究",
  "tags": [],
  "nodes": [
    {
      "id": "6ebbb531-ac74-477e-8db9-098ed6a809a8",
      "name": "# 生成图片并保存",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -80,
        224
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude 4 Sonnet"
        },
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "6c677236-70db-43af-9bc2-22437a253c8e",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        384,
        224
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "<<<PINECONE_INDEX>>>",
          "cachedResultName": "<<<PINECONE_INDEX_NAME>>>"
        },
        "toolDescription": "Refer to Pinecone Vector Database for similar style Blogs"
      },
      "typeVersion": 1.3
    },
    {
      "id": "ebc335c7-a58c-4474-8e4b-57994736fe3d",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        496,
        400
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "0febdaf1-3548-45b1-9cb5-654f2da17abd",
      "name": "博客文章 AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        48,
        0
      ],
      "parameters": {
        "text": "={{ $json['Blogpost Idea'] }}",
        "options": {
          "systemMessage": "=You are an expert blogpost writer AI Agent.\nYour only task is to generate a complete, engaging, and well-structured blogpost based on the user’s provided blogpost idea.\n\n🔒 Constraints:\n\nAlways write in clear, professional, and natural language.\n\nOutput only the final blogpost content — no explanations, commentary, or metadata.\n\nStructure the blogpost with:\n\nA catchy title\n\nAn engaging introduction\n\nWell-organized sections with subheadings\n\nA concise and impactful conclusion\n\nLength: at least 800 words (unless the user specifies otherwise).\n\nTailor tone and style to suit the topic (e.g., educational, conversational, persuasive, or technical).\n\nInclude examples, analogies, or step-by-step breakdowns when helpful.\n\nDo not repeat the user’s input verbatim; expand it into a fully developed article.\n\nDo not include system prompts, notes, or formatting instructions in your output.\n\nThe user will provide the blogpost idea. You will return the finished blogpost.\n\n##Tool\nUse the Pinecone Vector Store Tool to refer to the style of blogpost that the user want.\n\nUse the Perplexity Tool attached to research relevant news and latest information about the blog content"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "0332a3a7-fd9e-4d78-83e6-fd8efaedf3cc",
      "name": "创建文档",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        720,
        0
      ],
      "parameters": {
        "title": "Blogpost",
        "folderId": "<<<GOOGLE_DRIVE_FOLDER_ID>>>"
      },
      "typeVersion": 2
    },
    {
      "id": "f1127452-a013-43ef-80d4-95ea3eab249f",
      "name": "更新文档",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        992,
        0
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "={{ $('Blogpost AI Agent').item.json.output }}",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "<<<GOOGLE_DOC_URL>>>"
      },
      "typeVersion": 2
    },
    {
      "id": "1b35134a-10d2-40be-96ba-3ed71cef93fa",
      "name": "Slack 触发器",
      "type": "n8n-nodes-base.slackTrigger",
      "position": [
        -352,
        0
      ],
      "parameters": {
        "options": {},
        "trigger": [
          "app_mention"
        ],
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "<<<SLACK_CHANNEL_ID>>>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "899b1b78-95f6-4424-9ea9-d51cfa44bc46",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        80,
        224
      ],
      "parameters": {
        "contextWindowLength": 15
      },
      "typeVersion": 1.3
    },
    {
      "id": "4fa88631-8e4f-4952-b0eb-1205bde7d759",
      "name": "在 Perplexity 中向模型发送消息",
      "type": "n8n-nodes-base.perplexityTool",
      "position": [
        256,
        224
      ],
      "parameters": {
        "model": "sonar-pro",
        "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": "3a7751f2-4073-4ac9-9707-dde3ca854ece",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -208
      ],
      "parameters": {
        "width": 432,
        "height": 880,
        "content": "Slack 触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "17656652-74cc-4bd5-a793-bc4131d3b60c",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -208
      ],
      "parameters": {
        "color": 5,
        "width": 752,
        "height": 880,
        "content": "博客文章 AI Agent"
      },
      "typeVersion": 1
    },
    {
      "id": "528cd1cc-3015-4d93-9697-6202cd13083c",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -208
      ],
      "parameters": {
        "color": 6,
        "width": 272,
        "height": 880,
        "content": "文档创建"
      },
      "typeVersion": 1
    },
    {
      "id": "3fe67e52-6ce7-441c-a7d6-5377ad478022",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        -208
      ],
      "parameters": {
        "color": 2,
        "width": 272,
        "height": 880,
        "content": "将博客内容写入 Google 文档"
      },
      "typeVersion": 1
    },
    {
      "id": "dd56b80b-c511-4f7b-b546-98ddf3190513",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1184,
        -208
      ],
      "parameters": {
        "color": 4,
        "width": 592,
        "height": 976,
        "content": "✍️ 终极 AI 博客内容创建器(Slack + Pinecone + Perplexity)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Blogpost AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Slack Trigger": {
      "main": [
        [
          {
            "node": "Blogpost AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blogpost AI Agent": {
      "main": [
        [
          {
            "node": "Create a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a document": {
      "main": [
        [
          {
            "node": "Update a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Blogpost AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_tool": [
        [
          {
            "node": "Blogpost AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Message a model in Perplexity": {
      "ai_tool": [
        [
          {
            "node": "Blogpost AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 内容创作, 多模态 AI

需要付费吗?

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

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

适合有一定经验的用户,包含 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 查看

分享此工作流