AutomationFlowsSocial Media › Viral Video Generator: Heygen to Tiktok & Instagram Auto-post + Any Content

Viral Video Generator: Heygen to Tiktok & Instagram Auto-post + Any Content

ByReddit Dev @harryhaz on n8n.io

This workflow automates the entire process of creating AI-generated videos from trending news content and publishing them to social media platforms (Instagram and TikTok). It runs daily at 6 AM, finds viral-worthy news, generates scripts, creates AI avatar videos using HeyGen,…

Cron / scheduled trigger★★★★☆ complexityAI-powered21 nodesPerplexityOpenAIHTTP RequestGoogle Sheets
Social Media Trigger: Cron / scheduled Nodes: 21 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #6084 — we link there as the canonical source.

This workflow follows the Google Sheets → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "HeyGen AI Video Generation with Social Media Publishing",
  "tags": [],
  "nodes": [
    {
      "id": "12077b84-937a-4317-a126-80aab5b2311e",
      "name": "Schedule Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -288,
        128
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "bbee0d58-182c-4ccc-8b81-9a5045baa6ba",
      "name": "Perplexity Search",
      "type": "n8n-nodes-base.perplexity",
      "position": [
        -64,
        128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "01c94fc6-796a-46a6-9dd2-176adbc3813c",
      "name": "Write Video Script",
      "type": "n8n-nodes-base.openAi",
      "position": [
        160,
        128
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "1a30d646-2583-4711-a8af-1303ec3fe7ea",
      "name": "Get Screenshot",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        128
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "28fdb385-a0a5-4c82-9cf0-ac84741b3e07",
      "name": "Write Video Caption",
      "type": "n8n-nodes-base.openAi",
      "position": [
        1248,
        128
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "23d6e640-5c1c-4478-b119-c24c3ce6cf6a",
      "name": "Extract URL",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        128
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "5a18e418-047a-4a41-9bd6-7d06258e50fc",
      "name": "Prepare Avatar Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1456,
        128
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "56f84477-257d-42dd-80e6-a71eba6d121c",
      "name": "Create Avatar Video (Optimized)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1680,
        128
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "7d28cd0e-e000-4179-a6e8-d0c586210cc2",
      "name": "Store to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "You need to:\n1. Create a Google Sheet\n2. Add headers: video_id, caption, timestamp, status\n3. Replace YOUR_GOOGLE_SHEET_ID with actual ID\n4. Connect your Google account",
      "position": [
        2128,
        128
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 4.5
    },
    {
      "id": "7b6a9415-6b36-4da0-9092-b00fb4f2b062",
      "name": "Prepare Sheets Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        128
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "af47ca8b-1d8b-4d70-adb4-06aa58c03ea2",
      "name": "HeyGen Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -288,
        480
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "87c82997-22c8-4761-80af-e8c0df7ecf43",
      "name": "Process HeyGen Callback",
      "type": "n8n-nodes-base.code",
      "position": [
        -64,
        480
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "8160bf99-05c0-4c3d-9349-1c39f2f36ed3",
      "name": "Get Caption from Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "This looks up the video_id in Google Sheets to get the caption",
      "position": [
        160,
        480
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 4.5
    },
    {
      "id": "f240f457-ae29-486e-b53f-6e72c83bc1eb",
      "name": "Combine Data",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        480
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "2c068a8e-2506-49a2-ae79-413b56db6c91",
      "name": "Assign Social Media IDs",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        480
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "31e17a13-f3dd-4df2-b0a0-08a60cf91fac",
      "name": "INSTAGRAM",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        384
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "62f97acb-7042-4217-b203-a79c0ca04f2b",
      "name": "TIKTOK",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        592
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "bc266583-d522-41b8-95f3-10aa0d00071a",
      "name": "Upload to tmpfiles",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        816,
        128
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "eec0d2b5-01b1-480f-854b-be5c4dadd7fe",
      "name": "Extract tmpfiles",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        128
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "1bdca4f3-f2bc-402b-8ca6-63e8ed2a4dc6",
      "name": "Upload to Blotato",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        592,
        480
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "5c95297b-750a-4970-a4e7-7bca0d5f96c5",
      "name": "Extract Blotato URL",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        480
      ],
      "parameters": {},
      "typeVersion": 2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "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
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates the entire process of creating AI-generated videos from trending news content and publishing them to social media platforms (Instagram and TikTok). It runs daily at 6 AM, finds viral-worthy news, generates scripts, creates AI avatar videos using HeyGen,…

Source: https://n8n.io/workflows/6084/ — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Social Media

This workflow automates trend extraction and social media content creation for businesses and marketers. It eliminates manual trend research and content generation by fetching trends, scoring them wit

HTTP Request, OpenAI, Reddit +5
Social Media

Managing content for multiple social media platforms manually is time-consuming and error-prone. This workflow automates content creation, image generation, approval flows, and publishing for LinkedIn

LinkedIn, OpenAI, Google Sheets +3
Social Media

This workflow runs daily to read a Google Sheets content calendar, use OpenAI to generate brand-compliant Instagram captions and images from a master brand context file, watermark each image with your

HTTP Request, Edit Image, Google Sheets +4
Social Media

This workflow runs on a schedule, pulls the next publish-ready video from Airtable, uses OpenAI, Google Gemini, and CloudConvert to generate a transcript, title, description, tags, and hashtags, then

Airtable, Facebook Graph Api, OpenAI +5
Social Media

This workflow runs every Monday, pulls the last 7 days of posts from LinkedIn, X (Twitter), and Instagram, normalizes engagement metrics, logs raw post data to Google Sheets, calculates a weighted eng

HTTP Request, Twitter, @Mookielianhd/N8N Nodes Instagram +3