HeyGen + Google Drive, avatar videos shipped fast
You’ve got scripts ready, deadlines looming, and then the video “process” starts: copy text, generate audio, upload assets, wait, download, rename, upload again. Somewhere in there, files go missing or end up in the wrong folder. It’s exhausting.
This HeyGen Drive automation hits marketing managers and content leads hard, but product teams shipping onboarding videos feel it too. You will turn a plain script into a finished avatar MP4, stored neatly in Google Drive, without babysitting renders.
Below, you’ll see exactly what this workflow does, what you need, and how the moving parts fit together so you can run video production like a pipeline instead of a scramble.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: HeyGen + Google Drive, avatar videos shipped fast
flowchart LR
subgraph sg0["Flow 1"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Wait 5 Seconds", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check If Completed", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Download Video"]
n3@{ icon: "mdi:cog", form: "rounded", label: "Upload to Google Drive", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Respond to Webhook"]
n5@{ icon: "mdi:cog", form: "rounded", label: "Download from Drive", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Generate Audio with ElevenLabs"]
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Audio to HeyGen"]
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Avatar Video with Audio"]
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "Extract Video ID", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Poll Video Status"]
n11@{ icon: "mdi:swap-vertical", form: "rounded", label: "Extract Video Details", pos: "b", h: 48 }
n12@{ icon: "mdi:swap-vertical", form: "rounded", label: "Parse Request Parameters", pos: "b", h: 48 }
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Webhook - Receive Request"]
n2 --> n3
n0 --> n10
n9 --> n0
n10 --> n1
n1 --> n11
n1 --> n0
n5 --> n4
n11 --> n2
n7 --> n8
n3 --> n5
n12 --> n6
n13 --> n12
n8 --> n9
n6 --> n7
end
subgraph sg1["Error Handler Flow"]
direction LR
n14@{ icon: "mdi:play-circle", form: "rounded", label: "Error Handler Trigger", pos: "b", h: 48 }
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Send a message"]
n14 --> n15
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n14 trigger
class n1 decision
class n2,n4,n6,n7,n8,n10,n13 api
classDef customIcon fill:none,stroke:none
class n2,n4,n6,n7,n8,n10,n13,n15 customIcon
Why This Matters: Video Production Gets Stuck in Admin Work
Avatar videos are supposed to remove friction, but the reality can be the opposite. You still have to move assets between tools, keep naming consistent, and check render status like you’re waiting for a cake to bake. When you’re producing product demos, onboarding clips, or weekly explainers, that “small” manual work repeats constantly. One missed download or a mislabeled file turns into Slack pings, re-uploads, and awkward “where’s the video?” follow-ups. Honestly, the mental load is worse than the minutes spent clicking around.
It adds up fast. Here’s where it breaks down in real teams:
- People generate the video, then forget to move the MP4 into the right Google Drive folder.
- Renders finish at random times, so someone keeps checking HeyGen instead of doing actual work.
- File naming drifts over time, which makes searching and reusing clips a pain later.
- When something fails mid-run, you often find out only after a stakeholder asks for the link.
What You’ll Build: Script to HeyGen Video, Automatically Filed in Drive
This workflow turns video creation into a simple request-and-deliver loop. It starts when your app, form, or internal tool sends a script plus a few choices (avatar ID, voice ID, and style) to an n8n webhook. n8n sends the script to ElevenLabs to generate a natural voiceover, then uploads that audio to HeyGen as an asset. HeyGen uses your selected avatar and the voice track to render the final clip, while n8n checks status in the background until it’s finished. Once the MP4 is ready, the workflow downloads it, uploads it into Google Drive with structured naming, and returns the finished file back through the webhook response so your frontend can instantly show “done” (or let users download it).
The flow is simple to reason about. Webhook in, audio out, video render, then a clean handoff to Google Drive. If anything breaks, a Slack alert fires so you know right away instead of discovering it later.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you publish 10 short onboarding clips per week. Manually, you might spend about 10 minutes generating audio, 10 minutes setting up HeyGen, and another 10 minutes downloading, renaming, and filing in Drive. That’s roughly 30 minutes per video, or about 5 hours a week. With this workflow, you submit the script in a POST request (a minute), then wait for rendering in the background while the MP4 lands in Google Drive automatically. Most teams get several hours back weekly, and the process is far more reliable.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- HeyGen to render avatar videos from audio.
- Google Drive to store MP4s with clean naming.
- ElevenLabs API key (get it from your ElevenLabs dashboard).
Skill level: Intermediate. You’ll be pasting API keys, connecting Google Drive OAuth, and testing webhook requests with sample payloads.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A webhook receives your script and video choices. Your system sends a POST request that includes the script text plus fields like avatar_id, voice_id, and video_style. The workflow immediately maps and validates those inputs so downstream steps don’t get garbage data.
The script becomes audio. n8n calls ElevenLabs to generate the voiceover, then prepares the audio file for upload. This is the piece that makes videos feel “produced” without recording anything.
HeyGen renders the avatar clip while n8n waits. The audio is uploaded to HeyGen, a clip is created with your chosen avatar and style, and then the workflow polls HeyGen every few seconds until the render is complete. No tab-refreshing required.
The finished MP4 is stored and returned. n8n downloads the final video, uploads it into Google Drive using a structured name, then retrieves it and returns it via webhook response for your frontend or internal portal.
You can easily modify the storage folder and naming rules to match how your team organizes campaigns, clients, or course modules. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Webhook Trigger
This workflow starts when an external system calls your webhook, so you’ll configure the entry point first.
- Add the Incoming Webhook Trigger node and open it.
- Copy the webhook URL from Incoming Webhook Trigger and use it in your external app or test client.
- Ensure the execution flow is connected from Incoming Webhook Trigger to Interpret Request Inputs.
Step 2: Connect the Input Parsing and Audio Generation
These nodes map incoming payload fields and then generate audio for the avatar.
- Open Interpret Request Inputs and map any required input fields from the webhook payload.
- Open Create Audio via ElevenLabs and configure the request to your ElevenLabs endpoint (headers, body, and URL).
- Connect Interpret Request Inputs → Create Audio via ElevenLabs.
- Connect Create Audio via ElevenLabs → Send Audio to HeyGen.
Credential Required: If your ElevenLabs endpoint requires authentication, add the appropriate credentials in Create Audio via ElevenLabs (for example, headers or an API key).
Credential Required: If your HeyGen endpoint requires authentication, add the appropriate credentials in Send Audio to HeyGen (for example, headers or an API key).
Step 3: Generate and Poll the Avatar Video
These steps request the video generation, parse the identifier, then poll until the video is complete.
- Open Send Audio to HeyGen and ensure it sends audio output to the HeyGen API.
- Open Generate Avatar Clip to trigger the video creation request and connect it from Send Audio to HeyGen.
- In Parse Video Identifier, extract the video ID returned by Generate Avatar Clip.
- Configure Pause 5 Seconds to create a brief delay before polling.
- Open Query Video Status and set it to query HeyGen using the parsed video ID.
- In Verify Completion, define the condition that indicates the video is ready. The false path should loop back to Pause 5 Seconds.
⚠️ Common Pitfall: If Verify Completion doesn’t correctly detect the “ready” state, the workflow will keep polling indefinitely.
Step 4: Fetch, Store, and Return the Video
Once the video is ready, the workflow fetches the final asset, stores it, then returns a response to the webhook caller.
- Open Map Video Details and map the final video URL and any metadata needed for storage.
- Configure Fetch Rendered Video to download the video file using the mapped URL.
- In Store in Drive, set the destination folder and file name for the video upload.
- Use Retrieve from Drive to fetch the stored file URL or ID for returning to the requester.
- In Return Webhook Reply, return the file link or details to the webhook caller.
Credential Required: Connect your Google Drive credentials in Store in Drive.
Credential Required: Connect your Google Drive credentials in Retrieve from Drive.
Step 5: Add Error Handling
This workflow includes a dedicated error path that sends alerts to Slack.
- Open Handle Error Trigger to ensure it is enabled for workflow errors.
- Configure Dispatch Slack Alert with the channel and message format you want.
- Confirm the connection from Handle Error Trigger → Dispatch Slack Alert.
Credential Required: Connect your Slack credentials in Dispatch Slack Alert.
Step 6: Test and Activate Your Workflow
Run a full test to verify video generation, polling, storage, and response behavior before activating.
- Click Execute Workflow and send a test request to the Incoming Webhook Trigger URL.
- Verify that Create Audio via ElevenLabs, Send Audio to HeyGen, and Generate Avatar Clip execute in sequence.
- Confirm Verify Completion eventually passes and the flow reaches Fetch Rendered Video → Store in Drive → Retrieve from Drive.
- Check that Return Webhook Reply returns a valid file link or response body.
- Toggle the workflow to Active for production use.
Troubleshooting Tips
- Google Drive credentials can expire or need specific permissions. If things break, check the connected Google account in n8n Credentials and confirm it can create files in the target folder.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
Plan for about 45 minutes if you already have the API keys.
No. You’ll connect accounts, paste API keys, and test a webhook request.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in ElevenLabs and HeyGen API usage costs, which usually land at a few cents per render depending on length and settings.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. Most people tweak the “Interpret Request Inputs” (Set) node to accept different fields, then adjust “Store in Drive” to change folder structure and naming. You can also swap the polling cadence by changing the “Pause 5 Seconds” (Wait) node, especially if you render longer videos. If your team wants a spreadsheet trail, add a Google Sheets row write right after “Map Video Details”.
Usually it’s an invalid or expired HeyGen API key, or a mismatch between the avatar_id you’re sending and what your account can access. Double-check the HTTP Request headers in the HeyGen steps and confirm the avatar exists in your HeyGen workspace. If it fails only sometimes, rate limits or a temporary HeyGen outage can be the culprit. One more gotcha: if the audio upload step returns an asset ID but the next step can’t find it, you may need a slightly longer wait before generating the clip.
On n8n Cloud, your limit is mostly about monthly executions (Starter is designed for smaller workloads; Pro handles more). If you self-host, there’s no execution cap, but your server still needs enough memory and CPU to handle concurrent jobs. Practically, HeyGen render time is the bottleneck, not n8n. Many teams run dozens of videos a day by queuing requests and letting the polling loop finish them as they complete.
For this workflow, n8n is usually a better fit because it handles the polling loop (wait, check status, repeat) cleanly and gives you more control over how files are handled. You also get a real error workflow with Slack alerts, which matters when you’re running this in production. Zapier and Make can work, but multi-step rendering pipelines often become expensive or fiddly when you need conditional branching and repeated status checks. n8n’s self-hosting option is a big deal if you run high volume. If you’re unsure, Talk to an automation expert and we’ll sanity-check the best tool for your setup.
Once this is running, video creation stops being a “project” and becomes a repeatable request. Your MP4s land in Drive, your team stays unblocked, and you can ship more videos without adding more busywork.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.