{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "43bde8be-dd80-43d5-93fa-bbed038d1fc0",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -660,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6530a519-264d-41ef-87db-280c425f481f",
      "name": "Get 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "dcc4ed71-81da-4fe2-a865-cdda8a81ab2d",
      "name": "creating 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": {
          "name": "<your credential>"
        }
      },
      "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": {
          "name": "<your credential>"
        }
      },
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "eb08b935-e956-4756-9fd5-b0a196524535",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        260
      ],
      "parameters": {
        "color": 4,
        "width": 255,
        "height": 239,
        "content": "\ud83d\udc48\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": "Sticky Note3",
      "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": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        260
      ],
      "parameters": {
        "color": 5,
        "width": 275,
        "height": 359,
        "content": "\ud83d\udc48\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": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        260
      ],
      "parameters": {
        "width": 275,
        "height": 279,
        "content": "\ud83d\udc48\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": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        260
      ],
      "parameters": {
        "color": 3,
        "width": 275,
        "height": 359,
        "content": "\ud83d\udc48\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": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        260
      ],
      "parameters": {
        "width": 275,
        "height": 359,
        "content": "\ud83d\udc48\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
    }
  ],
  "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 \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}