HeyGen + Google Sheets: avatar video links logged
You generate an AI avatar video, walk away, come back… and now you’re hunting for the final URL. Maybe it’s buried in a dashboard. Maybe the render failed and nobody noticed. That “quick” task turns into a mini project.
This hits marketers shipping lots of variations, but agency owners and ops-minded creators feel it too. HeyGen Sheets logging solves the messy middle by capturing each finished video link in a Google Sheet, automatically, so you always have a clean record.
Below you’ll see how the workflow runs in n8n, what it produces, and how to adapt it for your own video pipeline.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: HeyGen + Google Sheets: avatar video links logged
flowchart LR
subgraph sg0["When clicking ‘Test workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Test workflow’", pos: "b", h: 48 }
n1@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Output", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-horizontal", form: "rounded", label: "is Completed", 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/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Video"]
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Config", 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/>Get Video Status"]
n1 --> n6
n5 --> n4
n4 --> n1
n3 --> n2
n3 --> n1
n6 --> n3
n0 --> n5
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 n0 trigger
class n3 decision
class n4,n6 api
classDef customIcon fill:none,stroke:none
class n4,n6 customIcon
The Problem: Render links get lost (and nobody trusts the list)
HeyGen renders are asynchronous. You submit a script and settings, then you wait while the video processes. That waiting period is where things fall apart. Someone refreshes the page a few times, forgets to copy the URL, pastes the wrong link into a doc, or sends a preview link that later expires. When you’re doing a handful of videos, it’s annoying. When you’re doing campaigns, onboarding sequences, or training modules, it becomes a reliability problem that blocks publishing.
The friction compounds fast. Here’s where it usually breaks down.
- People end up checking HeyGen manually every few minutes, which pulls focus from actual creative work.
- Links get pasted into Slack, Notion, or emails with no single source of truth later.
- When a render fails or takes longer, nobody notices until the deadline is already tight.
- Without consistent logging, it’s hard to track what script produced which video, so rework piles up.
The Solution: Send to HeyGen, poll for completion, log the final URL
This n8n workflow turns HeyGen rendering into a simple “submit and forget” process. You start by providing the video script plus the avatar and voice you want to use. n8n sends that request to HeyGen through an HTTP call, then waits a bit so HeyGen has time to process. After the delay, the workflow checks render progress by calling HeyGen again. If the video isn’t done yet, it waits and checks again. Once the status flips to complete, the workflow prepares a clean output with the final video link so you can write it into Google Sheets and keep an audit trail.
It begins with a manual run in n8n (great for testing and small batches). From there, it’s request → wait → progress check → completion decision. Finally, you capture the finished URL in a format that’s easy to store, share, and reuse.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you generate 10 avatar videos a week for product updates. Manually, you might check HeyGen 4 times per video at about 5 minutes a check (open tab, find job, refresh, copy link), which is roughly 3 hours weekly. With this workflow, you submit the script once (about 2 minutes), let n8n handle the waiting and progress checks in the background, and the final URL is ready to log to Google Sheets when it completes. You still review the video, but the repetitive monitoring disappears.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- HeyGen for generating avatar videos via API
- Google Sheets to store links and status fields
- HeyGen API key (get it from HeyGen account settings)
Skill level: Beginner. You will connect credentials, paste IDs, and test a run.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You kick it off with a script and configuration. The workflow starts from a manual run in n8n, then sets up the key inputs like the text you want spoken plus your HeyGen avatar ID and voice ID.
n8n sends the create-video request to HeyGen. An HTTP Request node submits your payload to HeyGen’s API so the render job is created without you touching the HeyGen UI.
It waits, then checks progress. A Wait node pauses the workflow for a short time, then a second HTTP Request asks HeyGen for the job status. If it’s still processing, an If node routes back to waiting and checking again.
When it’s done, you capture the final video link for logging. A Set node prepares the result output (typically the URL plus whatever identifiers you want), which makes it straightforward to append a new row into Google Sheets.
You can easily modify the output fields to include campaign names, owners, or approval status based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
This workflow starts manually so you can test video generation on demand before scheduling or integrating with other triggers.
- Add the Manual Execution Start node as your trigger.
- Leave the default settings since this trigger does not require additional parameters.
Step 2: Connect HeyGen API Access
These HTTP request nodes communicate with HeyGen to generate a video and check its status.
- Open Generate Video Request and confirm URL is
https://api.heygen.com/v2/video/generateand Method isPOST. - Credential Required: Connect your httpHeaderAuth credentials in Generate Video Request.
- Open Fetch Video Progress and confirm URL is
https://api.heygen.com/v1/video_status.getwith Send Query enabled. - Credential Required: Connect your httpHeaderAuth credentials in Fetch Video Progress. If you plan to use custom auth, also connect httpCustomAuth.
Step 3: Set Up Video Input Configuration
Define the avatar, voice, and script content that will be passed into the HeyGen request.
- Open Configuration Setup and set avatar_id to your HeyGen avatar ID (replace
[YOUR_ID]). - Set voice_id to your HeyGen voice ID (replace
[YOUR_ID]). - Set text to the script you want spoken in the video.
- In Generate Video Request, keep the JSON Body as configured with expressions like
{{ $json.avatar_id }},{{ $json.text }}, and{{ $json.voice_id }}.
1080 x 1920 if you want vertical video output. Adjust only if your use case requires a different format.Step 4: Configure Status Checking and Output
This section repeatedly checks the video generation status and outputs the final video URL when completed.
- In Delay Processing, set Amount to
10seconds to pace the status checks. - In Fetch Video Progress, set the query parameter video_id to
{{ $('Generate Video Request').first().json.data.video_id }}. - In Completion Check, keep the condition leftValue as
{{ $json.data.status }}and rightValue ascompleted. - In Prepare Result Output, set data.video_url to
{{ $json.data.video_url }}to return the final video URL.
Step 5: Test and Activate Your Workflow
Run a manual test to verify that the video request is created, status checks loop correctly, and the final video URL is returned.
- Click Execute Workflow to run Manual Execution Start.
- Confirm Generate Video Request returns a
video_idin the output. - Watch Fetch Video Progress and Completion Check loop until
statusequalscompleted. - Verify Prepare Result Output returns a
data.video_urlthat opens the generated video. - When satisfied, save and activate the workflow for production use.
Common Gotchas
- HeyGen credentials can expire or need specific permissions. If things break, check your HeyGen API key in n8n credentials (and HeyGen account settings) first.
- 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.
Frequently Asked Questions
About 30 minutes if you already have your HeyGen API key and a Sheet ready.
No. You’ll paste in IDs, connect accounts, and test a run.
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 HeyGen API usage based on how many videos you generate.
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 it’s a common tweak. You can store avatar IDs and voice IDs in Google Sheets, then map them into the Configuration Setup (Set) node before the Generate Video Request call. Many teams also add extra columns for “campaign,” “owner,” and “approved,” so the Sheet becomes a lightweight production tracker. If you want separate logic per avatar, you can extend the If node rules (or add another If) to route different scripts to different configurations.
Usually it’s the API key header not being set correctly. In n8n, HeyGen typically expects the header name X-Api-Key, and the value must be your current HeyGen key. If it still fails, check that both HTTP Request nodes are using the same credential and that your HeyGen plan allows API access. Rate limits can also show up when you submit a lot of renders back-to-back, so spacing jobs out with a longer wait can help.
On n8n Cloud Starter, you can typically run a few thousand executions per month, which is enough for many small teams. If you self-host, there’s no execution limit (it mainly depends on your server). Practically, HeyGen render time is the bottleneck, not n8n. If you’re generating lots of videos, use longer waits and avoid hammering the progress endpoint every few seconds.
Often, yes, because this workflow relies on polling (wait, check, loop) and branching logic, which n8n handles cleanly. Zapier and Make can do it, but it may take more steps, and that can get pricey at volume. n8n also gives you the option to self-host, which is handy if you’re producing a lot of videos and want predictable costs. The honest caveat: if you only need a simple “send one request, post one message” automation, Zapier can feel faster to set up. Talk to an automation expert if you want a quick recommendation for your exact use case.
Once the links are logged automatically, the whole video process feels calmer. Set it up once, and let the workflow keep your record clean.
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.