8
n8n 中文网amn8n.com

💥 使用 Blotato 和 Sora 2 为电商生成 UGC 推广视频

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 34 个节点。主要使用 If, Set, Code, Wait, Merge 等节点。 使用 OpenAI、Sora 2 和 Blotato 为电商生成 UGC 推广视频

前置要求
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "do5lGSCHCPT5YhMr",
  "meta": {
    "instanceId": "de822f81f3a2367cef7d9549771a77783236bc9596481be2ae65c05fbcc4b4fd",
    "templateCredsSetupCompleted": true
  },
  "name": "💥 使用 Blotato 和 Sora 2 为电商生成 UGC 推广视频",
  "tags": [],
  "nodes": [
    {
      "id": "9e45bc31-7369-48b0-8d37-93cf2faa5418",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -25824,
        2112
      ],
      "webhookId": "f923f8b2-db4f-4e83-bf4c-f4567278577e",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "zgSdbTYtyudxXPgU",
          "name": "Telegram_sora2"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d118bd83-021e-470c-b6e2-f45fdced945b",
      "name": "工作流配置",
      "type": "n8n-nodes-base.set",
      "position": [
        -25504,
        2112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-4",
              "name": "maxPollingAttempts",
              "type": "number",
              "value": 20
            },
            {
              "id": "id-5",
              "name": "falApiKey",
              "type": "string",
              "value": "YOUR_API_falApiKey"
            },
            {
              "id": "8b717e51-3c27-4787-b358-019f1438ea6c",
              "name": "Model",
              "type": "string",
              "value": "sora-2"
            },
            {
              "id": "c48eceea-cfec-4a6f-a379-127a3af40ad2",
              "name": "aspect_ratio",
              "type": "string",
              "value": "9:16"
            },
            {
              "id": "385e9561-7491-4df9-8f92-10b1a70180a8",
              "name": "duration",
              "type": "string",
              "value": "12"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "f6b90f3d-c3a2-4ac4-94ec-dbcad40cc333",
      "name": "解析脚本响应",
      "type": "n8n-nodes-base.code",
      "position": [
        -24256,
        2112
      ],
      "parameters": {
        "jsCode": "const response = $input.first().json;\nconst chatId = $('Extract Photo and text').first().json?.message?.chat?.id;\n\nif (!chatId) {\n  throw new Error('Chat ID not found in workflow data');\n}\n\n// OpenAI node with JSON output returns parsed object directly in message.content\nconst scriptContent = response?.message?.content || response?.content || {};\n\nreturn [{\n  json: {\n    script: JSON.stringify(scriptContent),\n    frames: scriptContent.frames || [],\n    hashtags: scriptContent.hashtags || [],\n    chatId: chatId\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "5ab4832e-f0f0-48c6-961e-066ef12b23a9",
      "name": "提交到 Sora 2 API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -25824,
        2416
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/sora-2/image-to-video",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"prompt\": \"{{ JSON.stringify($('Parse Script Response').first().json.script.replaceAll(/\\\\n/g, '')).slice(1, -1) }}\",\n  \"resolution\": \"auto\",\n  \"aspect_ratio\": \"9:16\",\n  \"duration\": {{ $('Workflow Configuration').item.json.duration }},\n  \"image_url\": \"{{ $json.data.url.replace(/^http:\\/\\/tmpfiles\\.org\\/(\\d+)\\/(.*)$/i, 'https://tmpfiles.org/dl/$1/$2') }}\"\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Key ' + $('Workflow Configuration').first().json.falApiKey }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "14948abc-ed10-44d4-92c8-02ccc2c6c207",
      "name": "提取视频作业 ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -25600,
        2416
      ],
      "parameters": {
        "jsCode": "const response = $input.first().json;\nconst chatId = $('Extract Photo and text').first().json?.message?.chat?.id;\n\nif (!response?.request_id) {\n  throw new Error('Request ID not found in API response');\n}\n\nif (!chatId) {\n  throw new Error('Chat ID not found in workflow data');\n}\n\nreturn [{\n  json: {\n    requestId: response.request_id,\n    chatId: chatId,\n    pollingAttempt: 0\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "1522a6fd-be95-4fe2-910f-57e60e19ac64",
      "name": "等待 15 秒",
      "type": "n8n-nodes-base.wait",
      "position": [
        -25376,
        2416
      ],
      "webhookId": "541fabb9-5832-4085-a6a1-67cb764cd9ca",
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "4f83db5c-7a5a-4fc9-9a5a-a1239caa6c57",
      "name": "检查视频状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -25152,
        2416
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/sora-2/requests/{{ $json.requestId }}/status",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Key ' + $('Workflow Configuration').first().json.falApiKey }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ad3a9068-d0f2-4982-8093-bf8d4c332409",
      "name": "解析状态响应",
      "type": "n8n-nodes-base.code",
      "position": [
        -24928,
        2416
      ],
      "parameters": {
        "jsCode": "const response = $input.first().json;\nconst previousData = $('Extract Video Job ID').first().json;\n\nif (!previousData) {\n  throw new Error('Previous polling data not found');\n}\n\nreturn [{\n  json: {\n    status: response?.status || 'UNKNOWN',\n    videoUrl: response?.video?.url || null,\n    requestId: previousData.requestId,\n    chatId: previousData.chatId,\n    pollingAttempt: (previousData.pollingAttempt || 0) + 1\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "d684fc56-82ab-4c97-b53f-4068526a9f6d",
      "name": "检查是否完成",
      "type": "n8n-nodes-base.if",
      "position": [
        -24256,
        2416
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse Status Response').item.json.status }}",
              "rightValue": "COMPLETED"
            },
            {
              "id": "id-2",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse Status Response').item.json.status }}",
              "rightValue": "succeeded"
            },
            {
              "id": "id-3",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $('Parse Status Response').item.json.pollingAttempt }}",
              "rightValue": "={{ $('Workflow Configuration').first().json.maxPollingAttempts }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "631abf93-a412-4769-9161-941e666fb3bb",
      "name": "下载视频文件",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -23808,
        2400
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/sora-2/requests/{{ $json.requestId }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Key ' + $('Workflow Configuration').first().json.falApiKey }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9c4e387d-d47b-44b2-9fd4-2b08cf029a43",
      "name": "发送视频到 Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -25296,
        2864
      ],
      "webhookId": "d9da2536-a395-44dd-b680-5de6163e36cb",
      "parameters": {
        "file": "={{ $json.video.url }}",
        "chatId": "={{ $('Telegram Trigger').first().json.message.chat.id }}",
        "operation": "sendVideo",
        "additionalFields": {
          "caption": "=Your UGC video is ready! 🎥  {{ $json.video.url }}"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "zgSdbTYtyudxXPgU",
          "name": "Telegram_sora2"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2dad18e3-3b7a-47f6-b948-4c327fa60c1d",
      "name": "发送错误消息",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -24016,
        2432
      ],
      "webhookId": "4df1ee60-06c0-4389-afb0-f6002132b0aa",
      "parameters": {
        "text": "Video generation timed out or failed. Please try again with a different product image or description.",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "zgSdbTYtyudxXPgU",
          "name": "Telegram_sora2"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "dcfa0e97-1b56-48a4-aacc-bf0f7dfb1257",
      "name": "分析产品图像(Vision API)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -24832,
        2112
      ],
      "parameters": {
        "text": "=Analyze this product image and extract: 1) Product name and category, 2) Key features and benefits, 3) Target audience, 4) Visual elements (colors, style, packaging). Promotion objective: {{ $('Extract Photo and text').item.json.promotionText }}",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "resource": "image",
        "inputType": "base64",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "id": "QmtwfFk8iBkuCXOX",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "918f735a-2b6a-4515-8c6f-61778196300f",
      "name": "从 Telegram 获取照片文件",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -25056,
        2112
      ],
      "webhookId": "8f993dc8-22f5-4b69-99e4-b16c0f6487ab",
      "parameters": {
        "fileId": "={{ $json.photoUrl }}",
        "resource": "file",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "zgSdbTYtyudxXPgU",
          "name": "Telegram_sora2"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9cae8d6a-31a4-462d-8482-93ac5b591125",
      "name": "提取照片和文本",
      "type": "n8n-nodes-base.set",
      "position": [
        -25280,
        2112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "photoUrl",
              "type": "string",
              "value": "={{ $json.message.photo ? $json.message.photo[$json.message.photo.length - 1].file_id : '' }}"
            },
            {
              "id": "id-2",
              "name": "promotionText",
              "type": "string",
              "value": "={{ $json.message.caption || $json.message.text }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "ea8c58ec-28d1-47ac-b891-5f520a197d47",
      "name": "生成 UGC 脚本(OpenAI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -24608,
        2112
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4o-mini"
        },
        "options": {
          "temperature": 0.8
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a UGC video script writer. Create a 12-second video script with frame-by-frame breakdown, natural dialogue, camera movements, and captions. Format as JSON with fields: frames (array of {timestamp, scene, dialogue, camera, caption}), hashtags (array)."
            },
            {
              "content": "={{ 'Product Analysis: ' + $json.content + '\\n\\nPromotion Objective: ' + $('Extract Photo and text').first().json.promotionText + '\\n\\nCreate a compelling 12-second UGC video script.' }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "QmtwfFk8iBkuCXOX",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "cf8da3a8-e430-42b9-bcbe-d771ff736a85",
      "name": "构建公共图像 URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -24832,
        1952
      ],
      "parameters": {
        "url": "https://tmpfiles.org/api/v1/upload",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e8db0d52-21e4-47a1-bf83-2b90fadeeddd",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        -23824,
        2096
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "34552393-86ff-4988-b40a-dae3c0d0d34b",
      "name": "步骤 5 - 发布",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -25904,
        2672
      ],
      "parameters": {
        "color": 5,
        "width": 2220,
        "height": 404,
        "content": "# 📤 步骤 5:发布与跟踪"
      },
      "typeVersion": 1
    },
    {
      "id": "cb7916cc-10d4-435d-a893-6d6a613811b5",
      "name": "上传视频到 BLOTATO",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -24720,
        2864
      ],
      "parameters": {
        "mediaUrl": "={{ $('Download Video File').item.json.video.url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "id": "wozsYJYLfCZO37j8",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "8fa12c0b-cceb-4ef0-80d4-533435d017f1",
      "name": "YouTube",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -24192,
        2864
      ],
      "parameters": {
        "options": {},
        "platform": "youtube",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "8047",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/8047",
          "cachedResultName": "DR FIRASS (Dr. Firas)"
        },
        "postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
        "postContentMediaUrls": "={{ $json.url }}",
        "postCreateYoutubeOptionTitle": "={{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[0] }}",
        "postCreateYoutubeOptionPrivacyStatus": "private",
        "postCreateYoutubeOptionShouldNotifySubscribers": false
      },
      "credentials": {
        "blotatoApi": {
          "id": "wozsYJYLfCZO37j8",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c85dd58e-e7c3-49fe-bc5b-56db1931ce02",
      "name": "TikTok",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -24512,
        2704
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "2079",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/2079",
          "cachedResultName": "elitecybzcs"
        },
        "postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "wozsYJYLfCZO37j8",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7862107b-f886-4d41-8f2e-0523f7a8f2ce",
      "name": "LinkedIn",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -24352,
        2704
      ],
      "parameters": {
        "options": {},
        "platform": "linkedin",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1446",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1446",
          "cachedResultName": "Samuel Amalric"
        },
        "postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "wozsYJYLfCZO37j8",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "6cd5c506-f060-4d32-8425-383ff2b030b7",
      "name": "Facebook",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -24192,
        2704
      ],
      "parameters": {
        "options": {},
        "platform": "facebook",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "facebookPageId": {
          "__rl": true,
          "mode": "list",
          "value": "101603614680195",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759/subaccounts/101603614680195",
          "cachedResultName": "Dr. Firas"
        },
        "postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "wozsYJYLfCZO37j8",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "6560abd1-2f85-492b-bd6c-22b80dff52d1",
      "name": "Instagram",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -24512,
        2864
      ],
      "parameters": {
        "options": {},
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1687",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1687",
          "cachedResultName": "acces.a.vie"
        },
        "postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "wozsYJYLfCZO37j8",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9d7bce3c-c612-4f2d-aee0-04cd913a95b0",
      "name": "Twitter (X)",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -24352,
        2864
      ],
      "parameters": {
        "options": {},
        "platform": "twitter",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1289",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1289",
          "cachedResultName": "Docteur_Firas"
        },
        "postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "wozsYJYLfCZO37j8",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
      "name": "合并1",
      "type": "n8n-nodes-base.merge",
      "position": [
        -23984,
        2720
      ],
      "parameters": {
        "mode": "chooseBranch",
        "numberInputs": 6
      },
      "typeVersion": 3.2
    },
    {
      "id": "4ae0f34b-7d81-426c-9b8f-4a01ad24409a",
      "name": "发送文本消息",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -23824,
        2784
      ],
      "webhookId": "fe254b6f-f102-4441-96a6-d80efe3c766d",
      "parameters": {
        "text": "Published",
        "chatId": "={{ $('Telegram Trigger').first().json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "zgSdbTYtyudxXPgU",
          "name": "Telegram_sora2"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "41eb8c26-670d-4940-9bc9-ba90613e74c2",
      "name": "使用 GPT-4 生成标题",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -25072,
        2864
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4o-mini"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Create an engaging TikTok caption for a video about: {{ $('Telegram Trigger').first().json.message.caption }}\n\nBased on these trends: {{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[0] }}{{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[1] }}{{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[2] }}\n\nRequirements:\n- Catchy hook in first line\n- Include 5-8 relevant trending hashtags\n- Keep it concise and engaging\n- Optimize for TikTok algorithm\n- Return ONLY the caption text with hashtags, nothing else"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "QmtwfFk8iBkuCXOX",
          "name": "n8n free OpenAI API credits"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "ac940182-725e-4875-be7a-45f874be7f7b",
      "name": "步骤 1 - Telegram 设置",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -25408,
        1120
      ],
      "parameters": {
        "color": 3,
        "width": 420,
        "height": 820,
        "content": "# 📱 步骤 1:TELEGRAM 机器人设置"
      },
      "typeVersion": 1
    },
    {
      "id": "41d17c01-3d6b-4390-a3e0-ddbe5e1e011c",
      "name": "步骤 2 - 配置",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -24976,
        1120
      ],
      "parameters": {
        "color": 6,
        "width": 420,
        "height": 820,
        "content": "# ⚙️ 步骤 2:API 密钥配置"
      },
      "typeVersion": 1
    },
    {
      "id": "334f22f1-d976-4c69-9d08-803a94e395eb",
      "name": "步骤 3 - AI 分析",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -24544,
        1120
      ],
      "parameters": {
        "color": 5,
        "width": 420,
        "height": 820,
        "content": "# 🤖 步骤 3:AI 分析与脚本生成"
      },
      "typeVersion": 1
    },
    {
      "id": "76c4ca21-2f00-4ecc-ac7b-1fbb05f2b8df",
      "name": "步骤 4 - 视频生成",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -24112,
        1120
      ],
      "parameters": {
        "color": 7,
        "width": 420,
        "height": 820,
        "content": "# 🎥 步骤 4:使用 SORA 2 生成视频"
      },
      "typeVersion": 1
    },
    {
      "id": "3cab5acb-c563-4dd6-bea5-8e379eb184d3",
      "name": "工作流概览",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -25904,
        1120
      ],
      "parameters": {
        "color": 4,
        "width": 480,
        "height": 816,
        "content": "# 🎬 自动化 UGC 视频生成器"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5bc27066-9611-429d-b92c-0322e7781b5d",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Submit to Sora 2 API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tiktok": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Youtube": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 5
          }
        ]
      ]
    },
    "Facebook": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Linkedin": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Instagram": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Twitter (X)": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "Wait 15 Seconds": {
      "main": [
        [
          {
            "node": "Check Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Complete": {
      "main": [
        [
          {
            "node": "Download Video File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 15 Seconds",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Status": {
      "main": [
        [
          {
            "node": "Parse Status Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Video File": {
      "main": [
        [
          {
            "node": "Send Video to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Video Job ID": {
      "main": [
        [
          {
            "node": "Wait 15 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit to Sora 2 API": {
      "main": [
        [
          {
            "node": "Extract Video Job ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Script Response": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Parse Status Response": {
      "main": [
        [
          {
            "node": "Check If Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Public Image URL": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Photo and text": {
      "main": [
        [
          {
            "node": "Get Photo File from Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Video to Telegram": {
      "main": [
        [
          {
            "node": "Generate Caption with GPT-4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Extract Photo and text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video to BLOTATO": {
      "main": [
        [
          {
            "node": "Tiktok",
            "type": "main",
            "index": 0
          },
          {
            "node": "Linkedin",
            "type": "main",
            "index": 0
          },
          {
            "node": "Facebook",
            "type": "main",
            "index": 0
          },
          {
            "node": "Instagram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Twitter (X)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Youtube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Caption with GPT-4": {
      "main": [
        [
          {
            "node": "Upload Video to BLOTATO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate UGC Script (OpenAI)": {
      "main": [
        [
          {
            "node": "Parse Script Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Photo File from Telegram": {
      "main": [
        [
          {
            "node": "Analyze Product Image (Vision API)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Build Public Image URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Product Image (Vision API)": {
      "main": [
        [
          {
            "node": "Generate UGC Script (OpenAI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Dr. Firas

Dr. Firas

@drfiras

Automation expert and certified trainer. I create hands-on courses to master automation with n8n. Contact me to access my exclusive training and start building powerful workflows today. 🚀

外部链接
在 n8n.io 查看

分享此工作流