Generate custom AI videos with Digital Avatars using HeyGen API
π₯ n8n Workflow: Generate AI Videos with HeyGen
π Overview
This automation connects directly to HeyGen's powerful AI video generation platform. It allows you to programmatically create videos with digital avatars and voiceovers, perfect for scaling your content creation for social media, marketing campaigns, or personalized messages without ever opening a video editor.
π© The Problem
Creating video content is incredibly time-consuming and expensive. You have to write scripts, record audio, find actors or create complex animations, piece everything together in an editor, and then wait for it to render. Every minor change or personalization requires repeating the entire frustrating process. This manual work is a major bottleneck, making it nearly impossible to produce large volumes of high-quality video content quickly and affordably.
β¨ The Solution
This workflow acts as your personal, automated video production assistant! When you provide a script, the automation instantly sends instructions to HeyGen to begin creating your video. It tells the AI which avatar and voice to use and starts the generation process. Then, it cleverly waits and periodically checks the status until your new video is finished and ready. Itβs a completely hands-off process that transforms simple text into professional AI videos on demand.
π§ What It Does
-
Send a request to HeyGen's API to generate a video with:
- Custom avatar
- Scripted voice-over
- Background color and dimension
-
Wait 30 seconds
-
Check video status
-
Loop until video is completed, failed, or still processing
βοΈ Simple Setup
This workflow is a pre-built blueprint, designed to be up and running in minutes!
- 1. Upload: Simply upload the provided JSON file into your n8n instance.
- 2. Connect: Connect your app credentials (e.g., your HeyGen account). The workflow will show you exactly where.
- 3. Activate: Turn the workflow on, and it's ready to go! Let your new automated employee get to work.
This free n8n workflow allows you to generate AI videos using HeyGen via their API.
π Explore more workflows
β€οΈ Buy more workflows at: adamcrafts π¦Ύ Custom workflows at: adamcrafts@cloudysoftwares.com adamaicrafts@gmail.com
> Build once, customize endlessly, and scale your video content like never before. π
Generate Custom AI Videos with Digital Avatars Using HeyGen API (Placeholder)
This n8n workflow template provides a foundational structure for interacting with external APIs, incorporating conditional logic, and managing execution flow. While the specific HeyGen API integration is not fully defined in this JSON, the template demonstrates key n8n capabilities for building robust automation.
What it does
This workflow showcases how to:
- Make an HTTP Request: Initiates a request to an external API endpoint. This node is typically used to send data, retrieve information, or trigger actions in other services.
- Implement Conditional Logic: Uses a
Switchnode to create different execution paths based on specific conditions. This allows for dynamic workflow behavior. - Introduce Delays: Incorporates a
Waitnode to pause the workflow's execution for a specified duration. This is useful for rate limiting, waiting for external processes, or scheduling. - Add Documentation: Includes a
Sticky Notefor in-workflow documentation, helping to explain specific parts of the workflow.
Prerequisites/Requirements
- An n8n instance (cloud or self-hosted).
- Basic understanding of HTTP requests and API interactions.
- (Implicit) An API endpoint to interact with via the
HTTP Requestnode.
Setup/Usage
- Import the workflow:
- Copy the provided JSON content.
- In your n8n instance, click "New" in the Workflows section.
- Click the three dots menu (...) and select "Import from JSON".
- Paste the JSON content and click "Import".
- Configure the
HTTP Requestnode:- Double-click the
HTTP Requestnode. - Set the
URL,Method,Headers, andBodyaccording to the API you intend to interact with. - Configure credentials if required by the API.
- Double-click the
- Configure the
Switchnode:- Double-click the
Switchnode. - Define the
Valueto check and addCaseswithConditionsto create different output branches. - Connect subsequent nodes to each output branch to define the actions for each condition.
- Double-click the
- Configure the
Waitnode:- Double-click the
Waitnode. - Specify the
AmountandUnitfor the desired delay (e.g., 5 seconds, 1 minute).
- Double-click the
- Review the
Sticky Note:- The
Sticky Notecan be used to add comments or explanations about specific parts of the workflow.
- The
This workflow serves as a flexible starting point. You would typically expand upon it by connecting additional nodes to process the API responses, handle errors, and integrate with other services to achieve your desired automation.
Related Templates
AI-powered code review with linting, red-marked corrections in Google Sheets & Slack
Advanced Code Review Automation (AI + Lint + Slack) Whoβs it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting β all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0β10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your teamβs channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow β reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why itβs valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n β combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your teamβs review history transparent and centralized.
Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review
This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.
Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution
AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) π§ AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative β all powered by AI logic, sir. --- π‘ Key Advantages β‘ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. π§ AI Qualification Engine An OpenAI-powered Agent evaluates the leadβs industry, region, and needs to generate a persona summary and routing rationale. π Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. π¬ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. π Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- βοΈ How It Works HubSpot Trigger β Captures a new lead as soon as itβs created in HubSpot. Fetch Contact Data β Retrieves all relevant fields like name, company, and industry. Clean & Format Data β A Code node standardizes and structures the data for consistency. Airtable Record Creation β Logs the lead data into the βLeadsβ table for centralized tracking. AI Agent Qualification β The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update β Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification β Sends a real-time message tagging the rep with lead info. Gmail Notification β Sends a personalized handoff email with context and follow-up actions. HubSpot Sync β Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- π οΈ Setup Steps Trigger Node: HubSpot β Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the βLeadsβ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- π Credentials Required HubSpot OAuth2 API β To fetch and update leads. Airtable Personal Access Token β To store and update lead data. OpenAI API β To power the AI qualification and matching logic. Slack OAuth2 β For sending team notifications. Gmail OAuth2 β For automatic email alerts to assigned reps, sir. --- π€ Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- π¬ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular β perfect for scaling across global sales teams, sir.