8
n8n 中文网amn8n.com

使用 MiniMax 海螺 02 将图像转换为视频并上传到 YouTube 和 TikTok

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 25 个节点。主要使用 If, Set, Wait, GoogleDrive, HttpRequest 等节点。 使用 MiniMax 海螺 02 将图像转换为 AI 视频并上传到 YouTube/TikTok

前置要求
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "mlCmbtSHIWYMXzuV",
  "meta": {
    "instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462"
  },
  "name": "使用MiniMax海螺02将图像转换为视频并上传到YouTube和TikTok",
  "tags": [],
  "nodes": [
    {
      "id": "a8a67e64-0f0b-46c2-9fcf-8b6254b6f6e9",
      "name": "当点击\"测试工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        2040
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2a5c8f94-c94b-48f4-8c63-611f75cba992",
      "name": "获取状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1060,
        2040
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/minimax/requests/{{ $('Create video').item.json.request_id }}/status ",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cebf2524-3bd8-4c01-b9c7-338d0ea8a7bf",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        420
      ],
      "parameters": {
        "color": 6,
        "width": 540,
        "height": 360,
        "content": "## 图像"
      },
      "typeVersion": 1
    },
    {
      "id": "82f89972-2c96-4e43-bede-4797afad0f64",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        820
      ],
      "parameters": {
        "color": 4,
        "width": 540,
        "height": 180,
        "content": "## 提示词"
      },
      "typeVersion": 1
    },
    {
      "id": "ff479d7a-f475-4290-9f12-0593eb694c94",
      "name": "等待 60 秒",
      "type": "n8n-nodes-base.wait",
      "position": [
        880,
        2040
      ],
      "webhookId": "351bd496-a9cc-445c-86f6-a56189df0028",
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "9dd6e755-896d-4db7-bd7c-11cb22e82da3",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        1900
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8e6f9c27-df72-47de-839d-596027a90aa5",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        140
      ],
      "parameters": {
        "color": 3,
        "width": 540,
        "height": 240,
        "content": "# 使用MiniMax海螺02将图像转换为视频"
      },
      "typeVersion": 1
    },
    {
      "id": "187b9864-95c5-45d2-970f-fde41b28163a",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1040
      ],
      "parameters": {
        "width": 740,
        "height": 220,
        "content": "## 步骤1 - GOOGLE表格"
      },
      "typeVersion": 1
    },
    {
      "id": "3801fdb4-ff38-41e1-ab99-18cbe0daf3c5",
      "name": "完成?",
      "type": "n8n-nodes-base.if",
      "position": [
        1240,
        2040
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "383d112e-2cc6-4dd4-8985-f09ce0bd1781",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8f5c867f-97e4-4aba-8f5f-29e2e85afe20",
      "name": "更新结果",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        920,
        2300
      ],
      "parameters": {
        "columns": {
          "value": {
            "RESULT": "={{ $('Get Url Video').item.json.video.url }}",
            "row_number": "={{ $('Get new video').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "FACE IMAGE",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FACE IMAGE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "GIF IMAGE",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "GIF IMAGE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "RESULT",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "RESULT",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/11ebWJvwwXHgvQld9kxywKQUvIoBw6xMa0g0BuIqHDxE/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "193tDO6xw8aSMO7lVC5kFyvlnmAdpHyGMmUbLBJUhhNs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/193tDO6xw8aSMO7lVC5kFyvlnmAdpHyGMmUbLBJUhhNs/edit?usp=drivesdk",
          "cachedResultName": "Image to Video"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "ca4e06ec-2d0d-4e31-b5d1-a14a2125f077",
      "name": "设置数据",
      "type": "n8n-nodes-base.set",
      "position": [
        440,
        2040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c713d31f-9abd-496a-ac79-e8e2efe60aa0",
              "name": "image",
              "type": "string",
              "value": "={{ $json.IMAGE }}"
            },
            {
              "id": "58fb5e76-6576-4d16-8b25-b931c7935c01",
              "name": "prompt",
              "type": "string",
              "value": "={{ $json.PROMPT }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "9bfda76a-d6ed-47bb-897a-1f7ce68950fd",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1740
      ],
      "parameters": {
        "width": 740,
        "height": 100,
        "content": "## 步骤4 - 主流程"
      },
      "typeVersion": 1
    },
    {
      "id": "f51bfb2a-cbe0-4cfa-84b6-8b893ca2c475",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1300
      ],
      "parameters": {
        "width": 740,
        "height": 140,
        "content": "## 步骤2 - 获取API密钥(您的API密钥)"
      },
      "typeVersion": 1
    },
    {
      "id": "cb265072-6c63-4134-8ace-6e0597dfa779",
      "name": "上传视频",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        740,
        2300
      ],
      "parameters": {
        "name": "={{ $now.format('yyyyLLddHHmmss') }}-{{ $json.video.file_name }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1aHRwLWyrqfzoVC8HoB-YMrBvQ4tLC-NZ",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1aHRwLWyrqfzoVC8HoB-YMrBvQ4tLC-NZ",
          "cachedResultName": "Fal.run"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "HEy5EuZkgPZVEa9w",
          "name": "Google Drive account (n3w.it)"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "e71b084f-bb35-4f76-ba82-1da85b835666",
      "name": "获取视频 URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        2300
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/minimax/requests/{{ $json.request_id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "79831c8a-8248-4604-82ea-1bd993b268fc",
      "name": "生成标题",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        180,
        2300
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Input: {{ $('Get new video').item.json.PROMPT }}"
            },
            {
              "role": "system",
              "content": "You are a YouTube SEO expert specialized in creating engaging and optimized titles.\n\nYour task is to generate an effective title for a YouTube video based on the user's video description.\n\nGUIDELINES:\n- Maximum 60 characters to avoid truncation\n- Use relevant keywords for SEO\n- Make the title catchy and clickable\n- Avoid excessive or misleading clickbait\n- Consider the target audience of the content\n- Use numbers, questions, or power words when appropriate\n- IMPORTANT: Generate the title in the same language as the input description\n\nOUTPUT FORMAT:\nProvide only the title, without additional explanations.\n\nEXAMPLE:\nInput: \"Tutorial video on how to cook perfect pasta carbonara\"\nOutput: \"PERFECT Carbonara in 10 Minutes - Chef's Secrets\""
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "TefveNaDaMERl1hY",
          "name": "OpenAi account (Eure)"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "e16a883b-6210-4577-bcda-ae5f12ee5c83",
      "name": "获取视频文件",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        520,
        2300
      ],
      "parameters": {
        "url": "={{ $('Get Url Video').item.json.video.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "3a7e9d11-9bb1-4d8f-b7a5-d8bf085a6d2e",
      "name": "更新YouTube URL",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        920,
        2540
      ],
      "parameters": {
        "columns": {
          "value": {
            "row_number": "={{ $('Get new video').item.json.row_number }}",
            "YOUTUBE_URL": "=https://youtu.be/{{ $json.results.youtube.video_id }}"
          },
          "schema": [
            {
              "id": "PROMPT",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PROMPT",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "DURATION",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "DURATION",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VIDEO",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "VIDEO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "YOUTUBE_URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "YOUTUBE_URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/11ebWJvwwXHgvQld9kxywKQUvIoBw6xMa0g0BuIqHDxE/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "193tDO6xw8aSMO7lVC5kFyvlnmAdpHyGMmUbLBJUhhNs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/193tDO6xw8aSMO7lVC5kFyvlnmAdpHyGMmUbLBJUhhNs/edit?usp=drivesdk",
          "cachedResultName": "Image to Video"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "e9c82e9e-bb66-4cb9-aa74-86b3944a4c56",
      "name": "获取新视频",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        220,
        2040
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "VIDEO"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/193tDO6xw8aSMO7lVC5kFyvlnmAdpHyGMmUbLBJUhhNs/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "193tDO6xw8aSMO7lVC5kFyvlnmAdpHyGMmUbLBJUhhNs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/193tDO6xw8aSMO7lVC5kFyvlnmAdpHyGMmUbLBJUhhNs/edit?usp=drivesdk",
          "cachedResultName": "Image to Video"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "d7a46ca6-dc36-4e7d-b117-d8c836e71bbd",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        700,
        2480
      ],
      "parameters": {
        "width": 180,
        "height": 440,
        "content": "在步骤3中设置您的用户名"
      },
      "typeVersion": 1
    },
    {
      "id": "cefa654d-4572-4520-a545-77152c9ef25a",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1480
      ],
      "parameters": {
        "width": 740,
        "height": 220,
        "content": "## 步骤3 - 在YouTube和TikTok上上传视频"
      },
      "typeVersion": 1
    },
    {
      "id": "93158511-58ed-4890-9aac-48eba0ccfbdf",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        1980
      ],
      "parameters": {
        "width": 180,
        "height": 200,
        "content": "设置时长(6或10秒)"
      },
      "typeVersion": 1
    },
    {
      "id": "f3205b9f-e939-4b68-8f27-098c8a02e763",
      "name": "创建视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        660,
        2040
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/minimax/hailuo-02/standard/image-to-video",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n     \"prompt\": \"{{ $json.prompt }}\",\n     \"image_url\": \"{{ $json.image }}\",\n     \"duration\": \"6\",\n     \"prompt_optimizer\": true\n   }",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "daOZafXpRXLtoLUV",
          "name": "Fal.run API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d87b77a8-81b7-4598-b05c-4ff97cdd32c3",
      "name": "上传到YouTube",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        2540
      ],
      "parameters": {
        "url": "https://api.upload-post.com/api/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "title",
              "value": "={{ $('Generate title').item.json.message.content }}"
            },
            {
              "name": "user",
              "value": "YOUR_USERNAME"
            },
            {
              "name": "platform[]",
              "value": "youtube"
            },
            {
              "name": "video",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "DEE2XGvhGodgbAJh",
          "name": "Upload-post.com API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "63a38338-b734-4e94-bfa9-648e9fa2a3b6",
      "name": "上传到 TikTok",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        2760
      ],
      "parameters": {
        "url": "https://api.upload-post.com/api/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "title",
              "value": "={{ $('Generate title').item.json.message.content }}"
            },
            {
              "name": "user",
              "value": "YOUR_USERNAME"
            },
            {
              "name": "platform[]",
              "value": "tiktok"
            },
            {
              "name": "video",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "DEE2XGvhGodgbAJh",
          "name": "Upload-post.com API"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "814bbb25-af62-433e-985e-b9e2c15e3c1c",
  "connections": {
    "Set data": {
      "main": [
        [
          {
            "node": "Create video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Completed?": {
      "main": [
        [
          {
            "node": "Get Url Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 60 sec.",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get status": {
      "main": [
        [
          {
            "node": "Completed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create video": {
      "main": [
        [
          {
            "node": "Wait 60 sec.",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video": {
      "main": [
        [
          {
            "node": "Update result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60 sec.": {
      "main": [
        [
          {
            "node": "Get status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Url Video": {
      "main": [
        [
          {
            "node": "Generate title",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get new video": {
      "main": [
        [
          {
            "node": "Set data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate title": {
      "main": [
        [
          {
            "node": "Get File Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get File Video": {
      "main": [
        [
          {
            "node": "Upload Video",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload on Youtube",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload on TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload on Youtube": {
      "main": [
        [
          {
            "node": "Update Youtube URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get new video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at info@n3w.it or add me on Linkedin.com/in/davideboizza

外部链接
在 n8n.io 查看

分享此工作流