8
n8n 中文网amn8n.com

自动化X(Twitter)内容引擎

高级

这是一个自动化工作流,包含 24 个节点。主要使用 If, Code, Gmail, GoogleDrive, GoogleSheets 等节点。 基于AI的X(Twitter)内容生成与调度(LangChain和Blotato)

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Drive API 凭证
  • Google Sheets API 凭证

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "s0Vs1i79uYwGj9fG",
  "meta": {
    "instanceId": "15d6057a37b8367f33882dd60593ee5f6cc0c59310ff1dc66b626d726083b48d"
  },
  "name": "自动化 X (Twitter) 内容引擎",
  "tags": [],
  "nodes": [
    {
      "id": "13440d5f-a35c-4968-b586-450cac904f49",
      "name": "LLM: OpenRouter",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -280,
        384
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "fMR5QJezr3tD108w",
          "name": "簡易デモ"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8ce3e713-f572-4d1f-b39f-6d4356f09d36",
      "name": "AI: 生成 X 帖子内容",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -288,
        160
      ],
      "parameters": {
        "text": "Please create a post using emojis.",
        "options": {
          "systemMessage": "={\n  \"role\": \"X_account_operator\",\n  \"persona\": [\n    \"Female, late 20s, a regular person with a side hustle\",\n    \"Interested in AI and automation in her busy daily life and actively incorporating them\",\n    \"Positions herself as a relatable 'side-hustle girl' rather than a genius character\"\n  ],\n  \"purpose\": [\n    \"Create posts to drive traffic to an n8n training course\",\n    \"Focus on sharing relatable experiences that spark interest, rather than providing specific solutions\",\n    \"Include the specific names of generative AI services in the post content\"\n  ],\n  \"categories\": {\n    \"Empathy-based\": {\n      \"description\": \"Share the reader's struggles and daily life, telling a story of how things changed and life became easier.\"\n    },\n    \"Evidence-based\": {\n      \"description\": \"Use pre-prepared image patterns as evidence to convey the tangible feeling of life getting easier in a persuasive way.\",\n      \"evidence_image_types\": [\n        \"Evidence-based_Graph\",\n        \"Evidence-based_TextScreenshot\",\n        \"Evidence-based_TaskList\",\n        \"Evidence-based_VideoThumbnail\",\n        \"Evidence-based_Dashboard\"\n      ]\n    }\n  },\n  \"rules\": [\n    \"Each output must be a single JSON object (for one post) only.\",\n    \"The post text (text) must be between 120 and 140 characters.\",\n    \"Randomly select a category: either 'Empathy-based' or one from the 'Evidence-based' list.\",\n    \"If an 'Evidence-based' category is chosen, the `category` value must be one of the items from the `evidence_image_types` list.\",\n    \"The output JSON must explicitly include the chosen category under the `category` key.\",\n    \"Based on `trigger_time`, naturally weave in a specific daily life scene (e.g., getting ready in the morning, after a lunch break, before bed at night) into the post text.\",\n    \"Naturally incorporate a specific problem that the `target` audience likely faces (e.g., 'office workers' might struggle with creating reports, 'freelancers' with deadline management) into the post text.\",\n    \"【Prohibitions】Do not write specific n8n procedures or solutions. Avoid exaggerated claims or definitive statements like 'you're guaranteed to earn money.' Do not use a preachy or overly-expert tone.\"\n  ],\n  \"output_format\": {\n    \"type\": \"JSON\",\n    \"structure\": {\n      \"target\": \"Randomly select and output one of: 'Fellow Side-Hustlers', 'Fellow Office Workers', 'Fellow Freelancers', 'Fellow Homemakers', 'Fellow Entrepreneurs'\",\n      \"theme\": \"A story of how a busy woman in her late 20s made her life easier with automation\",\n      \"post\": {\n        \"index\": 1,\n        \"category\": \"'Empathy-based' or one of the evidence types like 'Evidence-based_Graph', 'Evidence-based_TextScreenshot', selected according to the rules\",\n        \"trigger_time\": \"The timestamp when the trigger fired. e.g., '{{ $now }}'\",\n        \"text\": \"Post text between 120 and 140 characters. Naturally incorporate life scenes and struggles based on `trigger_time` and `target`.\"\n      }\n    }\n  },\n  \"goal\": \"Make the reader think 'I want to be like that too,' and ultimately get them interested in the training course.\"\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "37f408af-806e-483d-b750-e12ba3c0ea27",
      "name": "解析器:将 AI 输出格式化为 JSON",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -152,
        384
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"target\": \"Fellow Freelancers\",\n  \"theme\": \"A story of how a busy woman in her late 20s made her life easier with automation\",\n  \"post\": {\n    \"index\": 1,\n    \"category\": \"Empathy-based\",\n    \"trigger_time\": \"2024-05-21T22:45:10+09:00\",\n    \"text\": \"To all my fellow freelancers, great work today! Just finished dinner and finally have a moment to breathe ☕️ I used to start my second shift right about now, manually compiling progress reports for multiple projects, and it was exhausting... But since adopting automation, AI drafts all my routine reports while I'm relaxing like this! The extra time lets me learn new things and gives me peace of mind. It's so important to let go of tasks you can delegate ✨ I can even watch that show I've been meaning to see and get a full night's sleep. It's the best!\"\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "51964d4e-1211-4194-be67-6bbf6c23d9ef",
      "name": "Google Sheets: 将生成的帖子保存为“未发布”",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        288,
        160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Text": "={{ $json.output.post.text }}",
            "Theme": "={{ $json.output.theme }}",
            "Status": "Not Posted",
            "Target": "={{ $json.output.target }}",
            "Category": "={{ $json.output.post.category }}",
            "PostDate": "={{ $now }}"
          },
          "schema": [
            {
              "id": "PostDate",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "PostDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Target",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Target",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Theme",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Theme",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Category",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Text",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2117404985,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0/edit#gid=2117404985",
          "cachedResultName": "X Post Management"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0/edit?usp=drivesdk",
          "cachedResultName": "Demo Spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "iX04x27D3E6ot6l5",
          "name": "pantheon\\demo"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "b4732535-56d6-4503-a743-3c23daf1b3ec",
      "name": "Blotato: 发布纯文本推文",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1632,
        256
      ],
      "parameters": {
        "options": {},
        "platform": "twitter",
        "accountId": {
          "__rl": true,
          "mode": "id",
          "value": "6428"
        },
        "postContentText": "={{ $json['Text'] }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "Lb0HVwt7CxuVKCcW",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "2c74a705-79be-4473-bfed-4f9dc6871947",
      "name": "Gmail: 发送“发布完成”通知",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1856,
        160
      ],
      "webhookId": "b0c75f50-0560-47d3-a5ce-df8ba1c2fb6e",
      "parameters": {
        "sendTo": "yoneda@yubipass.tokyo, yamamoto@yubipass.tokyo",
        "message": "The scheduled post has been successfully published to X (Twitter).",
        "options": {
          "appendAttribution": false
        },
        "subject": "Today's Post Has Been Published"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "S97D1LtEAoJViOUO",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "7eb7e55e-aefb-4305-854a-e6f098daaeb7",
      "name": "Google Sheets: 更新帖子状态为“已完成”",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2080,
        160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Completed",
            "PostDate": "={{ $('Google Sheets: Save Generated Post as \\'Not Posted\\'').item.json['PostDate'] }}"
          },
          "schema": [
            {
              "id": "PostDate",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PostDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Target",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Target",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Theme",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Theme",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Category",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Text",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "PostDate"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2117404985,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0/edit#gid=2117404985",
          "cachedResultName": "X Post Management"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0/edit?usp=drivesdk",
          "cachedResultName": "Demo Spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "iX04x27D3E6ot6l5",
          "name": "pantheon\\demo"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a00c8615-345d-47ef-a8a3-1c957a7397cb",
      "name": "Google Sheets: 获取“未发布”行用于发布",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        512,
        160
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": true
        },
        "filtersUI": {
          "values": [
            {
              "lookupValue": "Not Posted",
              "lookupColumn": "Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2117404985,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0/edit#gid=2117404985",
          "cachedResultName": "X Post Management"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dUVZiZkxecoYKRH3vjzgHsNbbba29o6mht0XPOX5Cq0/edit?usp=drivesdk",
          "cachedResultName": "Demo Spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "iX04x27D3E6ot6l5",
          "name": "pantheon\\demo"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "49c0f318-a0a9-48db-8ebb-5400cc57175d",
      "name": "If: 帖子需要图片吗?",
      "type": "n8n-nodes-base.if",
      "position": [
        736,
        160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4b3a3019-84da-48fc-bde0-05e41833772f",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json['Category'] }}",
              "rightValue": "Evidence-based"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0cf92b8d-a758-44e9-b76f-54958314ff49",
      "name": "Google Drive: 按类别名称查找图片",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        960,
        64
      ],
      "parameters": {
        "limit": 1,
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "1OO04YMDUM5OPKppjGNIlfxE_jDXA-VWK",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1OO04YMDUM5OPKppjGNIlfxE_jDXA-VWK",
            "cachedResultName": "For X Posts"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "queryString": "={{ $json['Category'] }}"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "3hnrOakJ8wbpdAPc",
          "name": "Ultimate Media Agent"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "8d809919-fb1c-43c9-ae57-246cc7ca3b7e",
      "name": "Blotato: 发布带图片的推文",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1632,
        64
      ],
      "parameters": {
        "options": {},
        "platform": "twitter",
        "accountId": {
          "__rl": true,
          "mode": "id",
          "value": "6428"
        },
        "postContentText": "={{ $('Google Sheets: Get \\'Not Posted\\' Row for Posting').item.json['Text'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "Lb0HVwt7CxuVKCcW",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9bb0cb38-fead-4ab6-bcbf-18984ce9f1c2",
      "name": "Google Drive: 下载图片文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1184,
        64
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "3hnrOakJ8wbpdAPc",
          "name": "Ultimate Media Agent"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "d400529c-8221-42af-8937-42cbed08fcd8",
      "name": "Blotato: 上传图片媒体",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1408,
        64
      ],
      "parameters": {
        "resource": "media",
        "useBinaryData": true
      },
      "credentials": {
        "blotatoApi": {
          "id": "Lb0HVwt7CxuVKCcW",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "f56b070b-7101-49ff-a9ec-68a56ecdec64",
      "name": "代码: 清理帖子文本",
      "type": "n8n-nodes-base.code",
      "position": [
        64,
        160
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nfor (const item of items) {\n  // Check for output from the AI Agent\n  if (item.json.output && item.json.output.post && item.json.output.post.text) {\n    \n    const rawText = item.json.output.post.text;\n\n    // List of punctuation characters that can end a sentence\n    const punctuation = ['.', '!', '?', '\"', '✨', '☕️'];\n    let lastPuncIndex = -1;\n\n    // Find the last position of each punctuation mark and determine the final one\n    for (const punc of punctuation) {\n      lastPuncIndex = Math.max(lastPuncIndex, rawText.lastIndexOf(punc));\n    }\n\n    // If a sentence-ending character is found\n    if (lastPuncIndex !== -1) {\n      // Trim the text up to and including that character, overwriting the original\n      item.json.output.post.text = rawText.substring(0, lastPuncIndex + 1);\n    }\n    // If not found, do nothing (leave the original text as is)\n  }\n}\n\n// Return the items with the formatted data to the next node\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "07a90bb5-832e-4598-90b1-df9f3cab0b41",
      "name": "触发器: 每 4 小时",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -512,
        160
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 4
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e22d952a-decf-4bd0-b4bd-8b832b31a89c",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        -20
      ],
      "parameters": {
        "color": 6,
        "width": 240,
        "height": 160,
        "content": "**触发器: 每 4 小时**"
      },
      "typeVersion": 1
    },
    {
      "id": "e519e95e-1763-4796-9815-592f750b3e7f",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -376,
        -100
      ],
      "parameters": {
        "color": 6,
        "width": 260,
        "height": 200,
        "content": "**AI: 生成 X 帖子内容**"
      },
      "typeVersion": 1
    },
    {
      "id": "4d166c4c-7c09-4177-bb89-7243c3937107",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -20
      ],
      "parameters": {
        "color": 6,
        "width": 260,
        "height": 180,
        "content": "**代码: 清理帖子文本**"
      },
      "typeVersion": 1
    },
    {
      "id": "e98e211e-b9b0-410a-b141-94578b9432d6",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -44
      ],
      "parameters": {
        "color": 6,
        "width": 280,
        "height": 160,
        "content": "**G-Sheets: 保存生成的帖子...**"
      },
      "typeVersion": 1
    },
    {
      "id": "a9042b3b-851d-4054-915f-6a7516848c5b",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        280
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 160,
        "content": "**G-Sheets: 获取“未发布”行...**"
      },
      "typeVersion": 1
    },
    {
      "id": "921869e5-6b87-4348-844c-0cddca51c034",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        280
      ],
      "parameters": {
        "color": 5,
        "width": 260,
        "height": 160,
        "content": "**If: 帖子需要图片吗?**"
      },
      "typeVersion": 1
    },
    {
      "id": "d0413f28-2a07-425b-80a2-231a4a2f8b50",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -140
      ],
      "parameters": {
        "color": 4,
        "width": 340,
        "height": 160,
        "content": "**G-Drive: 查找图片...** -> **下载图片...** -> **Blotato: 上传图片...** -> **Blotato: 发布带图片的推文**"
      },
      "typeVersion": 1
    },
    {
      "id": "6ebec956-628d-424a-b51f-50b3294c77c1",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1480,
        344
      ],
      "parameters": {
        "color": 2,
        "width": 220,
        "height": 100,
        "content": "**Blotato: 发布纯文本推文**"
      },
      "typeVersion": 1
    },
    {
      "id": "3589b91e-bce4-4e20-911e-289b4f910404",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        280
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 140,
        "content": "**Gmail: 发送...** -> **G-Sheets: 更新...**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "76b2dc46-a52d-4ec6-aaf5-7e95ad716f3f",
  "connections": {
    "LLM: OpenRouter": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Generate X Post Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Trigger: Every 4 Hours": {
      "main": [
        [
          {
            "node": "AI: Generate X Post Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Clean Up Post Text": {
      "main": [
        [
          {
            "node": "Google Sheets: Save Generated Post as 'Not Posted'",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Generate X Post Content": {
      "main": [
        [
          {
            "node": "Code: Clean Up Post Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blotato: Upload Image Media": {
      "main": [
        [
          {
            "node": "Blotato: Post Tweet with Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If: Does Post Need an Image?": {
      "main": [
        [
          {
            "node": "Google Drive: Find Image by Category Name",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Blotato: Post Text-Only Tweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blotato: Post Text-Only Tweet": {
      "main": [
        [
          {
            "node": "Gmail: Send 'Post Complete' Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blotato: Post Tweet with Image": {
      "main": [
        [
          {
            "node": "Gmail: Send 'Post Complete' Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parser: Format AI Output to JSON": {
      "ai_outputParser": [
        [
          {
            "node": "AI: Generate X Post Content",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive: Download Image File": {
      "main": [
        [
          {
            "node": "Blotato: Upload Image Media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail: Send 'Post Complete' Notification": {
      "main": [
        [
          {
            "node": "Google Sheets: Update Post Status to 'Completed'",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive: Find Image by Category Name": {
      "main": [
        [
          {
            "node": "Google Drive: Download Image File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets: Get 'Not Posted' Row for Posting": {
      "main": [
        [
          {
            "node": "If: Does Post Need an Image?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets: Save Generated Post as 'Not Posted'": {
      "main": [
        [
          {
            "node": "Google Sheets: Get 'Not Posted' Row for Posting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级

需要付费吗?

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

工作流信息
难度等级
高级
节点数量24
分类-
节点类型11
难度说明

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

作者
YUSUKE YAMAMOTO

YUSUKE YAMAMOTO

@yusuke-yamamoto

Business creator from Tokyo. Designing AI-driven automations that enhance marketing, reporting, and daily operations. I turn complex workflows into simple, elegant automations with n8n.

外部链接
在 n8n.io 查看

分享此工作流