8
n8n 中文网amn8n.com

使用 HeyGen 和 Google Sheets 集成生成 AI 虚拟形象视频

中级

这是一个AI, Marketing领域的自动化工作流,包含 11 个节点。主要使用 HttpRequest, GoogleSheets, ManualTrigger 等节点,结合人工智能技术实现智能自动化。 使用 HeyGen 和 Google Sheets 集成生成 AI 虚拟形象视频

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "de145373c7ed10b34e35f8898916fdf37d53e7782c6f05bbe7b831e31042db96",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "43bde8be-dd80-43d5-93fa-bbed038d1fc0",
      "name": "当点击\"测试工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -660,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6530a519-264d-41ef-87db-280c425f481f",
      "name": "获取视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        80
      ],
      "parameters": {
        "url": "https://api.heygen.com/v2/avatar/avatar_id/details",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "video_id",
              "value": "={{ $json.data.video_id }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hHUxPUb01H0Ij0se",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "dcc4ed71-81da-4fe2-a865-cdda8a81ab2d",
      "name": "创建视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        80,
        80
      ],
      "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\": \"84c521ab0e4b4527a33423e1b813ea0c\",\n        \"avatar_style\": \"normal\"\n      },\n      \"voice\": {\n        \"type\": \"text\",\n        \"input_text\": \"hey, this is sagar and it is my avatar\",\n        \"voice_id\": \"2aa0fed15bbf424bb3a4f9c9537ab058\",\n        \"speed\": 1.1\n      }\n    }\n  ],\n  \"dimension\": {\n    \"width\": 1280,\n    \"height\": 720\n  }\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hHUxPUb01H0Ij0se",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5c6f7c73-3301-4e62-9cc2-1a4181e03fd4",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -280,
        80
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit#gid=0",
          "cachedResultName": "New Script Uploaded"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit?usp=drivesdk",
          "cachedResultName": "New Script"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "K7LQI1nT7J8NyxSW",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "3f5f9b1d-7854-4814-b0af-8b630032e00f",
      "name": "Google Sheets1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        820,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "Final Video": "={{ $json.data.video_url }}"
          },
          "schema": [
            {
              "id": "New Script",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "New Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Final Video",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Final Video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "New Script"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit#gid=0",
          "cachedResultName": "New Script Uploaded"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit?usp=drivesdk",
          "cachedResultName": "New Script"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "K7LQI1nT7J8NyxSW",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "eb08b935-e956-4756-9fd5-b0a196524535",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        260
      ],
      "parameters": {
        "color": 4,
        "width": 255,
        "height": 239,
        "content": "👈"
      },
      "typeVersion": 1
    },
    {
      "id": "b372533b-4de6-48d1-bb53-3a1a364da590",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -100
      ],
      "parameters": {
        "color": 3,
        "width": 272,
        "height": 140,
        "content": "### 您的AI虚拟形象视频自动化代理与Google Sheets、HTTP节点(仅需5步轻松设置)"
      },
      "typeVersion": 1
    },
    {
      "id": "f0de3751-d50f-4ca6-b2e4-0e9c38d21557",
      "name": "便签说明5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        260
      ],
      "parameters": {
        "color": 5,
        "width": 275,
        "height": 359,
        "content": "👈"
      },
      "typeVersion": 1
    },
    {
      "id": "cab8d398-fe34-4f64-b325-fe6ce1ad8406",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        260
      ],
      "parameters": {
        "width": 275,
        "height": 279,
        "content": "👈"
      },
      "typeVersion": 1
    },
    {
      "id": "e046ae61-1f98-4eff-8a6a-d445623520d7",
      "name": "便签 9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        260
      ],
      "parameters": {
        "color": 3,
        "width": 275,
        "height": 359,
        "content": "👈"
      },
      "typeVersion": 1
    },
    {
      "id": "99a5275c-3f72-4a75-94eb-276e620a6545",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        260
      ],
      "parameters": {
        "width": 275,
        "height": 359,
        "content": "👈"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Get Video": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "creating Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "creating Video": {
      "main": [
        [
          {
            "node": "Get Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人工智能, 营销

需要付费吗?

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

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

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

作者

AI Automations Expert | Gen AI Filmmaker | AI Product Builder 🔹 Built 25+ AI Automation Systems Designed and deployed AI workflows using OpenAI, Make.com, Zapier, and AdminitM to automate business processes, save time, and boost productivity.

外部链接
在 n8n.io 查看

分享此工作流