Generate AI Videos with HeyGen
detail.loadingPreview
Automate AI video generation using HeyGen's API, powered by n8n.
About This Workflow
This workflow leverages the HeyGen API to generate AI-powered videos directly within n8n. You can specify an AI avatar, voice, and input text to create custom video content. The workflow monitors the video generation status and outputs the video URL upon completion.
Key Features
- Integrates with HeyGen API for video generation.
- Supports customization of AI avatars and voices.
- Allows dynamic input of text for voiceovers.
- Includes a polling mechanism to check video generation status.
- Outputs the generated video URL upon successful creation.
How To Use
Generate AI Videos with HeyGen in n8n
This workflow allows you to generate AI-powered videos using HeyGen, a platform that provides customizable AI avatars and voices. By integrating HeyGen with n8n, you can create videos by providing a text input, which is then spoken by an AI-generated avatar.
👉🏻 Try HeyGen for free 👈🏻
Setup
Step 1: Create a HeyGen Account & API Key
- Sign up for a HeyGen account.
- Navigate to your account settings and locate your API Key.
- Copy your API key for use in n8n.
⚠️ To use Heygen API you need to purchase API credits
Step 2: Create n8n Credentials
- In n8n, create new credentials and select "Custom Auth" as the authentication type.
- In the Name provide :
X-Api-Key - And in the value paste your API key from Heygen
- Update the
Create VideoandGet Video Statushttp nodes with the right credentials.
Step 3: Choose an Avatar and a Voice
HeyGen provides multiple AI avatars and voice options. You need to choose:
- An Avatar ID (representing the AI-generated presenter)
- A Voice ID (which will read your text)
To find available avatars and voices:
- Visit the HeyGen API Documentation or check the list in your HeyGen account.
- Copy the Avatar ID and Voice ID that you want to use.
Workflow Nodes
- When clicking ‘Test workflow’: This is the manual trigger node to start the workflow execution.
- Config: This
setnode defines the video generation parameters:avatar_id: The ID of the desired AI avatar.voice_id: The ID of the desired AI voice.text: The script for the video's audio.
- Create Video: This
httpRequestnode sends a POST request to the HeyGen API to initiate video generation. It uses theavatar_id,voice_id, andtextfrom theConfignode. - Wait: This
waitnode pauses the workflow execution for a specified amount of time (10 seconds in this case) to allow the video generation process to start. - Get Video Status: This
httpRequestnode queries the HeyGen API to retrieve the current status of the generated video, using thevideo_idobtained from theCreate Videonode. - is Completed: This
ifnode checks if the video generation status is 'completed'. - Output: If the video is completed, this
setnode extracts and stores thevideo_urlfrom the video status response.
Apps Used
Workflow JSON
{
"id": "eca3181e-ef0d-42ba-8222-2d48b735fc75",
"name": "Generate AI Videos with HeyGen",
"nodes": 16,
"category": "Marketing",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: eca3181e-ef0d...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
AI-Powered On-Page SEO Audit & Report Automation
Instantly generate comprehensive on-page SEO technical and content audits for any website URL. This AI-powered workflow automates the entire process, from scraping the page to delivering a detailed report directly to your inbox, empowering you to optimize for better search rankings and user engagement.
Automate LinkedIn Content Promotion for Your Ghost Blog with AI
Effortlessly promote your latest Ghost blog posts on LinkedIn. This workflow leverages AI to generate engaging, professional LinkedIn messages based on your article content and saves them, along with article metadata, directly to a Google Sheet.
AI-Powered Instagram Comment Automation
This n8n workflow intelligently automates responses to Instagram comments, leveraging advanced AI to engage with your audience. It filters out irrelevant content and personalizes replies, saving you time while boosting your social media presence.