This workflow automates the process of creating an AI-generated avatar video using HeyGen and directly uploading it to YouTube. By sending text input via a webhook, the workflow generates a video with a chosen avatar and voice, waits for processing, downloads the completed file, and publishes it to your configured YouTube channel.
This template is ideal for automating content creation pipelines, such as daily news updates, explainer videos, or narrated scripts, without manual intervention.
Instead of recording and editing videos manually, this template allows you to feed text content into a webhook and have a ready-to-publish video on your YouTube channel within minutes.
Import the Workflow: Download and import this template JSON into your n8n instance.
Configure the Webhook: Copy the webhook URL from n8n and use it to send requests with title
and content
.
{
"title": "Tech News Update",
"content": "Today’s top story is about AI advancements in video generation..."
}
Add HeyGen Credentials:
x-api-key
.avatar_id
and voice_id
from HeyGen.
avatar_id
and voice_id
, first retrieve your API key from the HeyGen dashboard. With this key, you can use HeyGen’s API to look up available options: run a GET request to https://api.heygen.com/v2/avatars
to see a list of avatars along with their avatar_id
, and then run a GET request to https://api.heygen.com/v2/voices
to see a list of voices with their voice_id
. Once you’ve identified the avatar and voice you want to use, copy their IDs and paste them into the Set HeyGen Parameters node in your n8n workflow.Set Up YouTube Credentials:
https://<your-n8n-domain>/rest/oauth2-credential/callback
). Copy the Client ID and Client Secret, then in n8n create new credentials for YouTube OAuth2 API. Enter the values, authenticate with your Google account to grant upload permissions, and test the connection. Once complete, the YouTube node will be ready to upload videos automatically.Activate the Workflow: Once configured, enable the workflow. Sending a POST request to the webhook with title and content will trigger the full process.