8
n8n 中文网amn8n.com

3个Hackernews到AI克隆视频

高级

这是一个Content Creation, Miscellaneous, Multimodal AI领域的自动化工作流,包含 30 个节点。主要使用 If, Set, Wait, Merge, HttpRequest 等节点。 使用Heygen和Blotato生成并自动发布科技新闻AI虚拟形象视频到社交媒体

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "VkHyB2EyishNRVIv",
  "meta": {
    "instanceId": "549c75b884f60826462aba44926da2b62a58c76fa3ad0b40e11aceb92998328c",
    "templateCredsSetupCompleted": true
  },
  "name": "3 个 Hackernews 到 AI 克隆视频",
  "tags": [],
  "nodes": [
    {
      "id": "6858b2a1-a007-470a-93a2-d2ab603d8021",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1552,
        608
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5971571e-447d-4f16-9c05-a319ce82a4c0",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1344,
        608
      ],
      "parameters": {
        "text": "# INSTRUCTIONS\n\nPerform the following tasks, in order:\n\n1. Fetch the top 10 stories from Hacker News from the past 24 hours related to AI or LLMs. \n\n2. Select the top story that is most likely to go viral on social media. \n\n3. Fetch the article and Hacker News comments.\n\n4. Create a 20-second monologue script for an AI avatar video, following these guidelines:\n   - The script should be approximately 30 seconds when spoken aloud.\n   - Include lots of details and statistics from the article.\n   - Use 6th grade reading level.\n   - Balanced viewpoint.\n\n5. Update the script's first sentence to use sensational viral hooks, tailored to the content, that grab the viewer's attention.\n\n6. Replace the last sentence with: \"Hit follow to stay ahead in AI!\"\n\n# OUTPUT FORMAT\n\nONLY output the exact video script. Do not output anything else. NEVER include intermediate thoughts, notes, or formatting.",
        "options": {
          "returnIntermediateSteps": true
        },
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "id": "f6724264-d4a8-4f6f-8297-39a76b1b6d7e",
      "name": "获取HN文章",
      "type": "n8n-nodes-base.hackerNewsTool",
      "position": [
        -1104,
        800
      ],
      "parameters": {
        "articleId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Article_ID', ``, 'string') }}",
        "additionalFields": {
          "includeComments": true
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9c47a06b-1a89-45cc-a41e-df9ff24f94eb",
      "name": "获取HN首页",
      "type": "n8n-nodes-base.hackerNewsTool",
      "position": [
        -1264,
        800
      ],
      "parameters": {
        "resource": "all",
        "additionalFields": {
          "tags": [
            "front_page"
          ],
          "keyword": "AI"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "de058e34-5d90-4030-bf63-ca6ecdfc31aa",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        224,
        608
      ],
      "webhookId": "d9404622-0a06-4a65-959e-badd4fd87465",
      "parameters": {
        "unit": "minutes",
        "amount": 8
      },
      "typeVersion": 1.1,
      "alwaysOutputData": false
    },
    {
      "id": "a4675711-4849-4535-8bb3-214a356744be",
      "name": "编写脚本",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1408,
        800
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "gpt-4.1"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "kiPdrnG34bMG8lqa",
          "name": "OpenAI - Brand"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cf0bd094-d8eb-4a0b-a69c-5eee330a6102",
      "name": "设置Heygen",
      "type": "n8n-nodes-base.set",
      "position": [
        -512,
        608
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "{\n  \"heygen_api_key\": \"\",\n  \"avatar_id\": \"\",\n  \"voice_id\": \"\",\n  \"has_background_video\": false,\n  \"background_video_url\": \"https://database.blotato.io/storage/v1/object/public/public_media/4ddd33eb-e811-4ab5-93e1-2cd0b7e8fb3f/videogen2-render-e6b398a2-5859-4a77-88ef-2345bcefdc98.mp4\"\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "760a0575-a220-44f6-b9b1-7b44488560db",
      "name": "获取头像视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        608
      ],
      "parameters": {
        "url": "https://api.heygen.com/v1/video_status.get",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "video_id",
              "value": "={{ $('Merge').item.json.data.video_id }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "={{ $('Setup Heygen').item.json.heygen_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "313dab41-1587-4a55-8ad0-1449dc68ed50",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        192
      ],
      "parameters": {
        "color": 2,
        "width": 940,
        "height": 868,
        "content": "# 使用 Hackernews 研究科技新闻"
      },
      "typeVersion": 1
    },
    {
      "id": "a1a5161f-4235-41fa-b8fe-d054b05a3bbd",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        192
      ],
      "parameters": {
        "color": 3,
        "width": 1120,
        "height": 868,
        "content": "# 使用 HeyGen 创建 AI 克隆视频"
      },
      "typeVersion": 1
    },
    {
      "id": "d6dfad8a-ff48-4686-8857-60366a01f9e3",
      "name": "编写长标题",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -992,
        480
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=# EXAMPLE\n\n<example>\nMany people have recently asked me about ask engine optimization, which is all about optimizing your website and existing content, so it can be pulled into ChatGPT and other generative AI tools. Consider that generative AI tools tend to be more conversational in nature and have a Q&A type format, so search engines will want to pull in snippets that concisely answer a user’s question.- what is ask engine optimization in the age of AI?- How does traditional SEO compare to ask engine optimization today?- top tips and tricks to get started with ask engine optimization?\n\n#ai #askengineoptimization #chatgpt #seo\n</example>\n\n# CONTEXT\n\nInfer the topic from the sources provided.\n\n# WRITING STYLE\n\nHere’s how you always write:\n\n<writing_style>\n\n- Your writing style is spartan and informative.\n- Use clear, simple language.\n- Employ short, impactful sentences.\n- Use active voice; avoid passive voice.\n- Focus on practical, actionable insights.\n- Incorporate data or statistics to support claims when possible.\n- Use \"\"\"\"\"\"\"\"you\"\"\"\"\"\"\"\" and \"\"\"\"\"\"\"\"your\"\"\"\"\"\"\"\" to directly address the reader.\n- Avoid metaphors and clichés.\n- Avoid generalizations.\n- Do not include common setup language in any sentence, including: in conclusion, in closing, etc.\n- Do not output warnings or notes—just the output requested.\n- Do not use hashtags.\n- Do not use semicolons.\n- Do not use emojis.\n- Do not use asterisks.\n- Do not use adjectives and adverbs.\n- Do NOT use these words:\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"can, may, just, that, very, really, literally, actually, certainly, probably, basically, could, maybe, delve, embark, enlightening, esteemed, shed light, craft, crafting, imagine, realm, game-changer, unlock, discover, skyrocket, abyss, you're not alone, in a world where, revolutionize, disruptive, utilize, utilizing, dive deep, tapestry, illuminate, unveil, pivotal, enrich, intricate, elucidate, hence, furthermore, realm, however, harness, exciting, groundbreaking, cutting-edge, remarkable, it. remains to be seen, glimpse into, navigating, landscape, stark, testament, in summary, in conclusion, moreover, boost, bustling, opened up, powerful, inquiries, ever-evolving\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n</writing_style>\n\n# PLANNING\n\nYour goal is to write a 50-word video caption based on the provided source.\n\n1. Analyze the provided sources thoroughly.\n2. Study the <example> post carefully. You will be asked to replicate their:\n    - Overall structure.\n    - Tone and voice.\n    - Formatting (including line breaks and spacing).\n    - Length (aim for a similarly detailed post).\n    - Absence of emojis.\n    - Max 5 relevant hashtags.\n    - Emotional resonance.\n\n# OUTPUT\nFollow the GUIDELINES below to write the post. Use your analysis from step 1 and step 2. Use the provided sources as the foundation for your post, expanding on it significantly while maintaining the style and structure of the examples provided from step 2. You MUST use information from the provided sources. Make sure you adhere to your <writing_style>.\n\n<guidelines>\nThe description should be structured as follows:\n1. Start with 1 paragraph summarizing the source\n2. Newline, followed by 3 bullet points of questions that a viewer might ask on a search engine about the source\n3. Newline, followed by these hashtags: #ai #artificialintelligence #ainews #sabrinaramonov #aiavatar\n</guidelines>\n\nTake a deep breath and take it step-by-step!\n\n# INPUT\nUse the following information sources:\n<sources>\n{{ $json.output }}\n</sources>"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "kiPdrnG34bMG8lqa",
          "name": "OpenAI - Brand"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "f70ec7fd-1da9-4cad-af29-2ca2ed8cfd0b",
      "name": "编写短标题",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -992,
        720
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Write a 1 viral sentence, max 90 characters, summarizing the video content, use 6th grade language, balanced neutral perspective, no emojis:\n\n<content>\n{{ $json.message.content }}\n</content>"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "kiPdrnG34bMG8lqa",
          "name": "OpenAI - Brand"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "1b8eb507-6b94-438e-b389-92e312c504a3",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        768
      ],
      "parameters": {
        "color": 6,
        "width": 182,
        "height": 116,
        "content": "# 步骤 1"
      },
      "typeVersion": 1
    },
    {
      "id": "519f39b2-73ab-49a8-9966-d567e4f4268d",
      "name": "上传媒体",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        688,
        608
      ],
      "parameters": {
        "mediaUrl": "={{ $('Get Avatar Video').item.json.data.video_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "57f98633-2abb-476e-ac32-d922f375f8a6",
      "name": "Tiktok [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        912,
        128
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "156",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/156",
          "cachedResultName": "blotato_genz"
        },
        "postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "bbd10966-f758-41d1-b6a8-95ab300360c9",
      "name": "Linkedin [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1184,
        128
      ],
      "parameters": {
        "options": {},
        "platform": "linkedin",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "4590",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/4590",
          "cachedResultName": "Sabrina Ramonov 🍄"
        },
        "postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3159669f-82ba-4e1c-8def-ca180efd5eef",
      "name": "Facebook [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        912,
        352
      ],
      "parameters": {
        "options": {},
        "platform": "facebook",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "369",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/369",
          "cachedResultName": "Sabrina Ramonov"
        },
        "facebookPageId": {
          "__rl": true,
          "mode": "list",
          "value": "161711670360847",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/369/subaccounts/161711670360847",
          "cachedResultName": "Blotato"
        },
        "postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "29a339ec-1182-4ec0-aa51-0cb2346143ff",
      "name": "Instagram [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1184,
        352
      ],
      "parameters": {
        "options": {},
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "28",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/28",
          "cachedResultName": "sabrina_ramonov"
        },
        "postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "1deb06da-133e-44c1-94bf-382acb3fc4fe",
      "name": "Twitter [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        912,
        608
      ],
      "parameters": {
        "options": {},
        "platform": "twitter",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "38",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/38",
          "cachedResultName": "Sabrina_Ramonov"
        },
        "postContentText": "={{ $('Write Short Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "5c5739cb-3d03-4c76-9e19-4dfbe84bd276",
      "name": "Youtube [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1184,
        608
      ],
      "parameters": {
        "options": {},
        "platform": "youtube",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "111",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/111",
          "cachedResultName": "Sabrina Ramonov 🍄"
        },
        "postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}",
        "postCreateYoutubeOptionTitle": "={{ $('Write Short Caption').item.json.message.content.slice(0, 100) }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "22aed9a9-8ee0-438c-b32f-1d86163d66a9",
      "name": "Threads [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        912,
        848
      ],
      "parameters": {
        "options": {},
        "platform": "threads",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "2537",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/2537",
          "cachedResultName": "sabrina_ramonov"
        },
        "postContentText": "={{ $('Write Short Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9f763037-841d-47d3-bebe-5158d1170f39",
      "name": "Bluesky [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1184,
        848
      ],
      "parameters": {
        "options": {},
        "platform": "bluesky",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "6036",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/6036",
          "cachedResultName": "sabrinaramonov.bsky.social"
        },
        "postContentText": "={{ $('Write Short Caption').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4bf12cfd-29c8-481e-8c0f-ce71e70ef9eb",
      "name": "Pinterest [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "disabled": true,
      "position": [
        912,
        1088
      ],
      "parameters": {
        "options": {},
        "platform": "pinterest",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "358",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/358",
          "cachedResultName": "sabrina_ramonov"
        },
        "postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
        "pinterestBoardId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        },
        "postContentMediaUrls": "={{ $('Upload media').item.json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "qLLOXODALF2oKezc",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ec953579-65a1-4020-9ecc-1e16f1feca9b",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -64
      ],
      "parameters": {
        "color": 6,
        "width": 304,
        "height": 144,
        "content": "# 步骤 2"
      },
      "typeVersion": 1
    },
    {
      "id": "e6e17c6d-3f83-4601-8806-b02731561f1b",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -368
      ],
      "parameters": {
        "color": 4,
        "width": 720,
        "height": 1648,
        "content": "# 使用 Blotato 随处发布"
      },
      "typeVersion": 1
    },
    {
      "id": "a84edd4b-ce9a-473f-a36e-adab3561a20e",
      "name": "创建带背景视频的头像视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -144,
        496
      ],
      "parameters": {
        "url": "https://api.heygen.com/v2/video/generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"video_inputs\": [\n    {\n      \"character\": {\n        \"type\": \"avatar\",\n        \"avatar_id\": \"{{ $json.avatar_id }}\",\n        \"avatar_style\": \"normal\",\n        \"scale\": 1.0,\n        \"offset\": {\n          \"x\": 0.15,\n          \"y\": 0.15\n        },\n        \"matting\": true\n      },\n      \"voice\": {\n        \"type\": \"text\",\n        \"input_text\": {{ $('AI Agent').item.json.output.toJsonString() }},\n        \"voice_id\": \"{{ $json.voice_id }}\",\n        \"speed\": 1.1,\n        \"pitch\": 50,\n        \"emotion\": \"Excited\"\n      },\n      \"background\": {\n        \"type\": \"video\",\n        \"url\": \"{{ $json.background_video_url }}\",\n        \"play_style\": \"loop\",\n        \"fit\": \"cover\"\n      }\n    }\n  ],\n  \"dimension\": {\n    \"width\": 720,\n    \"height\": 1280\n  },\n  \"aspect_ratio\": \"9:16\",\n  \"caption\": false,\n  \"title\": \"{{ $('Write Short Caption').item.json.message.content }}\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "={{ $json.heygen_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cc6606b3-941d-4e42-9432-41793ceb66be",
      "name": "创建无背景视频的头像视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -144,
        720
      ],
      "parameters": {
        "url": "https://api.heygen.com/v2/video/generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"video_inputs\": [\n    {\n      \"character\": {\n        \"type\": \"avatar\",\n        \"avatar_id\": \"{{ $json.avatar_id }}\",\n        \"avatar_style\": \"normal\",\n        \"scale\": 1.0,\n        \"offset\": {\n          \"x\": 0.15,\n          \"y\": 0.15\n        }\n      },\n      \"voice\": {\n        \"type\": \"text\",\n        \"input_text\": {{ $('AI Agent').item.json.output.toJsonString() }},\n        \"voice_id\": \"{{ $json.voice_id }}\",\n        \"speed\": 1.1,\n        \"pitch\": 50,\n        \"emotion\": \"Excited\"\n      }\n    }\n  ],\n  \"dimension\": {\n    \"width\": 720,\n    \"height\": 1280\n  },\n  \"aspect_ratio\": \"9:16\",\n  \"caption\": false,\n  \"title\": \"{{ $('Write Short Caption').item.json.message.content }}\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "={{ $json.heygen_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f54f59f4-053f-44cf-b633-b1cf978182bc",
      "name": "如果",
      "type": "n8n-nodes-base.if",
      "position": [
        -352,
        608
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "73001c6b-fae2-48cd-b0a6-aa453b837902",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.has_background_video }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ec92d999-99fc-421c-8391-fff8d7fc5c85",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        64,
        608
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "6d79ec06-a38c-4af2-aff0-47bef19ccb0e",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2288,
        -320
      ],
      "parameters": {
        "color": 6,
        "width": 576,
        "height": 1120,
        "content": "# 完整教程"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "763a53ef-1a2d-4869-9a50-e8f3ae12c236",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create Avatar Video WITH Background Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Avatar Video WITHOUT Background Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get Avatar Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Write Long Caption",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setup Heygen": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media": {
      "main": [
        [
          {
            "node": "Tiktok [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Linkedin [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Facebook [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Instagram [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Twitter [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Youtube [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Threads [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Bluesky [BLOTATO]",
            "type": "main",
            "index": 0
          },
          {
            "node": "Pinterest [BLOTATO]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Script": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch HN Article": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Avatar Video": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Long Caption": {
      "main": [
        [
          {
            "node": "Write Short Caption",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch HN Front Page": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Write Short Caption": {
      "main": [
        [
          {
            "node": "Setup Heygen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Avatar Video WITH Background Video": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Avatar Video WITHOUT Background Video": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Sabrina Ramonov 🍄

Sabrina Ramonov 🍄

@sabrina-ramonov

- Teach 10M people AI - Sold AI startup for $10M+ - 0 to 1.3M+ followers in 1 year - Solo Founder, Blotato.com - social media API - Learn AI for free: www.sabrina.dev

外部链接
在 n8n.io 查看

分享此工作流