> ## Documentation Index
> Fetch the complete documentation index at: https://help.lunacal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Zapier Integration for UTM Tracking

> Learn how to automatically send UTM parameters and booking data from Lunacal.ai to Google Sheets using Zapier.

## Overview

With Lunacal.ai’s Zapier integration, you can automate workflows that respond to booking events. This guide walks you through setting up a Zap that captures UTM data from your booking form and writes it directly into a Google Sheet — helping you keep track of marketing sources effortlessly.

## ✅ Prerequisites

Before you start:

* A [Zapier](https://zapier.com) account
* A [Lunacal.ai](https://lunacal.ai) account
* A Google account with access to Google Sheets
* A sheet already created with columns like: `Name`, `UTM Source`, `Email`

## 🔌 Step 1: Connect Zapier in Lunacal.ai

1. Log in to your Lunacal dashboard.
2. In the left sidebar, click on **Integrations**.
3. Select **Automation** from the integration categories.
4. Click the **Connect** button on the **Zapier** card to initiate the connection.

<img src="https://mintcdn.com/lunacalai/1VzCvxTsH_HZ0Hyn/images/Screenshot2025-07-02155300.png?fit=max&auto=format&n=1VzCvxTsH_HZ0Hyn&q=85&s=31c71052f4bbd7bd7d6e76cfd0f22cc6" alt="Screenshot2025 07 02155300 Pn" width="1884" height="877" data-path="images/Screenshot2025-07-02155300.png" />

***

## 🔑 Step 2: Generate and Save Your API Key

After clicking **Connect**:

1. Lunacal.ai will generate a unique **API Key**.
2. Copy the API key — **you won’t be able to view it again**.
3. Paste and save it in a secure place (we will be needing it in next step).
4. Click **Done** to complete the setup on Lunacal.

<img src="https://mintcdn.com/lunacalai/1VzCvxTsH_HZ0Hyn/images/Screenshot2025-07-02155601.png?fit=max&auto=format&n=1VzCvxTsH_HZ0Hyn&q=85&s=dfd8d65c5d2e3f342659a1c5c7228f46" alt="Screenshot2025 07 02155601 Pn" width="1193" height="843" data-path="images/Screenshot2025-07-02155601.png" />

## 🧠 Step 3: Link Lunacal.ai to Zapier

1. Open [Zapier](https://zapier.com) and go to **My Apps**.
2. Click **+ Add Connection**.
3. Search for **Lunacal.ai** and click on it.
4. When prompted, paste the **API key** you saved earlier.
5. Zapier will verify and establish the connection to Lunacal.

   <img src="https://mintcdn.com/lunacalai/1VzCvxTsH_HZ0Hyn/images/Screenshot2025-07-02155815.png?fit=max&auto=format&n=1VzCvxTsH_HZ0Hyn&q=85&s=303607b491ab9a18d068ab91207d64b1" alt="Screenshot2025 07 02155815 Pn" width="1884" height="738" data-path="images/Screenshot2025-07-02155815.png" />

***

## ⚙️ Step 4: Build Your Zap Workflow

### 4.1 Set up the Trigger

1. Click **+ Create Zap** in Zapier.
2. In the **Trigger** step, search and select `Lunacal.ai`.
3. Under **Event**, choose `Booking Created`.
4. Choose the Lunacal account you just connected.
5. Click **Test Trigger** to ensure data is received correctly.
   * This helps Zapier fetch a sample payload for configuration.
   * Make sure you have at least one booking in Lunacal to test with

<img src="https://mintcdn.com/lunacalai/1VzCvxTsH_HZ0Hyn/images/Screenshot2025-07-02161314.png?fit=max&auto=format&n=1VzCvxTsH_HZ0Hyn&q=85&s=47dbff0ff6335a53b3e5eced1677db60" alt="Screenshot2025 07 02161314 Pn" width="1366" height="774" data-path="images/Screenshot2025-07-02161314.png" />

### 4.2 Set up the Action with Google Sheets

Now we’ll write this booking data to a Google Sheet.

1. In the **Action** step, search for and select `Google Sheets`.
2. Choose the action event: **Create Spreadsheet Row**.
3. Connect your Google account if you haven’t already.
4. Select the spreadsheet and worksheet where the data should go.
5. Ensure the sheet has the following columns created beforehand:
   * `Name`
   * `UTM Source`
   * `Email`

> **Note:** You can add more fields like `UTM Campaign`, `UTM Medium`, etc. These must exist in the sheet before proceeding.

<img src="https://mintcdn.com/lunacalai/1VzCvxTsH_HZ0Hyn/images/Screenshot2025-07-02140456.png?fit=max&auto=format&n=1VzCvxTsH_HZ0Hyn&q=85&s=8d41ea06b102bfcb14a80d7250b37dab" alt="Screenshot2025 07 02140456 Pn" width="1317" height="768" data-path="images/Screenshot2025-07-02140456.png" />

### 4.3 Configure Data Mapping

You’ll now map Lunacal.ai booking fields to the Google Sheet columns:

| Google Sheet Column | Lunacal.ai Field Example                       |
| ------------------- | ---------------------------------------------- |
| Name                | `1. Responses Name Value`                      |
| UTM Source          | `1. Responses Utm Source Value`                |
| Email               | `1. Responses Email Value`                     |
| UTM Campaign        | `1. Responses Utm Campaign Value` *(optional)* |
| UTM Medium          | `1. Responses Utm Medium Value` *(optional)*   |
| UTM Term            | `1. Responses Utm Term Value` *(optional)*     |
| Company             | `1. Responses Company Value` *(optional)*      |

<img src="https://mintcdn.com/lunacalai/1VzCvxTsH_HZ0Hyn/images/Screenshot2025-07-02141610.png?fit=max&auto=format&n=1VzCvxTsH_HZ0Hyn&q=85&s=62a7cda0a099bfc176036f671bcf341f" alt="Screenshot2025 07 02141610 Pn" width="1242" height="845" data-path="images/Screenshot2025-07-02141610.png" />

## 🧪 Step 5: Test and Publish

1. Click **Test Action** in Zapier to send a test row to your sheet.
2. Confirm that the data appears in the correct cells.
3. Once validated, click **Publish** to activate your Zap.
4. You’re done — future bookings will now be pushed to Google Sheets automatically!

## 📌 Supported UTM & Custom Fields

These are the UTM fields supported by Lunacal.ai in Zapier:

* `utm_source`
* `utm_medium`
* `utm_campaign`
* `utm_term`
* `utm_extra`
* `utm_referral`

> UTM Fields **not listed above** will not be sent to Zapier. Make sure any custom questions or UTM fields on your booking form align with these names.

***

## ✅ Outro

You’ve now connected Lunacal.ai and Zapier to:

* Trigger workflows when bookings are created
* Automatically capture and store UTM data
* Push data to Google Sheets without manual work
