8
n8n 中文网amn8n.com

## 适用对象

高级

这是一个Social Media, Multimodal AI领域的自动化工作流,包含 28 个节点。主要使用 Set, Notion, LinkedIn, SplitOut, Aggregate 等节点。 AI驱动的每日LinkedIn帖子创建器,集成OpenAI反馈循环和Notion

前置要求
  • Notion API Key
  • LinkedIn API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "RZDy1EVKnrfLB3fn",
  "meta": {
    "instanceId": "41a93cc6f329d5755684ac69c9a86d5c75d7dc780eea0b60d82055e6149e455f",
    "templateCredsSetupCompleted": true
  },
  "name": "## 适用对象",
  "tags": [],
  "nodes": [
    {
      "id": "1b910ad2-7152-479c-9f08-0d5630fbd589",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        704,
        64
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "HmQmjiiOMi2jzH5u",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8116d89b-6516-4a21-82b5-aa3470c60382",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        896,
        80
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "ba7f83b0-55b2-4a10-84ee-e9c9c5537da8",
      "name": "需要可定制AI聊天机器人的企业、开发者和组织,用于内部文档访问、客户支持、电商协助或任何需要访问特定知识库进行智能对话的场景。",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1072,
        96
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "UbKh62LfKoMDeyUo",
          "cachedResultName": "Get Brand Brief"
        },
        "description": "## 功能描述",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "12872369-c17a-41e5-8ff0-a91db4999ab9",
      "name": "该工作流创建了一个完全可定制的AI聊天机器人,可部署在任何支持Webhook触发的平台(网站、Slack、Teams等)。聊天机器人能访问存储在Supabase中的个性化知识库,除了简单对话外,还能执行发送邮件、安排预约或更新数据库等高级操作。",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1264,
        96
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "3Bnlfdq60OZoXcba",
          "cachedResultName": "Get Content Feedback"
        },
        "description": "## 工作原理",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0e2982fb-bfaa-4d37-a731-1f2f179b34c4",
      "name": "操作工具:执行发送邮件或日历预订等附加任务",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -96,
        -64
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "N5PyYK0EClSQRWNK",
          "cachedResultName": "Get Content Ideas"
        },
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "be8c25a1-0bd8-4f56-8b09-f0788cb5feb9",
      "name": "当被另一个工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -384,
        -464
      ],
      "parameters": {
        "inputSource": "passthrough"
      },
      "typeVersion": 1.1
    },
    {
      "id": "0e4a2ba9-053f-4ecd-84cc-9585324b7111",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        32,
        -464
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "content"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "92c10cc6-ccc2-4b12-a586-1c4fb9df8d6a",
      "name": "Webhook触发器:接收来自任何支持Webhook平台的消息",
      "type": "n8n-nodes-base.notion",
      "position": [
        -176,
        -464
      ],
      "parameters": {
        "blockId": {
          "__rl": true,
          "mode": "url",
          "value": "https://www.notion.so/Brand-Brief-245bda7c79be804dbe6bf6d78e041bf7"
        },
        "resource": "block",
        "operation": "getAll"
      },
      "credentials": {
        "notionApi": {
          "id": "qoRyZbqGwqEGMEBX",
          "name": "Notion account"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4d14408e-e7e5-4189-8f4e-92ee1b55f197",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -512
      ],
      "parameters": {
        "width": 880,
        "height": 192,
        "content": "Webhook触发器:接收来自任何支持Webhook平台的消息"
      },
      "typeVersion": 1
    },
    {
      "id": "91bec35e-3b71-43b9-b4d8-ba6ae3ceb471",
      "name": "AI代理:通过可定制个性和指令处理用户查询",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        816,
        -480
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are tasked with evaluating a piece of content written for Nabin Bhandari. Your role is to assess how well the post aligns with Nabin's personal brand, using the below brief as your guide.\n\nPlease analyze the post based on the following criteria:\n\nDoes the post have unwanted artifacts like \"Let's try again\" or \"Here's a new post\"?\n\nDoes the content reflect Nabin's core values, voice, and style as described in the brief?\n\nDoes it engage Nabin's target audience as described in the brief?\n\nDoes it emphasize Nabin's expertise and domain authority as described in the brief?\n\nIs the tone, messaging, and approach consistent with the brief's objectives and positioning?\n\nAfter evaluation, output a score between 0 and 1, representing the alignment between the post and the brand brief. The score should be output in the following JSON format:\n{\n  \"description\": \"[short description here]\",\n  \"score\": [insert score here]\n}\n\n#Brand Brief:{{ $json.content }}\n"
            },
            {
              "content": "={{ $('When Executed by Another Workflow').item.json.query }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "HmQmjiiOMi2jzH5u",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "127bc4c2-7627-428c-a1b8-9f3eefb86a8b",
      "name": "向量数据库:从您的Supabase知识库中搜索相关信息",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        608,
        -480
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "UbKh62LfKoMDeyUo",
          "cachedResultName": "Get Brand Brief"
        },
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8d1288cb-3aeb-44a6-ac02-2b4a43112e36",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        -528
      ],
      "parameters": {
        "color": 4,
        "width": 848,
        "height": 224,
        "content": "记忆系统:维护对话历史以实现上下文理解和可追溯性"
      },
      "typeVersion": 1
    },
    {
      "id": "54cbe82b-57bb-48fd-9111-744f7a23a8ff",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        304
      ],
      "parameters": {
        "color": 6,
        "width": 960,
        "height": 256,
        "content": "操作工具:执行发送邮件或日历预订等附加任务"
      },
      "typeVersion": 1
    },
    {
      "id": "76a93c9b-4077-4112-9560-754a0740061e",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -272
      ],
      "parameters": {
        "color": 5,
        "width": 1792,
        "height": 544,
        "content": "创建内容"
      },
      "typeVersion": 1
    },
    {
      "id": "6dd35331-93d1-40fa-ac43-f9e39bc4cbc2",
      "name": "## 技术架构",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -320,
        -64
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 21
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cc7a3715-717e-42e2-9fd2-d64a1846a059",
      "name": "使用 AI 生成 LinkedIn 帖子",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        896,
        -192
      ],
      "parameters": {
        "options": {
          "systemMessage": "=\nYou are a helpful content creator for Nabin Bhandari's personal brand. Use the below steps to create content.\n\nSteps:\n\nAlways start by getting the brand brief using the Get_Brand_Brief tool.\n\nCreate a post on the requested topic that aligns with the brand brief.\n\nGet feedback and a score on the post you created in step 2 by using the Get_Content_Feedback tool.\n\nIf the score is below 0.8, use the feedback from step 3 to refine the post, then repeat steps 3 and 4.\n\nThe final output should be the approved post.\n\n\n\n\n\n\n\n\n"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "dc57ae50-f3d1-475e-b1bf-18b6b91e863c",
      "name": "聊天触发器直接连接到AI代理",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        1520,
        -192
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "person": "=Nabin Bhandari",
        "additionalFields": {}
      },
      "credentials": {
        "linkedInOAuth2Api": {
          "id": "nNBVWlBras4a135H",
          "name": "LinkedIn account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "22928fb1-f034-4201-b717-60007a99cd63",
      "name": "语言模型、记忆系统和向量存储都作为工具/组件连接到AI代理",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        96,
        -64
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "suggestions"
      },
      "typeVersion": 1
    },
    {
      "id": "a8a4e879-32b7-41aa-a4d7-5eb043940dc2",
      "name": "嵌入专门连接到Supabase向量存储以进行相似性搜索",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        352,
        -64
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "ab9c146c-0488-4280-8c8f-5090b6a6b0fb",
      "name": "格式化 AI 输入",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        -192
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"sessionId\": \"{{ $itemIndex }}\",\n  \"action\": \"sendMessage\",\n  \"chatInput\": \"{{ $('Split Ideas').item.json.suggestions }}\"\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "68829e77-3485-4ca6-8c99-25de201ad3a8",
      "name": "## 环境要求",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        -464
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "04e2713e-171a-42e3-8ddf-15ae33c263ed",
              "name": "content",
              "type": "string",
              "value": "={{ $json.content.join() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "9a115ef3-978b-4a80-8b5b-2e86a5d2b5ca",
      "name": "格式化反馈",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        -480
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "db37e84a-978d-4bb7-8253-e1938a365c4f",
              "name": "feedback",
              "type": "string",
              "value": "={{ $json.message.content.description }}"
            },
            {
              "id": "da38e362-0115-4d0a-bba1-8f722b01f0e7",
              "name": "score",
              "type": "number",
              "value": "={{ $json.message.content.score }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5686b0d7-86b2-4dfc-81b2-d6eb10bc07c0",
      "name": "Supabase账户和项目",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        400,
        368
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a professional content writer. Create 10 topic suggestions that align with the provided brand brief.\n\nJSON output format:\n{\n\"suggestions\": [\n\"Create a post about [...]\",\n...\n]\n}\nBrand brief:{{ $json.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "HmQmjiiOMi2jzH5u",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "fb39058a-702d-4614-855e-0a6cea5aafae",
      "name": "AI模型API密钥(任意您选择的LLM提供商)",
      "type": "n8n-nodes-base.set",
      "position": [
        752,
        368
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "df53b79c-c484-42f8-9f11-0470395512ce",
              "name": "suggestions",
              "type": "array",
              "value": "={{ $json.message.content.suggestions }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "10885472-3a23-4d23-9d26-de044d90c027",
      "name": "OpenAI API密钥(用于嵌入 - Cole Medin的教程中涵盖此内容)",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        192,
        368
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "UbKh62LfKoMDeyUo",
          "cachedResultName": "Get_Brand_Brief"
        },
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c727e9f2-0f3b-4616-abba-a40e649e6f13",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -272
      ],
      "parameters": {
        "color": 3,
        "width": 720,
        "height": 544,
        "content": "n8n内置PostgreSQL访问(用于对话记忆)"
      },
      "typeVersion": 1
    },
    {
      "id": "4b72cf4d-399c-4c5e-ba9a-c6416fe54eea",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -320
      ],
      "parameters": {
        "color": 2,
        "height": 416,
        "content": "平台特定的Webhook配置(可选)"
      },
      "typeVersion": 1
    },
    {
      "id": "91a121b2-e311-45b8-8273-dc8cdbe8335e",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -176
      ],
      "parameters": {
        "color": 4,
        "height": 352,
        "content": "每天晚上 9 点触发此工作流。您可以在 Cron 节点设置中更改此时间。"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "edecb44a-8355-4938-b1cc-cdcf6be5aa2d",
  "connections": {
    "Aggregate": {
      "main": [
        [
          {
            "node": "Format Brand Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Ideas": {
      "main": [
        [
          {
            "node": "Loop through content Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Generate LinkedIn Post with AI",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Daily Scheduler": {
      "main": [
        [
          {
            "node": "Get Content Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Brand Brief": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Brand Brief1": {
      "main": [
        [
          {
            "node": "Get Content Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Brand Brief3": {
      "main": [
        [
          {
            "node": "Get _Content _Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Content Ideas": {
      "main": [
        [
          {
            "node": "Split Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get_ Brand _Brief": {
      "ai_tool": [
        [
          {
            "node": "Generate LinkedIn Post with AI",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate LinkedIn Post with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Format For AI Input": {
      "main": [
        [
          {
            "node": "Generate LinkedIn Post with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get _Content _Ideas": {
      "main": [
        [
          {
            "node": "Format Content Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Content Feedback": {
      "main": [
        [
          {
            "node": "Format Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get_Content_Feedback": {
      "ai_tool": [
        [
          {
            "node": "Generate LinkedIn Post with AI",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Loop through content Ideas": {
      "main": [
        [],
        [
          {
            "node": "Format For AI Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate LinkedIn Post with AI": {
      "main": [
        [
          {
            "node": "Publish to Linkedin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Get Brand Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 社交媒体, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流