Usar HeyGen e integración con Google Sheets para generar videos de avatares de IA

Intermedio

Este es unAI, Marketingflujo de automatización del dominio deautomatización que contiene 11 nodos.Utiliza principalmente nodos como HttpRequest, GoogleSheets, ManualTrigger, combinando tecnología de inteligencia artificial para lograr automatización inteligente. Usar HeyGen e integración con Google Sheets para generar videos de avatares virtuales de AI

Requisitos previos
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Credenciales de API de Google Sheets
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "de145373c7ed10b34e35f8898916fdf37d53e7782c6f05bbe7b831e31042db96",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "43bde8be-dd80-43d5-93fa-bbed038d1fc0",
      "name": "Al hacer clic en 'Probar flujo de trabajo'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -660,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6530a519-264d-41ef-87db-280c425f481f",
      "name": "Obtener video",
      "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": "Creando video",
      "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": "Hojas de Google",
      "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": "Hojas de Google1",
      "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": "Nota adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        260
      ],
      "parameters": {
        "color": 4,
        "width": 255,
        "height": 239,
        "content": "👈\nSet up Manual Trigger Node.\n\nthis trigger will be activated.\n\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"
      },
      "typeVersion": 1
    },
    {
      "id": "b372533b-4de6-48d1-bb53-3a1a364da590",
      "name": "Nota adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -100
      ],
      "parameters": {
        "color": 3,
        "width": 272,
        "height": 140,
        "content": "### Your AI Avatar Videos Automation Agent with Google Sheets, HTTP Nodes (Easy to set-up in 5 steps only)"
      },
      "typeVersion": 1
    },
    {
      "id": "f0de3751-d50f-4ca6-b2e4-0e9c38d21557",
      "name": "Nota adhesiva5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        260
      ],
      "parameters": {
        "color": 5,
        "width": 275,
        "height": 359,
        "content": "👈\nSet up HTTP Node.\n\nMethod : Post\nURL : https://api.heygen.com/v2/video/generate\n\nFor Set up Authentication credentials (open & check the node parameters.)\n\nThis node will create AI Video with your video id and voice id using json code.\n\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"
      },
      "typeVersion": 1
    },
    {
      "id": "cab8d398-fe34-4f64-b325-fe6ce1ad8406",
      "name": "Nota adhesiva6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        260
      ],
      "parameters": {
        "width": 275,
        "height": 279,
        "content": "👈\nSet up Google Sheets Node.\n\nSet up credentials.\n\nCreate a new sheet in Google Sheets (e.g., AI Avatar Script).\n\nCreate 2 columns: Script/voice text, Final Video Link.\n\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"
      },
      "typeVersion": 1
    },
    {
      "id": "e046ae61-1f98-4eff-8a6a-d445623520d7",
      "name": "Nota adhesiva9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        260
      ],
      "parameters": {
        "color": 3,
        "width": 275,
        "height": 359,
        "content": "👈\nSet up HTTP Node.\n\nuse given cURL json code.\n\nMethod : Get\nURL : https://api.heygen.com/v2/avatar/avatar_id/details\n\nFor Set up Authentication credentials (open & check the node parameters.)\n\nput parameter name: video-id  & paste value: video_id from past http node. his node will create AI Video with your video id and voice id using json code.\n\n\nOutput : Your AI Avatar Video Link\nFollow the steps (YouTube video): https://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL\n"
      },
      "typeVersion": 1
    },
    {
      "id": "99a5275c-3f72-4a75-94eb-276e620a6545",
      "name": "Nota adhesiva10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        260
      ],
      "parameters": {
        "width": 275,
        "height": 359,
        "content": "👈\nSet up Google Sheets Node.\n\nSet up credentials.\n\nuse given sheet in Google Sheets (e.g., AI Avatar Script).\n\nconnect the sheet parametr with Your AI Avatar Video Link in the - Final Video Link.\n\nOutput your AI Avatar video link will be uploaded in your google sheet - just open the sheet and download the video.\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "6530a519-264d-41ef-87db-280c425f481f": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "dcc4ed71-81da-4fe2-a865-cdda8a81ab2d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dcc4ed71-81da-4fe2-a865-cdda8a81ab2d": {
      "main": [
        [
          {
            "node": "6530a519-264d-41ef-87db-280c425f481f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "43bde8be-dd80-43d5-93fa-bbed038d1fc0": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Inteligencia Artificial, Marketing

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos11
Categoría2
Tipos de nodos4
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor

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.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34