8
n8n 中文网amn8n.com

使用Vizard AI和GPT-4.1将YouTube视频转换为社交媒体内容

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 14 个节点。主要使用 Wait, Gmail, Limit, Webhook, SplitOut 等节点。 使用Vizard AI和GPT-4.1将YouTube视频转换为社交媒体内容

前置要求
  • Google 账号和 Gmail API 凭证
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "6570b9a3c619b905a29a1c8dcd31f41add28a4b324f4ec6bd206e06c2b9731cf",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "e6d53ca0-ad48-4a6d-980a-dd4830349a5f",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        288,
        240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "02b7f8b4-2267-4128-9de4-c0f25071bac5",
      "name": "分离输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        752,
        832
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "videos"
      },
      "typeVersion": 1
    },
    {
      "id": "5253a001-b39e-4f08-837a-06bdae7dd1ac",
      "name": "检索Vizard项目",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        528,
        832
      ],
      "parameters": {
        "url": "=https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/query/{{$json.projectId}}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "VIZARDAI_API_KEY",
              "value": "api key goes here "
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6cb634e8-5814-40f2-a194-5df6059b915f",
      "name": "发送长视频到Vizard",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        928,
        240
      ],
      "parameters": {
        "url": "https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/create",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"lang\": \"en\",\n  \"preferLength\": [\n    0\n  ],\n  \"videoUrl\": \"{{ $json.link }}\",\n  \"videoType\": 2\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "VIZARDAI_API_KEY",
              "value": "api key goes here "
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b98f477d-c1df-4bb8-8973-9838bae05cc0",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        960,
        832
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "13c99d5a-8548-4b66-9351-4fa33ac76087",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        608
      ],
      "parameters": {
        "width": 1720,
        "height": 440,
        "content": "# 2. 检索与生成"
      },
      "typeVersion": 1
    },
    {
      "id": "9b02a8ce-83b2-42af-bdba-00a55c024d94",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        48
      ],
      "parameters": {
        "width": 1720,
        "height": 380,
        "content": "# 1. 爬取与发送"
      },
      "typeVersion": 1
    },
    {
      "id": "aff81d26-9508-4923-b081-c45553e42025",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "position": [
        704,
        240
      ],
      "parameters": {
        "maxItems": 2
      },
      "typeVersion": 1
    },
    {
      "id": "e8b866be-b8bd-475d-a9cc-eb33961e0ab8",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        288,
        832
      ],
      "webhookId": "d40c9293-818e-49c9-bcff-a864bd524427",
      "parameters": {
        "path": "d40c9293-818e-49c9-bcff-a864bd524427",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "164469dd-137a-4197-9123-60b20f50d050",
      "name": "在表格中追加行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1552,
        832
      ],
      "parameters": {
        "columns": {
          "value": {
            "title": "={{ $('Split Out').item.json.title }}",
            "videoId": "={{ $('Split Out').item.json.videoId }}",
            "videoUrl": "={{ $('Split Out').item.json.videoUrl }}",
            "projectId": "={{ $('Retrieve Vizard Project').item.json.projectId }}",
            "transcript": "={{ $('Split Out').item.json.transcript }}",
            "viralScore": "={{ $('Split Out').item.json.viralScore }}",
            "viralReason": "={{ $('Split Out').item.json.viralReason }}",
            "relatedTopic": "={{ $('Split Out').item.json.relatedTopic }}",
            "clipEditorUrl": "={{ $('Split Out').item.json.clipEditorUrl }}",
            "videoMsDuration": "={{ $('Split Out').item.json.videoMsDuration }}",
            "generatedCaption": "={{ $json.message.content.caption }}"
          },
          "schema": [
            {
              "id": "videoId",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "videoId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "projectId",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "projectId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "videoUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "videoUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "videoMsDuration",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "videoMsDuration",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "transcript",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "transcript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "viralScore",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "viralScore",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "viralReason",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "viralReason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "relatedTopic",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "relatedTopic",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "clipEditorUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "clipEditorUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "generatedCaption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "generatedCaption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/10CRVnoFOtY8p6mhX4d7wjbKB91RS3SgJ2v4dwmFM8b4/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "10CRVnoFOtY8p6mhX4d7wjbKB91RS3SgJ2v4dwmFM8b4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/10CRVnoFOtY8p6mhX4d7wjbKB91RS3SgJ2v4dwmFM8b4/edit?usp=drivesdk",
          "cachedResultName": "YT LF to tiktok shorts "
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "9578fbfc-4329-42c8-b8d3-81ad7c3482b5",
      "name": "发送消息",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1344,
        656
      ],
      "webhookId": "1090375c-2e63-47d6-9b18-f82ee339351b",
      "parameters": {
        "sendTo": "nickolassaraev@gmail.com",
        "message": "=Hi Nick,\n\nYour clips are ready to go. Just check the spreadsheet below: https://docs.google.com/spreadsheets/d/1uo3Cq4AoSNhZW8sZup8V5AM55BRua7skVf9gOjxg-Wg/edit?usp=sharing\n\nHappy clipping!\n\nThanks,\nNick",
        "options": {},
        "subject": "Hey—your clips are ready to go!",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "4ad1bccd-6b2a-4678-8424-f3b8b9294112",
      "name": "读取YouTube RSS源",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        512,
        240
      ],
      "parameters": {
        "url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCbo-KbSjJDG6JWQ_MTZ_rNA",
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "3cbbddb6-c7fe-459d-a274-89eb53917cc3",
      "name": "生成字幕",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1184,
        832
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You're a helpful, intelligent social media assistant. You make captions for Instagram and TikTok."
            },
            {
              "content": "Your task is to generate high-quality, engaging captions for Instagram and TikTok.\n\nYou'll be fed a transcript.\n\nReturn your captions in JSON using this format:\n\n{\"caption\":\"\"}\n\nRules:\n- Keep captions to ~100 words.\n- Use a spartan tone of voice, favoring the classic Western style (though still a fit for Instagram and TikTok).\n- Write conversationally, i.e as if I were doing the writing myself (in first person.\n- Use emojis, but sparingly.\n- Ensure each sentence is over 5 words long. Write for a University reading level."
            },
            {
              "content": "={{ $json.transcript }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "3a01414f-0599-4668-8cf2-e2bfb2076f0e",
      "name": "等待处理",
      "type": "n8n-nodes-base.wait",
      "position": [
        1744,
        832
      ],
      "webhookId": "1d588357-cb88-42b5-b34f-ed3c767dbf04",
      "parameters": {
        "amount": 2
      },
      "typeVersion": 1.1
    }
  ],
  "pinData": {
    "When clicking ‘Execute workflow’": [
      {
        "projectId": "21292525"
      }
    ]
  },
  "connections": {
    "Limit": {
      "main": [
        [
          {
            "node": "Send Longform to Vizard",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Retrieve Vizard Project",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate captions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate captions": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Wait for processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for processing": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read youtube RSS feed": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Vizard Project": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Read youtube RSS feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流