Workflow

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.

Needle Team

Last updated

February 9, 2026

Connectors used

Slack

Tags

HeyGenAI AvatarVideo GenerationSlackContent CreationMarketingAI Video

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

StepWhat Happens
1. Manual triggerYou provide a topic, brief, or blog post text
2. Write scriptGPT-4.1 writes a natural-sounding script under 1,500 characters (~60 seconds)
3. Build API requestA code node constructs the HeyGen V2 API request with avatar, voice, and settings
4. Create videoHTTP POST to HeyGen's /v2/video/generate endpoint
5. Extract video IDA code node parses the response and extracts the video ID and HeyGen URL
6. Notify on SlackAI sends a formatted message to Slack with the video ID and link

Workflow Nodes

NodeTypeRole
Manual TriggerTriggerAccepts the topic or brief text
AI (GPT-4.1)AIWrites a spoken-word script optimized for avatar delivery
Code (Build Request)CodeConstructs the HeyGen V2 API request body with avatar and voice IDs
HTTP RequestHTTPSends POST request to HeyGen's video generation endpoint
Code (Extract ID)CodeParses the API response to get video_id and HeyGen URL
AI + SlackAI + ToolSends a notification to Slack with the video link

Default Settings

SettingDefault ValueNotes
AvatarDaisy-inskirt-20220818 (Daisy in Dress)Free stock avatar, works on all accounts
VoiceDaisy English (Female)Natural-sounding English voice
Background#FAFAFA (off-white)Clean, professional background
Dimensions1280 x 720 (720p)Standard HD landscape
Max script5,000 characters (~3 minutes)HeyGen API limit

Setup Instructions

  1. Click "Use template" on this page
  2. Get a HeyGen API key from heygen.com > Settings > API
  3. Set the heygen_api_key workflow variable with your API key
  4. Click the Slack node and connect your Slack workspace
  5. Run the workflow with a topic or blog post as input

Customization

What You Can ChangeHow
AvatarChange AVATAR_ID in the Build Request code node
VoiceChange VOICE_ID in the Build Request code node
BackgroundEdit the background color or type in the Build Request code node
Video dimensionsChange the dimension object (e.g., 1920x1080 for full HD)
Script styleModify the system prompt in the GPT-4.1 node
Test modeSet test: true in the Build Request node to save HeyGen credits during testing
Output channelReplace 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.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .