8
n8n 中文网amn8n.com

社交媒体教程

高级

这是一个AI, Marketing领域的自动化工作流,包含 26 个节点。主要使用 Set, Code, Form, Merge, Twitter 等节点,结合人工智能技术实现智能自动化。 基于AI的社交媒体内容生成与发布

前置要求
  • Twitter API 凭证
  • LinkedIn API 凭证
  • 可能需要目标 API 的认证凭证
  • Facebook Graph API 凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "LzDLmNc63zyqQBXz",
  "meta": {
    "instanceId": "942ff96108ceedc60ba777eabc4e8ea2ae87415579996cd64d20cc647c4d3523"
  },
  "name": "社交媒体教程",
  "tags": [],
  "nodes": [
    {
      "id": "8034d082-f50e-4f6b-8a79-ce7f86012d72",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        920,
        20
      ],
      "webhookId": "syncbricks-social-posting-ai-agent",
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "e38a74d5-a733-4f5c-a97b-2c761b46919b",
      "name": "AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1180,
        520
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "ca0a8aef-0251-45ed-bc9b-05ee977febf9",
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        980,
        780
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "31e88059-94ca-4d4e-a673-e0f8cd1ac96e",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1300,
        780
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ffda1c79-faa4-4cc8-8655-6f7fc14b7e2d",
      "name": "分割表单输入",
      "type": "n8n-nodes-base.set",
      "position": [
        1320,
        40
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "37e443e1-6925-44a1-a07e-9eb1120e55a9",
      "name": "上传图片",
      "type": "n8n-nodes-base.form",
      "position": [
        320,
        1160
      ],
      "webhookId": "0dc811ef-b2e0-4213-a0c9-e9b5fb9fcbf1",
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "265068ce-22fc-4c41-9ed2-93eadc0ce25f",
      "name": "分割数据",
      "type": "n8n-nodes-base.set",
      "position": [
        1560,
        40
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "b8470879-413e-4901-bf39-23a19beaee5f",
      "name": "AI 数据",
      "type": "n8n-nodes-base.set",
      "position": [
        1880,
        40
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "eef02dcb-7c7f-4d6c-a1fd-039c8b30f10d",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1680,
        760
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "097e7724-4dc0-4cc9-b12c-2dbdae4e024f",
      "name": "表单",
      "type": "n8n-nodes-base.form",
      "position": [
        1820,
        1960
      ],
      "webhookId": "e84b9492-038c-4701-a367-c68237ddebf6",
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7b1d64fc-02ad-4b8f-ad1e-be8894abd932",
      "name": "嵌套顶级元数据",
      "type": "n8n-nodes-base.set",
      "position": [
        940,
        1160
      ],
      "parameters": {},
      "typeVersion": 3.3
    },
    {
      "id": "11ddcfe8-1978-4f5a-8c29-67e72920431a",
      "name": "重命名图片二进制文件为顶部图片",
      "type": "n8n-nodes-base.code",
      "position": [
        -40,
        1960
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "19892590-5ddf-47ac-b544-7a72a68bd45e",
      "name": "发布到Facebook",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        440,
        2080
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b3b0068b-c75a-427c-bb2d-77b21bc6ff16",
      "name": "发布到 LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        420,
        1840
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ed5fe0c2-a07a-45f1-90cb-65f21d416a1a",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c4a2e59d-165a-49cc-8074-9868ee4e0d6c",
      "name": "X",
      "type": "n8n-nodes-base.twitter",
      "position": [
        440,
        1600
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "66ba98a9-24c0-4128-9ad9-792a0d400aae",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        340
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "02fafdc7-0272-4f34-9b66-dfbe8e16e70d",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        960
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "21d945c3-446c-4bb9-8696-a70034801485",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        1480
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c9efdc38-94c6-494e-a932-45b75312bb54",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        1480
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "93632f4f-9182-4b76-bbe0-e6d5dd230452",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        1600
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "89f22cf8-9499-4b7f-872d-97099c5d1e50",
      "name": "Instagram 图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        2280
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "c415eeb9-f916-4c08-afb1-baed3f3280cc",
      "name": "发布到 Instagram",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1060,
        2280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1c8f6ba6-c28b-45a8-ba0d-3f2f21ccbfa0",
      "name": "合并1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1380,
        1940
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "d9cfdcd1-18db-4d0d-9b6a-66897600e496",
      "name": "上传图片到 imgbb.com",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        2280
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "f7e5b1b1-aeaa-4851-be04-53e8255fa343",
      "name": "便签 11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4a55bf93-ae0c-4aa9-84a8-cd4d02375e51",
  "connections": {
    "X": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Upload Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Data": {
      "main": [
        [
          {
            "node": "Data for AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data for AI": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image": {
      "main": [
        [
          {
            "node": "Nest Top Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nest Top Meta": {
      "main": [
        [
          {
            "node": "Rename Image Binary Top Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Form Input": {
      "main": [
        [
          {
            "node": "Split Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Split Form Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image for Instagram": {
      "main": [
        [
          {
            "node": "Publish to Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to Facebook": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Publish to LinkedIn": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Publish to Instagram": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to imgbb.com": {
      "main": [
        [
          {
            "node": "Image for Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename Image Binary Top Image": {
      "main": [
        [
          {
            "node": "X",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish to LinkedIn",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish to Facebook",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload Image to imgbb.com",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 人工智能, 营销

需要付费吗?

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

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

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

作者
Amjid Ali

Amjid Ali

@amjid

**Amjid Ali** is an automation expert and AI enthusiast specializing in creating intelligent workflows using low-code platforms like **n8n**. With a passion for simplifying complex processes, he designs solutions that enhance productivity and streamline operations. As an active contributor to the **n8n Creator Hub**, Amjid shares innovative use cases, practical templates, and best practices, empowering the community to unlock the full potential of workflow automation.

外部链接
在 n8n.io 查看

分享此工作流