{
  "name": "Viral video generator: HeyGen to TikTok & Instagram auto-post + any content",
  "nodes": [
    {
      "id": "12077b84-937a-4317-a126-80aab5b2311e",
      "name": "Schedule Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -288,
        128
      ]
    },
    {
      "id": "bbee0d58-182c-4ccc-8b81-9a5045baa6ba",
      "name": "Perplexity Search",
      "type": "n8n-nodes-base.perplexity",
      "position": [
        -64,
        128
      ]
    },
    {
      "id": "01c94fc6-796a-46a6-9dd2-176adbc3813c",
      "name": "Write Video Script",
      "type": "n8n-nodes-base.openAi",
      "position": [
        160,
        128
      ]
    },
    {
      "id": "1a30d646-2583-4711-a8af-1303ec3fe7ea",
      "name": "Get Screenshot",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        128
      ]
    },
    {
      "id": "28fdb385-a0a5-4c82-9cf0-ac84741b3e07",
      "name": "Write Video Caption",
      "type": "n8n-nodes-base.openAi",
      "position": [
        1248,
        128
      ]
    },
    {
      "id": "23d6e640-5c1c-4478-b119-c24c3ce6cf6a",
      "name": "Extract URL",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        128
      ]
    },
    {
      "id": "5a18e418-047a-4a41-9bd6-7d06258e50fc",
      "name": "Prepare Avatar Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1456,
        128
      ]
    },
    {
      "id": "56f84477-257d-42dd-80e6-a71eba6d121c",
      "name": "Create Avatar Video (Optimized)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1680,
        128
      ]
    },
    {
      "id": "7d28cd0e-e000-4179-a6e8-d0c586210cc2",
      "name": "Store to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2128,
        128
      ]
    },
    {
      "id": "7b6a9415-6b36-4da0-9092-b00fb4f2b062",
      "name": "Prepare Sheets Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        128
      ]
    },
    {
      "id": "af47ca8b-1d8b-4d70-adb4-06aa58c03ea2",
      "name": "HeyGen Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -288,
        480
      ]
    },
    {
      "id": "87c82997-22c8-4761-80af-e8c0df7ecf43",
      "name": "Process HeyGen Callback",
      "type": "n8n-nodes-base.code",
      "position": [
        -64,
        480
      ]
    },
    {
      "id": "8160bf99-05c0-4c3d-9349-1c39f2f36ed3",
      "name": "Get Caption from Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        160,
        480
      ]
    },
    {
      "id": "f240f457-ae29-486e-b53f-6e72c83bc1eb",
      "name": "Combine Data",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        480
      ]
    },
    {
      "id": "2c068a8e-2506-49a2-ae79-413b56db6c91",
      "name": "Assign Social Media IDs",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        480
      ]
    },
    {
      "id": "31e17a13-f3dd-4df2-b0a0-08a60cf91fac",
      "name": "INSTAGRAM",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        384
      ]
    },
    {
      "id": "62f97acb-7042-4217-b203-a79c0ca04f2b",
      "name": "TIKTOK",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        592
      ]
    },
    {
      "id": "bc266583-d522-41b8-95f3-10aa0d00071a",
      "name": "Upload to tmpfiles",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        816,
        128
      ]
    },
    {
      "id": "eec0d2b5-01b1-480f-854b-be5c4dadd7fe",
      "name": "Extract tmpfiles",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        128
      ]
    },
    {
      "id": "1bdca4f3-f2bc-402b-8ca6-63e8ed2a4dc6",
      "name": "Upload to Blotato",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        592,
        480
      ]
    },
    {
      "id": "5c95297b-750a-4970-a4e7-7bca0d5f96c5",
      "name": "Extract Blotato URL",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        480
      ]
    }
  ],
  "connections": {
    "Extract URL": {
      "main": [
        [
          {
            "node": "Get Screenshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Data": {
      "main": [
        [
          {
            "node": "Upload to Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Screenshot": {
      "main": [
        [
          {
            "node": "Upload to tmpfiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HeyGen Webhook": {
      "main": [
        [
          {
            "node": "Process HeyGen Callback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract tmpfiles": {
      "main": [
        [
          {
            "node": "Write Video Caption",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Perplexity Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity Search": {
      "main": [
        [
          {
            "node": "Write Video Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Blotato": {
      "main": [
        [
          {
            "node": "Extract Blotato URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to tmpfiles": {
      "main": [
        [
          {
            "node": "Extract tmpfiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Video Script": {
      "main": [
        [
          {
            "node": "Extract URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Blotato URL": {
      "main": [
        [
          {
            "node": "Assign Social Media IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Avatar Data": {
      "main": [
        [
          {
            "node": "Create Avatar Video (Optimized)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Sheets Data": {
      "main": [
        [
          {
            "node": "Store to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Video Caption": {
      "main": [
        [
          {
            "node": "Prepare Avatar Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Social Media IDs": {
      "main": [
        [
          {
            "node": "INSTAGRAM",
            "type": "main",
            "index": 0
          },
          {
            "node": "TIKTOK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Caption from Sheets": {
      "main": [
        [
          {
            "node": "Combine Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process HeyGen Callback": {
      "main": [
        [
          {
            "node": "Get Caption from Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Avatar Video (Optimized)": {
      "main": [
        [
          {
            "node": "Prepare Sheets Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}