Monday, 30 June 2025

🎬 HeyGen Avatar + n8n Automation Guide

HeyGen Avatar + n8n Automation Workflow

🎬 HeyGen Avatar + n8n Automation Guide

🎯 Complete Workflow Overview

1
Setup HeyGen
Create account, record 2-5 min footage, clone voice
2
Configure n8n
Setup HTTP nodes, add API authentication
3
Get IDs
Retrieve Avatar ID and Voice ID
4
Generate Video
Send script to HeyGen API
5
Poll Status
Wait and check until video completed

πŸŽ₯ HeyGen Avatar Setup

Recording Requirements:
  • High-resolution camera in well-lit, quiet environment
  • Look directly into camera
  • Use generic gestures with hands below chest
  • Exaggerate emotions for expressive avatar
  • Submit 2-5 minutes of footage

πŸ”§ n8n API Configuration

Authentication Setup

Create Header Auth credential in n8n:

Name: "HeyGen Demo" API Key: [From HeyGen Settings > Subscriptions & API]

Key API Endpoints

1. List All Avatars (V2)

GET /v2/avatars

Returns all available avatars with their IDs

2. List All Voices (V2)

GET /v2/voices

Returns all available voices with their IDs

3. Generate Video (V2)

POST /v2/video/generate

Creates a new video with specified avatar and script

4. Get Video Status

GET /v1/video.status.get?video_id={video_id}

Checks the processing status of a video

πŸ“ Video Generation Request Body

{ "caption": false, "title": "My Generated Video", "dimension": { "width": 1920, "height": 1080 }, "video_inputs": [ { "character": { "type": "avatar", "avatar_id": "YOUR_AVATAR_ID", "avatar_style": "normal" }, "voice": { "type": "text", "input_text": "Your script text here", "voice_id": "YOUR_VOICE_ID", "speed": 1.0 } } ] }

πŸ”„ Polling Mechanism

Generate Video
Wait 30s
Check Status
If Complete?


✅ Yes: Continue

❌ No: Wait Again

The workflow continues polling until the video status returns "completed"

πŸš€ Example Use Case: News Video Automation

1
Scrape News
Use Apify node to gather content
2
Generate Script
GPT-4.1 Mini processes into summary
3
Create Video
HeyGen avatar reads the script

πŸ’‘ Pro Tips for Success

  • Test your avatar recording in good lighting conditions
  • Keep scripts concise and natural-sounding
  • Use appropriate wait times in polling (30+ seconds recommended)
  • Store avatar_id and voice_id as n8n variables for reuse
  • Monitor API rate limits and usage
  • Consider video dimensions based on your target platform
  • Use the free HeyGen plan to test before scaling
🎯 Key Benefits:
This automation allows you to significantly increase content output by combining AI-powered script generation with personalized avatar videos. Perfect for news summaries, educational content, social media posts, and regular content creation workflows.

🎬 HeyGen Avatar + n8n Automation Guide

HeyGen Avatar + n8n Automation Workflow 🎬 HeyGen Avatar + n8n Automation Guide ...