8
n8n 中文网amn8n.com

使用GPT和Veo3 AI为TikTok生成病毒式监控动物视频

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 16 个节点。主要使用 If, Wait, Telegram, DataTable, HttpRequest 等节点。 使用GPT和Veo3 AI为TikTok生成病毒式监控动物视频

前置要求
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "7914110285fa02b6fbc6c97080a41909334a12a40fb7c7c8ccd7922fbaeffe1b",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "3d8a021d-ea8a-4b9f-bfb1-19cf7ba274a1",
      "name": "CCTV提示",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        128,
        16
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-chat-latest",
          "cachedResultName": "GPT-5-CHAT-LATEST"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=📌 TASK: Create a hyper-realistic CCTV security camera style prompt for viral animal footage\n\nANIMAL: {{\n($json['Animal Name'] && $json['Animal Name'].trim()) ||\n( () => {\nconst animals = [\n'cat','dog','rabbit','hamster','guinea pig','ferret','mouse','chinchilla','hedgehog','gerbil',\n'raccoon','squirrel','opossum','skunk','fox','deer','goat','alpaca','llama','piglet',\n'duck','goose','turkey','rooster','chicken','peacock','pigeon','seagull','crow','magpie'\n];\nreturn animals[Math.floor(Math.random()*animals.length)];\n})()\n}}\n\nLOCATION: {{\n($json['Location Setting (Optional)'] && $json['Location Setting (Optional)'].trim()) ||\n( () => {\nconst locations = [\n'backyard','front porch','driveway','garden','side yard','front yard','alley near trash bins','porch','garage entrance',\n'roof','balcony','apartment hallway','stairwell','basement door','kitchen window','living room doorway','laundry room',\n'garage interior','carport','tool shed','chicken coop','duck pond edge','back fence gate','swimming pool deck',\n'above-ground pool rim','trampoline','patio furniture area','barbecue grill area','mailbox area','front gate',\n'street sidewalk','community park bench','courtyard','rooftop terrace','garden pond edge'\n];\nreturn locations[Math.floor(Math.random()*locations.length)];\n})()\n}}\n\nACTION: {{\n($json['Action'] && $json['Action'].trim()) ||\n( () => {\nconst actions = [\n'accidentally ringing the doorbell and freaking out',\n'sneezing loudly and startling itself',\n'tiptoeing off with a stolen slice of pizza',\n'slipping off the bird feeder and playing it cool',\n'wobbling along the fence like a tightrope walker',\n'battling a garden hose that seems alive',\n'dragging a shoe across the lawn like a trophy',\n'attempting a parkour jump and adorably missing',\n'chasing a laser dot across the patio',\n'peeking into the camera, nose smudging the lens',\n'carefully carrying a slice of bread like a briefcase',\n'jump-scaring itself with a garden gnome',\n'doing a dramatic slow-motion slip on wet tiles',\n'stealing the doormat and sprinting off',\n'moonwalking away from a startled pigeon',\n'arguing with its own reflection in the window',\n'riding a robot vacuum like a tiny cowboy',\n'playing tug-of-war with a dangling sock',\n'stacking leaves into a tiny nest and sitting proudly',\n'peeking from the mailbox like a spy',\n'trying to fit through the cat flap with a giant snack',\n'sliding across the deck like it’s ice',\n'balancing a twig on its head like a crown',\n'hopping into a flowerpot and popping back out',\n'doing zoomies around the sprinkler',\n'posing like a statue every time the light comes on',\n'sneaking under a parked car like a ninja',\n'surfing a trash can lid down the driveway',\n'ringing a wind chime and looking confused',\n'trying to catch falling snowflakes with its tongue',\n'mistaking a pumpkin for a friend and hugging it',\n'staring down a lawn flamingo in a duel',\n'pulling a pizza box that’s way too big',\n'doing a perfect somersault off the curb',\n'tiptoeing along the pool edge and slipping in with style',\n'wearing a bucket as a helmet',\n'parading with a garden glove as a prize',\n'playing peekaboo behind a flowerpot',\n'attempting a dramatic leap onto a chair and bonking softly',\n'rolling on the grass like a fuzzy tumbleweed',\n'sitting on the doorbell camera like a throne',\n'stealing a sponge and giving the patio a scrub',\n'tap-dancing on a metal grate',\n'getting startled by its own sneeze then apologizing to no one',\n'playing keep-away with a tennis ball from invisible friends',\n'carefully escorting a pinecone across the yard',\n'accidentally switching on the sprinkler and sprinting',\n'poking the camera with a curious paw',\n'misjudging a leap and landing in a bush',\n'doing a victory lap with a stolen slice of toast'\n];\nreturn actions[Math.floor(Math.random()*actions.length)];\n})()\n}}\n\nCUSTOM DETAILS: {{ $json.Description || 'none' }}\n\n📋 PROMPT REQUIREMENTS:\n\n* CCTV/security camera aesthetic: grainy, black and white, night vision style\n* Timestamp overlay in corner in this exact format: {{ new Date().toISOString().slice(0,19).replace('T',' ') }}\n* Slightly blurry/low-res security camera quality\n* Animal is the main focus, doing the funny ACTION above\n* Outdoor residential setting (unless LOCATION clearly indoor)\n* Motion blur effects from security camera\n* Infrared/night vision lighting style\n* Fence, grass, house elements in background\n* Wide angle security camera perspective\n* Authentic surveillance footage feel\n\n🎨 STYLE ELEMENTS TO INCLUDE:\n\n* \"security camera footage, CCTV style\"\n* \"black and white, grainy, low resolution\"\n* \"timestamp overlay, night vision\"\n* \"wide angle lens, surveillance perspective\"\n* \"motion blur, infrared lighting\"\n\n🧾 OUTPUT FORMAT:\nReturn ONLY a JSON object with TWO prompts:\n{\n\"image_prompt\": \"[Image generation prompt for creating the CCTV still frame]\",\n\"video_prompt\": \"[Video generation prompt for animating the scene with natural animal movement]\"\n}\n\n💡 EXAMPLE STYLE:\n\n* \"CCTV security footage of a {{ $json['Animal Name'] || 'randomly chosen animal' }} in {{ $json['Location Setting (Optional)'] || 'a backyard' }}, black and white, grainy quality, timestamp {{ new Date().toISOString().slice(0,19).replace('T',' ') }}, night vision, wide angle lens, residential setting\"\n"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "aU3oyDayilaqb6iD",
          "name": "OpenAi account D"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "3b7b2e55-6bc1-4212-b8e2-e351508fc50d",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        16
      ],
      "webhookId": "1572dce9-b0c6-43a2-ae78-052b5306c7d5",
      "parameters": {
        "unit": "minutes"
      },
      "typeVersion": 1.1
    },
    {
      "id": "5a8333ed-bb2c-4d78-9026-3be0daa0d1b8",
      "name": "获取状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        896,
        16
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/veo/record-info",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{ $credentials.veoApi.apiKey }}"
            }
          ]
        }
      },
      "credentials": {
        "veoApi": {
          "id": "veo-api-credentials",
          "name": "Veo API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0d2659f1-2520-4e0a-9f9b-f5186c30d3e2",
      "name": "如果",
      "type": "n8n-nodes-base.if",
      "position": [
        1104,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2ff2c730-0b60-4d89-93b4-6158f70b3992",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.msg }}",
              "rightValue": "success"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "dc1bfe4c-6101-474e-a418-8b46efb0c630",
      "name": "发送视频",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1152,
        288
      ],
      "webhookId": "92e4f9c7-4e82-45a5-90e6-36122b5d5460",
      "parameters": {
        "file": "={{ $json.video_url }}",
        "chatId": "={{ $credentials.telegramApi.chatId }}",
        "operation": "sendVideo",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "GAEE7YofmSUolvTh",
          "name": "Viral CCTV animal"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "dcc97f90-f6fe-4abc-8ce3-fe99ebf75d3b",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -64,
        16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 4
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fdbcd738-4067-4a87-baf9-6907924151a2",
      "name": "视频创建",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        480,
        16
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/veo/generate",
        "method": "POST",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1
            }
          }
        },
        "jsonBody": "={\n  \"prompt\": \"{{ $json.message.content.video_prompt }}\",\n  \"model\": \"veo3_fast\",\n  \"aspectRatio\": \"9:16\"\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{ $credentials.veoApi.apiKey }}"
            }
          ]
        }
      },
      "credentials": {
        "veoApi": {
          "id": "veo-api-credentials",
          "name": "Veo API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "930b26a7-d89e-4bda-88b9-14ab9a57152b",
      "name": "创建帖子",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        768,
        288
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "={{ $credentials.blotatoApi.accountId }}",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/{{ $credentials.blotatoApi.accountId }}",
          "cachedResultName": "funnytiktokusa1"
        },
        "postContentText": "={{ $('Insert row').item.json.title }} {{ $('Insert row').item.json.tags }}",
        "postContentMediaUrls": "={{ $json.url }}",
        "postCreateTiktokOptionIsAiGenerated": true
      },
      "credentials": {
        "blotatoApi": {
          "id": "psMxz2vRFdZ2nT1d",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "a97f0bbc-bb3d-4273-b1a1-a169282be645",
      "name": "JSON解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        112,
        496
      ],
      "parameters": {
        "jsonSchemaExample": "[\n  {\n    \"output\": {\n      \"title\": \"A captivating and SEO-friendly title based on the video prompt.\",\n      \"hashTags\": \"#tag1 #tag2 #tag3 #tag4 #tag5\"\n    }\n  }\n]"
      },
      "typeVersion": 1.3
    },
    {
      "id": "e843e09d-7999-4fa2-849b-9d8c2ca882db",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -32,
        496
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "aU3oyDayilaqb6iD",
          "name": "OpenAi account D"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "74260b32-b1ed-4ad1-aeb8-a3c108536a38",
      "name": "TikTok标题和标签",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -32,
        288
      ],
      "parameters": {
        "text": "={{ $('Prompt for CCTV').item.json.message.content.video_prompt }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=**Persona:**\nYou are a world-class Social Media Content Strategist with a specialization in creating viral short-form video content for platforms like TikTok and Instagram Reels. Your expertise is in crafting titles that create immediate intrigue (the \"hook\") and selecting hashtags that maximize reach and engagement. You understand the TikTok algorithm and know how to blend broad, trending tags with specific, niche tags for optimal discovery.\n\n**Context:**\nThis prompt is part of an automated content creation workflow. Your response will be parsed directly by a machine, so it is **critical** that you adhere strictly to the output format. Do not add any conversational text, explanations, markdown formatting like `json`, or any characters outside of the required JSON structure.\n\n**Task:**\nAnalyze the user-provided video concept below. Based on this concept, generate:\n1.  A compelling, hook-oriented title optimized for TikTok.\n2.  A set of five (5) viral and relevant hashtags.\n\n**Rules for Generation:**\n* **Title:**\n    * **Intrigue is Key:** It must create curiosity and make the user stop scrolling. Ask a question, present a shocking result, or state a controversial opinion related to the video.\n    * **SEO Friendly:** Include 1-2 keywords that someone would search for to find this type of content.\n    * **Concise:** Keep it short and punchy, easily readable on a mobile screen (under 150 characters).\n* **Hashtags:**\n    * **Relevance First:** All tags must be directly related to the video's content.\n    * **The 3/2 Strategy:**\n        * Provide 3 broad, high-traffic tags (e.g., `#fyp`, `#viral`, `#trending`).\n        * Provide 2 niche-specific tags that accurately describe the video's subject (e.g., `#AIart`, `#pythonprogramming`, `#travelhacks`).\n    * **Format:** Present the hashtags as a single string, separated by spaces.\n\n**Note:** Don't add any emoji in title.\n\n**Strict Output Format:**\nYour entire response must be a single, valid JSON array containing one object, as specified below. Do not output anything else.\n\n[\n  {\n    \"output\": {\n      \"title\": \"A captivating and SEO-friendly title based on the video prompt.\",\n      \"hashTags\": \"#tag1 #tag2 #tag3 #tag4 #tag5\"\n    }\n  }\n]\n"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.7
    },
    {
      "id": "4f5b6734-51cc-4c71-a1c6-ae2e30165b46",
      "name": "上传媒体",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        544,
        288
      ],
      "parameters": {
        "mediaUrl": "={{ $json.video_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "id": "psMxz2vRFdZ2nT1d",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "a6eceb21-e292-485b-93ec-45a68e6ffa84",
      "name": "插入行",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        320,
        288
      ],
      "parameters": {
        "columns": {
          "value": {
            "tags": "={{ $json.output[0].output.hashTags }}",
            "title": "={{ $json.output[0].output.title }}",
            "status": "created",
            "video_url": "={{ $('If').item.json.data.response.resultUrls[0] }}"
          },
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false
            },
            {
              "id": "tags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tags",
              "defaultMatch": false
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false
            },
            {
              "id": "video_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "video_url",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "={{ $credentials.dataTableApi.tableId }}",
          "cachedResultUrl": "/projects/{{ $credentials.dataTableApi.projectId }}/datatables/{{ $credentials.dataTableApi.tableId }}",
          "cachedResultName": "Security Camera Workflow TikTok"
        }
      },
      "credentials": {
        "dataTableApi": {
          "id": "data-table-credentials",
          "name": "Data Table API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fca106e5-95ae-4c6b-a1fb-656b429f3525",
      "name": "更新行",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        944,
        288
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "posted"
          },
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false
            },
            {
              "id": "tags",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "tags",
              "defaultMatch": false
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false
            },
            {
              "id": "video_url",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "video_url",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyValue": "={{ $('Insert row').item.json.id }}"
            }
          ]
        },
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "={{ $credentials.dataTableApi.tableId }}",
          "cachedResultUrl": "/projects/{{ $credentials.dataTableApi.projectId }}/datatables/{{ $credentials.dataTableApi.tableId }}",
          "cachedResultName": "Security Camera Workflow TikTok"
        }
      },
      "credentials": {
        "dataTableApi": {
          "id": "data-table-credentials",
          "name": "Data Table API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "de5abbb9-7adb-4c14-93c1-535980106df8",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -96
      ],
      "parameters": {
        "color": 5,
        "width": 528,
        "height": 640,
        "content": "## Muhammad Farooq Iqbal - 自动化专家 & n8n创作者"
      },
      "typeVersion": 1
    },
    {
      "id": "51895c13-165e-4c8e-9def-a9c3ced6ea13",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -96
      ],
      "parameters": {
        "color": 4,
        "width": 1664,
        "height": 736,
        "content": "## 病毒式CCTV摄像头动物视频"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Tiktok Title and Hashtags",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get the Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create post": {
      "main": [
        [
          {
            "node": "Update row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Json parser": {
      "ai_outputParser": [
        [
          {
            "node": "Tiktok Title and Hashtags",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Upload media": {
      "main": [
        [
          {
            "node": "Create post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)": {
      "main": [
        [
          {
            "node": "Send a video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the Status": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Creation": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt for CCTV": {
      "main": [
        [
          {
            "node": "Video Creation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Prompt for CCTV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Tiktok Title and Hashtags",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Tiktok Title and Hashtags": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
外部链接
在 n8n.io 查看

分享此工作流