Generate AI Avatar Video with HeyGen
Generate an AI avatar video with HeyGen from a topic or blog post. AI writes the script, HeyGen renders the video with a talking avatar, and the video ID is shared to Slack.
Last updated
February 9, 2026
Connectors used
Tags
Key Takeaways
- Topic to video in one workflow - Provide a topic or blog post and get a professional AI avatar video back
- AI-written scripts - GPT-4.1 writes natural, punchy scripts optimized for talking-head delivery
- HeyGen API integration - Sends the script to HeyGen's V2 API to render a video with a customizable avatar
- Slack notification - Video ID and HeyGen link are posted to Slack as soon as rendering starts
- Fully customizable - Change the avatar, voice, background color, and video dimensions
What This Workflow Does
This workflow turns any topic, brief, or blog post into an AI avatar video using HeyGen. You provide the input text, AI writes a script optimized for spoken delivery, and the workflow sends it to HeyGen's API to generate a talking-head video. Once the video starts rendering, you get a Slack notification with the video ID and a direct link to view it in HeyGen.
Use cases:
- Create marketing videos from blog posts or product updates
- Generate explainer videos for onboarding or training
- Produce social media video content at scale
- Build a library of talking-head videos without filming or editing
How It Works
| Step | What Happens |
|---|---|
| 1. Manual trigger | You provide a topic, brief, or blog post text |
| 2. Write script | GPT-4.1 writes a natural-sounding script under 1,500 characters (~60 seconds) |
| 3. Build API request | A code node constructs the HeyGen V2 API request with avatar, voice, and settings |
| 4. Create video | HTTP POST to HeyGen's /v2/video/generate endpoint |
| 5. Extract video ID | A code node parses the response and extracts the video ID and HeyGen URL |
| 6. Notify on Slack | AI sends a formatted message to Slack with the video ID and link |
Workflow Nodes
| Node | Type | Role |
|---|---|---|
| Manual Trigger | Trigger | Accepts the topic or brief text |
| AI (GPT-4.1) | AI | Writes a spoken-word script optimized for avatar delivery |
| Code (Build Request) | Code | Constructs the HeyGen V2 API request body with avatar and voice IDs |
| HTTP Request | HTTP | Sends POST request to HeyGen's video generation endpoint |
| Code (Extract ID) | Code | Parses the API response to get video_id and HeyGen URL |
| AI + Slack | AI + Tool | Sends a notification to Slack with the video link |
Default Settings
| Setting | Default Value | Notes |
|---|---|---|
| Avatar | Daisy-inskirt-20220818 (Daisy in Dress) | Free stock avatar, works on all accounts |
| Voice | Daisy English (Female) | Natural-sounding English voice |
| Background | #FAFAFA (off-white) | Clean, professional background |
| Dimensions | 1280 x 720 (720p) | Standard HD landscape |
| Max script | 5,000 characters (~3 minutes) | HeyGen API limit |
Setup Instructions
- Click "Use template" on this page
- Get a HeyGen API key from heygen.com > Settings > API
- Set the
heygen_api_keyworkflow variable with your API key - Click the Slack node and connect your Slack workspace
- Run the workflow with a topic or blog post as input
Customization
| What You Can Change | How |
|---|---|
| Avatar | Change AVATAR_ID in the Build Request code node |
| Voice | Change VOICE_ID in the Build Request code node |
| Background | Edit the background color or type in the Build Request code node |
| Video dimensions | Change the dimension object (e.g., 1920x1080 for full HD) |
| Script style | Modify the system prompt in the GPT-4.1 node |
| Test mode | Set test: true in the Build Request node to save HeyGen credits during testing |
| Output channel | Replace the Slack notification with email, webhook, or another connector |
Finding your avatar and voice IDs:
# List available avatars curl -H 'X-Api-Key: YOUR_KEY' https://api.heygen.com/v2/avatars # List available voices curl -H 'X-Api-Key: YOUR_KEY' https://api.heygen.com/v2/voices
FAQ
Q: Do I need a paid HeyGen account? A: You need a HeyGen API key. Check heygen.com for current pricing and free tier availability. The default avatar and voice are free stock assets.
Q: How long does video rendering take? A: Typically 1-5 minutes depending on script length and HeyGen's queue. The workflow sends the Slack notification immediately when rendering starts.
Q: What's the maximum video length? A: The script can be up to 5,000 characters, which is roughly 3 minutes of speech. The default prompt targets 1,500 characters (~60 seconds).
Q: Can I use my own custom avatar?
A: Yes. Upload a custom avatar in HeyGen, find its ID via the API, and update the AVATAR_ID in the Build Request code node.
Q: Do video URLs expire? A: HeyGen video URLs expire after 7 days. Download or re-host videos you want to keep permanently.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.