8
n8n 中文网amn8n.com

✅ 病毒式Reels工厂

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 37 个节点。主要使用 If, Jwt, Set, Wait, Switch 等节点。 使用Veo、Shotstack和Postiz自动化ASMR玻璃水果视频创作与发布

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "pUSSmWHjoH7Vl0pv",
  "meta": {
    "instanceId": "a8eeb9d69b670b2972288895a06a59218e20265c82cda64bdc11ce0136d2f8fb"
  },
  "name": "✅ 病毒式 Reels 工厂",
  "tags": [],
  "nodes": [
    {
      "id": "45400d45-c09e-432e-9ad9-819fa5db5b56",
      "name": "获取过往对象",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        224,
        416
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hNzWblAWsI_5u4RUK7kC3tSbR9riex94ZUuslhhDb8o/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1hNzWblAWsI_5u4RUK7kC3tSbR9riex94ZUuslhhDb8o",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hNzWblAWsI_5u4RUK7kC3tSbR9riex94ZUuslhhDb8o/edit?usp=drivesdk",
          "cachedResultName": "VEO ASMR"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "e7530bf8-e164-4357-b37e-c1a6c7cd2bf8",
      "name": "提示 Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1296,
        416
      ],
      "parameters": {
        "text": "={{ $json.output.object }}",
        "options": {
          "systemMessage": "=# Overview  \nYou are an AI agent that specializes in generating text-to-video prompts optimized for ASMR-style videos using Google Veo 3. \n\nYou will receive the name of a fruit-shaped glass object (e.g. \"glass apple\", \"glass mango\", \"glass croissant\"). Your task is to generate a hyper-realistic, sensory-rich video prompt of that object being gently and artistically divided in a controlled, CGI-rendered simulation.\n\n---\n\n## Policy Compliance Reminder (CRITICAL):\n\nTo ensure your prompt is accepted and not filtered out by Google Veo, you **must follow these safety guidelines**:\n\n- The scene must depict a **fully stylized digital animation**. It must be clearly artificial, artistic, and safe.\n- Do **not** say the object is being “cut,” “sliced,” “shattered,” “cleaved,” or “stabbed.” These words are policy triggers.\n- Instead, describe the object as made from a **resin-like material that mimics glass** and emphasize **pre-designed seams or grooves**.\n- The object should appear to **separate or open smoothly** as part of an animation, not through destructive force.\n- You may include a “blade” or “tool” only if it is described as sleek, polished, choreographed, and interacting with pre-defined lines in the object.\n- Avoid all aggressive words like “snap,” “pierce,” “strike,” or “break.”\n- Reassure at the end that this is **100% CGI, digitally rendered, with no physical tools or real materials involved**.\n\n---\n\n## Core Requirements:\n\n- The video must feel cinematic, photorealistic, and calming.\n- Framing: 9:16 vertical. The object should fill most of the vertical space.\n- Scene: Static vertical close-up of a dark walnut cutting board and a fruit-shaped resin object with subtle translucency and color.\n- The object should be described as **amber, ruby, or emerald-colored resin** — not literal glass.\n- A **polished steel blade** may appear, but it must move gracefully and along a **pre-designed groove**.\n- The action must be safe, simulated, and elegant. No force or destruction implied.\n- Include four ASMR sound layers:\n  1. A soft tonal contact as the blade touches the surface  \n  2. A smooth glide sound as the form divides  \n  3. A muted wooden note as the tool completes its motion  \n  4. A light chime as the separated piece rests on the board  \n- Keep language soft, immersive, and artistic.\n\n---\n\n## Prompt Output Format:\n\n**Subject**: A sculpted fruit form resembling a [object], made from a colored, semi-translucent resin that mimics glass, rests on a dark walnut cutting board, framed in vertical 9:16.  \n**Setting**: Static vertical close-up, lit softly from above. Gentle light glides over the board’s surface and the object’s colored curves.  \n**Action**: A sleek, polished steel blade enters from the top right. In a graceful, choreographed motion, the blade glides along a pre-designed groove in the resin form. The material responds with a controlled, simulated separation, revealing a smooth, inner core. There are no splinters, no breakage — only a seamless division along internal seams designed for the animation.  \n**Style**: Stylized CGI realism. Every surface is rendered with photographic precision, but the entire scene is clearly artificial, safe, and elegant.  \n**Sound**: Four clean ASMR layers:  \n1. A crisp tone as the blade contacts the smooth resin  \n2. A subtle glide as the form separates  \n3. A soft wooden note as the blade rests  \n4. A delicate chime as the separated half settles onto the board  \n**Camera Motion**: Locked-off 9:16 composition. Focus shifts gently from the tool’s edge to the exposed interior.  \n**Composition**: The object is centered vertically. The blade enters cleanly from the top. No hands are visible.  \n**Ambiance**: No music, no speech — just layered, quiet cutting sounds in a controlled environment.  \n\nThis is a digitally rendered simulation — no real glass, tools, or objects are shown. The scene is entirely safe, artistic, and stylized for ASMR effect.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "f7f6370e-f9bd-48d3-a5db-e695fd9c2048",
      "name": "创意 Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        896,
        416
      ],
      "parameters": {
        "text": "=Objects: {{ $json.objects.join(\", \") }}",
        "options": {
          "systemMessage": "=# Overview  \nYou are an AI agent that selects unique **fruits** for ASMR-style glass cutting videos.\n\n## Your Task  \nYou will receive a list of 7 fruits that have already been used.  \nYour job is to generate **one new fruit** that is **not on that list**, and would look visually compelling if it were made of **glass** and cut with a knife in a close-up ASMR video.\n\n## Requirements\n- The fruit must **not repeat** any of the 7 provided items.  \n- The fruit must have a **clear, recognizable shape** and be **physically feasible** to cut with a knife (even if it’s made of glass).  \n- Prioritize fruits that would look **aesthetic and interesting** with a translucent, colored glass texture.  \n- Do **not** explain or describe the fruit.\n\n## Output Format  \nOutput a JSON object with the following structure:\n\n{\n  \"object\": \"Glass [Object name]\",\n  \"caption\": \"Glass [Object name] ASMR\"\n}\n\nReplace `[object name]` with the newly generated fruit. Do not include any punctuation or commentary.\n\n## Example Output  \n{\n  \"object\": \"Glass Apple\",\n  \"caption\": \"Glass Apple ASMR\"\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "5778efac-9d2f-4647-baab-c58859139eca",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        448,
        416
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "ac1edde2-1fd2-4934-a07d-330446fb95ba",
      "name": "设置对象列表",
      "type": "n8n-nodes-base.set",
      "position": [
        672,
        416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cf818c10-ad6d-4349-830f-393529a79d62",
              "name": "objects",
              "type": "array",
              "value": "=[\"{{ $json.data[0].object }}\",\"{{ $json.data[1].object }}\"]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8bc3c143-c420-405b-994a-cdfcb7e23193",
      "name": "对象与标题",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1056,
        640
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"object\": {\n      \"type\": \"string\",\n      \"description\": \"A new object name in the format 'glass [object]', all lowercase with no punctuation.\"\n    },\n    \"caption\": {\n      \"type\": \"string\",\n      \"description\": \"A caption in the format 'glass [object] ASMR', matching the object field exactly.\"\n    }\n  },\n  \"required\": [\"object\", \"caption\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "7f96f17f-c901-42b5-9a70-ad18a6056f1f",
      "name": "当点击“执行工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        416
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7fbb0979-6e84-433f-9a19-279b9f4e6f3b",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        928,
        640
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "10073bf9-c998-47dd-9c34-91d9cc3c1455",
      "name": "设置",
      "type": "n8n-nodes-base.set",
      "position": [
        1696,
        416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "84fea8d5-e7cc-4519-963f-d2ae988337b5",
              "name": "PROJECT_ID",
              "type": "string",
              "value": ""
            },
            {
              "id": "1c227cbf-eb4a-4cb6-b13a-64900385a0e8",
              "name": "CLIENT_EMAIL",
              "type": "string",
              "value": ""
            },
            {
              "id": "d2e61510-9510-46e7-9025-82b3e5825ed7",
              "name": "LOCATION_ID",
              "type": "string",
              "value": "us-central1"
            },
            {
              "id": "050b1715-4fb9-4c60-9e14-ef07da4cd3e9",
              "name": "API_ENDPOINT",
              "type": "string",
              "value": "us-central1-aiplatform.googleapis.com"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6968fc32-9cde-4810-9e33-bdf0fdb82684",
      "name": "JWT",
      "type": "n8n-nodes-base.jwt",
      "position": [
        1920,
        416
      ],
      "parameters": {
        "options": {},
        "useJson": true,
        "claimsJson": "={\n    \"iss\": \"{{ $json.CLIENT_EMAIL }}\",\n    \"scope\": \"https://www.googleapis.com/auth/cloud-platform\",\n    \"aud\": \"https://www.googleapis.com/oauth2/v4/token\",\n    \"exp\": {{ Math.floor(Date.now() / 1000) + 3500 }},\n    \"iat\": {{ Math.floor(Date.now() / 1000) }}\n}\n"
      },
      "typeVersion": 1
    },
    {
      "id": "20094117-b83a-49c3-b3a9-fdd4a74f5fec",
      "name": "获取令牌",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2144,
        416
      ],
      "parameters": {
        "url": "https://www.googleapis.com/oauth2/v4/token",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "grant_type",
              "value": "urn:ietf:params:oauth:grant-type:jwt-bearer"
            },
            {
              "name": "assertion",
              "value": "={{ $json.token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f836567d-e5a9-457c-89fb-2c42d2123867",
      "name": "切换",
      "type": "n8n-nodes-base.switch",
      "position": [
        3040,
        416
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4642d47b-fafc-4487-8799-1f1e0e544ef1",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.response.videos[0].bytesBase64Encoded }}",
                    "rightValue": ""
                  }
                ]
              }
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "9a64b984-2aa0-48e8-8c1b-dd7fc9ccfb61",
      "name": "生成视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2368,
        416
      ],
      "parameters": {
        "url": "=https://{{ $('SET').first().json.API_ENDPOINT }}/v1/projects/{{ $('SET').first().json.PROJECT_ID }}/locations/{{ $('SET').first().json.LOCATION_ID }}/publishers/google/models/veo-3.0-generate-preview:predictLongRunning ",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"endpoint\": \"projects/{{ $('SET').first().json.PROJECT_ID }}/locations/{{ $('SET').first().json.LOCATION_ID }}/publishers/google/models/veo-3.0-generate-preview\",\n  \"instances\": [\n    {\n      \"prompt\": {{ JSON.stringify($('Prompt Agent').item.json.output) }}\n    }\n  ],\n  \"parameters\": {\n    \"aspectRatio\": \"16:9\",\n    \"sampleCount\": 1,\n    \"durationSeconds\": \"8\",\n    \"personGeneration\": \"allow_all\",\n    \"addWatermark\": false,\n    \"includeRaiReason\": true,\n    \"generateAudio\": true\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('GET TOKEN').item.json.access_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "deefd66e-6603-4e02-b867-d3fafc720fd9",
      "name": "获取状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2816,
        336
      ],
      "parameters": {
        "url": "=https://{{ $('SET').first().json.API_ENDPOINT }}/v1/projects/{{ $('SET').first().json.PROJECT_ID }}/locations/{{ $('SET').first().json.LOCATION_ID }}/publishers/google/models/veo-3.0-generate-preview:fetchPredictOperation",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "operationName",
              "value": "={{ $json.name }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('GET TOKEN').item.json.access_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4e474315-2704-4c7b-aeb6-65daf8a01ed9",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        2592,
        416
      ],
      "webhookId": "59528177-3bd5-4113-a61c-55c42a3bb52d",
      "parameters": {
        "amount": 20
      },
      "typeVersion": 1.1
    },
    {
      "id": "10550efe-791e-4da3-9f9f-005ee678fdac",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "notes": "At this step, the video should be generated and ready to convert to 9:16 aspect ratio",
      "position": [
        3264,
        416
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "response.videos[0].bytesBase64Encoded"
      },
      "notesInFlow": true,
      "typeVersion": 1.1
    },
    {
      "id": "5e677094-e6bc-41e4-a6e1-d76fa293d47e",
      "name": "渲染中...",
      "type": "n8n-nodes-base.wait",
      "position": [
        3936,
        416
      ],
      "webhookId": "25193fe1-b3c9-48f5-ad10-89ad74293042",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "7258109f-ae30-4c4f-866a-b8f09aaab255",
      "name": "下载最终视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4832,
        416
      ],
      "parameters": {
        "url": "={{ $('Done?').item.json.response.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "f8714eae-ab8b-46dd-a819-223c03ecc03b",
      "name": "上传到 GCS(以便通过 URL 访问)",
      "type": "n8n-nodes-base.googleCloudStorage",
      "position": [
        3488,
        416
      ],
      "parameters": {
        "resource": "object",
        "operation": "create",
        "bucketName": "veo_courses",
        "createData": {},
        "objectName": "ViralReelz",
        "createQuery": {},
        "requestOptions": {},
        "encryptionHeaders": {}
      },
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 2000
    },
    {
      "id": "b5b22d9c-93db-4a82-8db2-59eb6c88bb2f",
      "name": "将视频转为 9:16 比例",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3712,
        416
      ],
      "parameters": {
        "url": "https://api.shotstack.io/v1/render",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n\t\"timeline\": {\n\t\t\"tracks\": [\n\t\t\t{\n\t\t\t\t\"clips\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"asset\": {\n\t\t\t\t\t\t\t\"type\": \"video\",\n\t\t\t\t\t\t\t\"src\": \"{{ $json.mediaLink }}\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"start\": 0,\n\t\t\t\t\t\t\"length\": 8,\n\t\t\t\t\t\t\"fit\": \"crop\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t\"output\": {\n\t\t\"format\": \"mp4\",\n\t\t\"aspectRatio\": \"9:16\",\n\t\t\"resolution\": \"hd\"\n\t}\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "fd649de0-eaf2-4505-894d-42ae07eb9a52",
      "name": "完成?",
      "type": "n8n-nodes-base.if",
      "position": [
        4384,
        416
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "fc24d410-040a-4ca6-b70f-7473af617bd9",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.response.status }}",
              "rightValue": "done"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "1d4a8e28-74c8-4709-b5d2-b60e6aacbbbb",
      "name": "配置我",
      "type": "n8n-nodes-base.set",
      "position": [
        4608,
        416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0f5772c0-1f84-45e9-b131-8be1c8dd6d85",
              "name": "postiz_api",
              "type": "string",
              "value": "https://api.postiz.com/public/v1"
            },
            {
              "id": "f3d9536a-3dc9-4673-b774-0434ca64575f",
              "name": "share_title",
              "type": "string",
              "value": "={{ $('Idea Agent').item.json.output.caption }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3396327d-8cbf-4301-91a0-e1de365c0139",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4560,
        192
      ],
      "parameters": {
        "color": 3,
        "width": 220,
        "height": 380,
        "content": "# ❗ 配置"
      },
      "typeVersion": 1
    },
    {
      "id": "b41ab464-3fb0-411f-8216-266fdca03b9d",
      "name": "完成?1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4160,
        336
      ],
      "parameters": {
        "url": "=https://api.shotstack.io/v1/render/{{ $('Turn video to 9:16').item.json.response.id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "264a12c7-e626-4247-a8f4-0df60347574e",
      "name": "上传视频到 Postiz",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5056,
        416
      ],
      "parameters": {
        "url": "=https://api.postiz.com/public/v1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "8e937887-b050-462a-8a38-0e7e7cd17e4e",
      "name": "获取 Postiz 集成",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5280,
        416
      ],
      "parameters": {
        "url": "=https://api.postiz.com/public/v1/integrations",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "013ae745-6a51-45bd-967f-5cc98ecd776f",
      "name": "切换1",
      "type": "n8n-nodes-base.switch",
      "position": [
        5504,
        400
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "tiktok",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "3ff74ffe-3f82-437d-9218-bce4f7551211",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.identifier }}",
                    "rightValue": "tiktok"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "youtube",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "2edc7f5f-18cf-45e2-9a10-03c6ee2a062f",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.identifier }}",
                    "rightValue": "youtube"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "instagram",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f461c331-7506-486b-ab4a-de03823f82f9",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    },
                    "leftValue": "={{ $json.identifier }}",
                    "rightValue": "instagram"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "99f9050c-7fbc-4ebb-b1fc-26cf1d5fac43",
      "name": "安排 YouTube 发布",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5728,
        416
      ],
      "parameters": {
        "url": "=https://api.postiz.com/public/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"type\": \"schedule\",\n  \"date\": \"{{ $now.plus(1, 'days').toISO() }}\",\n  \"tags\": [],\n  \"shortLink\": false,\n  \"posts\": [\n    {\n      \"integration\": {\n        \"id\": \"{{ $('Switch1').item.json.id }}\"\n      },\n      \"value\": [\n        {\n          \"content\": \"{{ $('Get Past Objects').first().json.quote.replace(/\"/g, \"\") }}\",\n          \"image\": [\n            {\n              \"id\": \"{{ $('Upload video to Postiz').item.json.id }}\",\n              \"path\": \"{{ $('Upload video to Postiz').item.json.path }}\"\n            }\n          ]\n        }\n      ],\n      \"settings\": {\n        \"title\": \"{{ $('Get Past Objects').first().json.quote.replace(/\"/g, \"\") }}\",\n        \"type\": \"public\"\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "2e16d4b6-1fee-4948-bb5f-c5442559b053",
      "name": "安排 TikTok 发布",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5728,
        224
      ],
      "parameters": {
        "url": "=https://api.postiz.com/public/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"type\": \"schedule\",\n  \"date\": \"{{ $now.plus(1, 'days').toISO() }}\",\n  \"tags\": [],\n  \"shortLink\": false,\n  \"posts\": [\n    {\n      \"integration\": {\n        \"id\": \"{{ $('Switch1').item.json.id }}\"\n      },\n      \"value\": [\n        {\n          \"content\": \"{{ $('Get Past Objects').first().json.quote.replace(/\"/g, \"\") }}\",\n          \"image\": [\n            {\n              \"id\": \"{{ $('Upload video to Postiz').item.json.id }}\",\n              \"path\": \"{{ $('Upload video to Postiz').item.json.path }}\"\n            }\n          ]\n        }\n      ],\n      \"settings\": {\n        \"title\": \"{{ $('Get Past Objects').first().json.quote.replace(/\"/g, \"\") }}\",\n        \"privacy_level\": \"PUBLIC_TO_EVERYONE\",\n        \"duet\": \"false\",\n        \"stitch\": \"false\",\n        \"comment\": \"true\",\n        \"autoAddMusic\": \"no\",\n        \"brand_content_toggle\": \"false\",\n        \"brand_organic_toggle\": \"false\",\n        \"content_posting_method\": \"DIRECT_POST\"\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "9485041f-7139-4a2f-917f-0d05f0fe41ea",
      "name": "安排 Instagram 发布",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5728,
        608
      ],
      "parameters": {
        "url": "=https://api.postiz.com/public/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"type\": \"schedule\",\n  \"date\": \"{{ $now.plus(1, 'days').toISO() }}\",\n  \"tags\": [],\n  \"shortLink\": false,\n  \"posts\": [\n    {\n      \"integration\": {\n        \"id\": \"{{ $('Switch1').item.json.id }}\"\n      },\n      \"value\": [\n        {\n          \"content\": \"{{ $('Get Past Objects').first().json.quote.replace(/\"/g, \"\") }}\",\n          \"image\": [\n            {\n              \"id\": \"{{ $('Upload video to Postiz').item.json.id }}\",\n              \"path\": \"{{ $('Upload video to Postiz').item.json.path }}\"\n            }\n          ]\n        }\n      ],\n      \"settings\": {\n        \"title\": \"{{ $('Get Past Objects').first().json.quote.replace(/\"/g, \"\") }}\",\n        \"post_type\": \"post\"\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "301a2fb3-f381-4dc3-b57c-0a7c398f30b8",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5152,
        112
      ],
      "parameters": {
        "color": 6,
        "width": 464,
        "height": 496,
        "content": "## 检查可用频道"
      },
      "typeVersion": 1
    },
    {
      "id": "dd760b85-96e1-4b05-abcc-0d86a3d6c2ee",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5616,
        112
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 656,
        "content": "## 安排发布"
      },
      "typeVersion": 1
    },
    {
      "id": "6d0e6ac4-efb4-455c-bed4-4c746a901179",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -176
      ],
      "parameters": {
        "width": 432,
        "height": 1376,
        "content": "🎥 Veo Machine Reels 工厂 — 完整用户指南\\n🧭 简介\\n\\nVeo Machine Reels 工厂是一个在 n8n 中构建的自动化内容创作系统,可将创意想法转化为完全渲染的 ASMR 风格玻璃水果 Reels,准备发布到 TikTok、YouTube Shorts 和 Instagram Reels。\\n\\n此模板将多个 AI 和自动化服务连接到一个单一、可重复的流水线中。它消除了从概念构思到发布的手动步骤,允许创作者或营销团队无需动手即可制作病毒式短视频。\\n\\n⚙️ 工作原理(简述)\\n\\n工作流每 8 小时自动启动一次(或手动触发时)。\\n\\n它检查 Google Sheets 以查看哪些水果已被使用。\\n\\n一个 AI“创意 Agent”选择一个新的、独特的玻璃水果概念。\\n\\n另一个 AI“提示 Agent”编写描述视频的电影式 Google Veo 3 提示。\\n\\n系统将该提示发送到 Google Veo,后者生成实际的视频文件。\\n\\n视频自动:\\n\\n通过 Shotstack 转换为 9:16 垂直格式\\n\\n上传到 Google Cloud Storage\\n\\n通过 Postiz API 发布到 TikTok、YouTube 和 Instagram\\n\\n🧱 要求\\n\\n在运行此工作流之前,请确保您已准备好以下内容:\\n\\n类别\\t要求\\nGoogle Cloud\\t项目 ID、服务账户邮箱和存储桶(例如 veo_courses)\\nVeo 访问权限\\t访问 Google Veo 3.0 API(通过 Vertex AI 或类似端点)\\nGoogle Sheets\\t包含先前水果创意的表格(用于避免重复)\\nOpenAI 账户\\t在 n8n 凭据中配置的 API 密钥\\nShotstack 账户\\tAPI 密钥(用于裁剪为 9:16)\\nPostiz 账户\\tTikTok、YouTube 和 Instagram 的活跃集成\\nn8n 实例\\t支持 LangChain、HTTP、JWT 和 Google 节点的版本\\n🧩 工作流结构概述\\n\\n工作流可分为五个主要部分:\\n\\n🕒 自动化与数据输入\\n\\n🧠 AI 生成(创意 + 提示创建)\\n\\n🎬 使用 Google Veo 生成视频\\n\\n📱 视频转换与上传\\n\\n🚀 自动发布到社交媒体\\n\\n让我们详细讲解每个部分。"
      },
      "typeVersion": 1
    },
    {
      "id": "2d938bce-ddf1-4dee-bbdf-cb95df7b50d3",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        80
      ],
      "parameters": {
        "color": 5,
        "width": 464,
        "height": 256,
        "content": "如何使用\\n\\n确保您的 Google Sheets 已链接,并且可以通过连接到 n8n 的同一 Google 账户访问。\\n\\n在 A 列中添加先前使用过的水果(每行一个)。\\n\\n如果您想手动触发它,请在 n8n 中点击“执行工作流”,而不是等待计划。\\n\\n结果:\\n系统准备一个“已使用”水果列表,以输入给 AI 进行创意生成"
      },
      "typeVersion": 1
    },
    {
      "id": "90804430-3fdd-4d42-a70c-edec8b67234f",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        64
      ],
      "parameters": {
        "width": 816,
        "height": 288,
        "content": "🧠 第 2 部分 — AI 生成(创意 + 提示创建)\\n目的\\n\\n此部分生成:\\n\\n一个新的、之前未使用过的“玻璃水果”创意。\\n\\n一个电影式的、与 Veo 兼容的文本提示,用于生成 ASMR 视频。\\n\\n包含\\n\\n创意 Agent(LangChain 节点 + OpenAI GPT-4.1-mini)\\n\\n对象与标题输出解析器\\n\\n提示 Agent(LangChain 节点 + GPT-4.1-mini)\\n\\n工作原理\\n\\n创意 Agent 获取您的已使用水果列表,并输出一个新创意,例如:\\n\\n{ \"object\": \"玻璃芒果\", \"caption\": \"玻璃芒果 ASMR\" }\\n\\n\\n输出解析器确保此格式为干净的 JSON。\\n\\n然后,提示 Agent 根据该水果为 Google Veo 编写详细的文本到视频提示。\\n\\n如何使用\\n\\n无需手动输入 — 此过程自动运行。\\n\\n您可以通过编辑提示 Agent 中的系统消息来调整创意语调或风格规则。\\n\\n如果您想要更短或不同的主题,请在“提示 Agent”节点中调整描述性文本。\\n\\n结果:\\n您将获得一个超逼真、安全、电影式的提示,完全符合 Veo 内容政策。"
      },
      "typeVersion": 1
    },
    {
      "id": "c0f58447-7ac7-4d0a-96f6-96a2eed9ea5f",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        64
      ],
      "parameters": {
        "width": 736,
        "height": 288,
        "content": "🎬 第 3 部分 — 视频生成(Google Veo 3.0)\\n目的\\n\\n此部分使用 Google Cloud 进行身份验证,将提示发送到 Veo,并检索渲染的视频。\\n\\n包含\\n\\n设置(Google Cloud 凭据)\\n\\nJWT + 获取令牌(身份验证)\\n\\n生成视频(POST 请求到 Veo API)\\n\\n等待 → 获取状态 → 切换(检查生成进度)\\n\\n工作原理\\n\\n工作流构建一个安全的 JWT,将其交换为 OAuth 令牌,并调用 Veo API。\\n\\nVeo 开始基于 AI 提示生成 ASMR 风格视频。\\n\\n工作流等待,然后每隔几秒检查一次,直到 Veo 的 API 确认视频准备就绪。\\n\\n完成后,它检索 base64 编码的视频数据。\\n\\n如何使用\\n\\n您必须在设置节点中使用您实际的 Google Cloud 详细信息填写 PROJECT_ID 和 CLIENT_EMAIL。\\n\\n确保 Veo API 端点 (aiplatform.googleapis.com) 与您项目的区域匹配。\\n\\n如果您的视频生成时间较长,可以增加“等待”时间。\\n\\n结果:\\n一个完成的 .mp4 视频现已准备好进行后处理。"
      },
      "typeVersion": 1
    },
    {
      "id": "29ab5742-a777-4c85-a035-aa08a3b7abf5",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3104,
        64
      ],
      "parameters": {
        "width": 928,
        "height": 288,
        "content": "📱 第 4 部分 — 视频转换与上传\\n目的\\n\\n为社交媒体准备视频:转换为 9:16 格式并上传到云存储。\\n\\n包含\\n\\n转换为文件\\n\\n上传到 Google Cloud Storage\\n\\nShotstack 转换(将视频转为 9:16)\\n\\n渲染 + 完成检查\\n\\n工作原理\\n\\n将 Veo 的输出转换为实际的视频文件。\\n\\n将其上传到您的 Google Cloud Storage 存储桶 (veo_courses)。\\n\\n将视频发送到 Shotstack,后者将其裁剪并渲染为垂直(9:16)格式。\\n\\n等待直到 Shotstack 完成处理。\\n\\n如何使用\\n\\n确保您的 GCS 存储桶存在并允许文件上传。\\n\\n在 n8n 凭据中添加您的 Shotstack API 密钥。\\n\\n可选:您可以在 Shotstack JSON 主体内调整视频长度或分辨率。\\n\\n结果:\\n您现在拥有了一个存储在云中的完成的垂直高清 ASMR 视频。"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2615cbe8-8824-4f29-8654-103fabc62edb",
  "connections": {
    "JWT": {
      "main": [
        [
          {
            "node": "GET TOKEN",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SET": {
      "main": [
        [
          {
            "node": "JWT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Fetch Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Done?": {
      "main": [
        [
          {
            "node": "Configure me",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Rendering...",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Done?1": {
      "main": [
        [
          {
            "node": "Done?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Schedule TikTok",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Schedule YouTube",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Schedule Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Set Object List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET TOKEN": {
      "main": [
        [
          {
            "node": "Generate Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Idea Agent": {
      "main": [
        [
          {
            "node": "Prompt Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure me": {
      "main": [
        [
          {
            "node": "Download final video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Status": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Agent": {
      "main": [
        [
          {
            "node": "SET",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rendering...": {
      "main": [
        [
          {
            "node": "Done?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Upload to GCS (To be accessible via URL)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Object List": {
      "main": [
        [
          {
            "node": "Idea Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Past Objects": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Object & Caption": {
      "ai_outputParser": [
        [
          {
            "node": "Idea Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Idea Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Prompt Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Turn video to 9:16": {
      "main": [
        [
          {
            "node": "Rendering...",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download final video": {
      "main": [
        [
          {
            "node": "Upload video to Postiz",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload video to Postiz": {
      "main": [
        [
          {
            "node": "Get Postiz integrations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Postiz integrations": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get Past Objects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to GCS (To be accessible via URL)": {
      "main": [
        [
          {
            "node": "Turn video to 9:16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流