Viral video generator: HeyGen to TikTok & Instagram auto-post + any content
HeyGen AI Video Generation with Social Media Publishing Description This workflow automates the entire process of creating AI-generated videos from trending news content and publishing them to social media platforms (...
Template notes
HeyGen AI Video Generation with Social Media Publishing
Description
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, and automatically publishes to multiple social platforms.
How it works
Content Discovery & Script Generation 1. Schedule Trigger: Runs daily at 6 AM or any time you choose. 2. Perplexity Search: Finds trending news articles that would make good viral content 3. Write Video Script: Uses GPT-4.1 to create a 30-second video script with hook, main content, and CTA 4. Extract URL: Parses the article URL and script data for further processing
Video Creation Pipeline 5. Get Screenshot: Uses ScreenshotOne API to create an animated scrolling video of the news article 6. Upload to Cloudinary: Temporarily stores the background video 7. Write Video Caption: Generates an engaging social media caption (150-200 characters) 8. Prepare Avatar Data: Combines all data needed for HeyGen video generation 9. Create Avatar Video: Sends request to HeyGen API to generate AI avatar video with: - Talking photo avatar - Text-to-speech voice - Background video from the news article - 720x1280 dimensions (vertical format)
Data Management 10. Prepare Sheets Data: Formats video metadata 11. Store to Google Sheets: Saves videoid, caption, timestamp, and status for tracking
Webhook Processing (Asynchronous) 12. HeyGen Webhook: Receives callback when video generation is complete 13. Process HeyGen Callback: Extracts video URLs and status from webhook 14. Get Caption from Sheets: Retrieves the associated caption using videoid 15. Combine Data: Merges video data with caption