# Google Sheets + Zapier

Automate personalized video creation using Google Sheets and Zapier

In this tutorial, you'll learn how to generate personalized videos from an existing video template via Google Sheets + Zapier.

# How It Works

1. Set up a Google Sheet
2. Set up Zap #1: Generate video when a contact is added
3. Set up Zap #2: Update sheet when a video is completed
4. Test video generation for multiple contacts

<Image border={false} src="https://files.readme.io/e0f56e21cfb53730a87ee9e40e9fe4586c7342ee4f1cdeb0de31c3c1047b307a-image.png" />

# Prerequisites

1. Make sure you have created a personalized video template before proceeding (see [Create personalized video template](https://docs.heygen.com/docs/personalized-video-service) )
2. A Google Sheets account
3. A [Zapier](https://zapier.com/) account

# Set up Google Sheet

The first step is to set up a Google Sheet. The Google Sheet will serve two purposes:

1. Import contacts to trigger video generation
2. Store video data once videos are done generating

<Callout icon="📘" theme="info">
  **Notes about the sample Google Sheet**

  The GREEN columns are your input. Feel free to add additional variables/columns as needed.

  The YELLOW columns will be updated by HeyGen + Zapier.
</Callout>

You can get started with this [sample Google Sheet](https://docs.google.com/spreadsheets/d/1G5tRaDJ_o4e2E3DM_oz_dscFwxV_R8Y_KZWa1IX2hK0/edit?usp=sharing).

**Watch the video tutorial here:**

<Embed url="https://www.loom.com/embed/4d0fb731c3cc4049960b8e410983b4c3?sid=e435225e-9446-43f0-867b-c585d23c8fc4" href="https://www.loom.com/embed/4d0fb731c3cc4049960b8e410983b4c3?sid=e435225e-9446-43f0-867b-c585d23c8fc4" typeOfEmbed="iframe" height="520px" iframe="true" />

# Set up Zap #1: Generate Video when Contact is Added

When a contact is added to the sheet, we want to trigger an automatic request to HeyGen to generate a personalized video for the contact.

We will pass along any variable from the Google Sheet to HeyGen by using this notation in Zapier: `text.variable_name.content`.

Examples:

* \{\{first\_name}} ⇒ `text.first_name.content`
* \{\{company\_name}} ⇒ `text.company_name.content`

<Callout icon="⚠️" theme="warn">
  Make sure to double check your video template to make sure you are using the same variable name between the template and Zapier
</Callout>

**Watch the video tutorial here:**

<Embed url="https://www.loom.com/embed/3e0fc674c72e466b8ab1e712b3302a37?sid=0f697a12-b257-4e27-a376-bb049944c0f0" href="https://www.loom.com/embed/3e0fc674c72e466b8ab1e712b3302a37?sid=0f697a12-b257-4e27-a376-bb049944c0f0" typeOfEmbed="iframe" height="520px" iframe="true" />

# Set up Zap #2: Update Sheet when Video is Completed

When the personalized video is done generating, we want to automatically push the video data back to the Google Sheet to store them.

We will store the video data in the following fields:

* HeyGen Video Share Page URL
* HeyGen Video Download URL
* HeyGen GIF Download URL

<Callout icon="📘" theme="info">
  **Tip**: Make sure to test the workflow end-to-end after you finish setting up this Zap.
</Callout>

**Watch the video tutorial here:**

<Embed url="https://www.loom.com/embed/9408c40bfe5d428db18f71dfd8312e99?sid=4ccbdd69-fa76-4438-822a-fdf5c1a796ad" href="https://www.loom.com/embed/9408c40bfe5d428db18f71dfd8312e99?sid=4ccbdd69-fa76-4438-822a-fdf5c1a796ad" typeOfEmbed="iframe" height="520px" iframe="true" />

# Test Video Generation for Multiple Contacts

So far, we’ve only tested adding one contact at a time. However, for many users, they will likely have a list of contacts they’d like to create personalized videos for in bulk. Therefore, let’s also test out adding multiple contacts at the same time.

There is no additional configuration needed for this step. This is mainly just a testing step to ensure things are working as expected.

**Watch the video tutorial here:**

<Embed url="https://www.loom.com/embed/bbf5671caf59454089cf966715451eb2?sid=06221868-c235-49fa-b510-f3eba370ce16" href="https://www.loom.com/embed/bbf5671caf59454089cf966715451eb2?sid=06221868-c235-49fa-b510-f3eba370ce16" typeOfEmbed="iframe" height="520px" iframe="true" />