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

# Connect your AI agent to Zapier

> Connect your AI agent to Zapier to send collected leads into thousands of other apps, or send prompts to your AI agent from a Zap

The Chatbase Zapier app connects your AI agent to thousands of other apps with no code. Its **Form Submission** trigger sends each lead your [Collect Leads](https://chatbase.co/docs/user-guides/chatbot/actions/collect-leads.md) Action captures into a Zap, and its **Send Prompt** action lets a Zap ask your AI agent a question and use the answer. It needs a Chatbase API key, so it's available on the Basic plan or higher. This guide walks through one complete example: collecting leads with your AI agent and appending them to a Google Docs file.

> [card] What you can do:
>
> Push leads straight into your CRM, spreadsheet, or inbox the moment your AI agent captures them, or have your AI agent draft answers inside any Zap.

## Before you start

* A Chatbase account with an AI agent, on the Basic plan or higher, which the Chatbase API endpoints the Zapier app uses need. If you haven't built an AI agent yet, follow [Your first AI agent](https://chatbase.co/docs/user-guides/quick-start/your-first-agent.md).
* An active Zapier account.
* Your Chatbase **API key** and **Agent ID** (see the steps below for where to find each).

## Chatbase triggers and actions in Zapier

The Chatbase app in Zapier has one trigger and one action.

| Name | Type | What it does |
| - | - | - |
| **Form Submission** | Trigger (instant) | "Triggers when a form is submitted." Fires each time your [Collect Leads](https://chatbase.co/docs/user-guides/chatbot/actions/collect-leads.md) Action captures a lead. |
| **Send Prompt** | Action | "Send a prompt to your chatbot". Sends a message to your AI agent and returns its answer. |

There are no search steps, and there's no trigger for new conversations.

### Form Submission trigger

The trigger is instant: when you turn on the Zap, Zapier registers a webhook with Chatbase, so leads arrive as soon as they're submitted rather than on a polling schedule.

It fires only for the **Collect Leads** Action. Submissions from [Collect Data](https://chatbase.co/docs/user-guides/chatbot/actions/collect-data.md) Actions and custom forms don't trigger it. To send those elsewhere, use [webhooks](https://chatbase.co/docs/developer-guides/webhooks.md).

Each lead includes these fields:

| Field | Contents |
| - | - |
| `eventType` | `leads.submit` |
| `chatbotId` | Your Agent ID |
| `payload.conversationId` | The conversation the lead came from |
| `payload.customerName` | Name |
| `payload.customerEmail` | Email |
| `payload.customerPhone` | Phone |
| `payload.customFields` | Any custom fields on your Collect Leads Action (only when the Action has custom fields) |
| `payload.customerWhatsappUsername` | The customer's WhatsApp username, for leads collected on WhatsApp |

For example, a lead might arrive as `customerName: Jane Doe`, `customerEmail: jane@example.com`, `customerPhone: +15550000000`.

### Send Prompt action

**Send Prompt** sends a message to your AI agent and returns its reply, so later Zap steps can use it. Its fields are:

| Input | Description |
| - | - |
| **Message** | The text to send to your AI agent |
| **Chatbot ID** | Your Agent ID |
| **Model** | The AI model to use. Defaults to `auto`. Setting a model overrides your AI agent's model for this request. |
| **Conversation ID** | The ID of the conversation the message belongs to |

The action returns **Chatbot ID** and **Response text**.

Each Send Prompt call uses message credits at the cost of the model that answers it, the same as a reply on any other channel. Choosing a different **Model** changes the cost. The Form Submission trigger doesn't use credits on its own.

## What you can automate

These automations use the **Send Prompt** action, with a trigger from another app:

| Automation | How it works |
| - | - |
| **Draft responses to customer emails** | Send new customer emails to Chatbase, have it draft a relevant response from your documentation, and save the response as a draft or send it directly |
| **Categorize and prioritize support emails** | Connect Chatbase to Gmail or Outlook, have it analyze tone and content, categorize emails as urgent or by topic, and add follow-up tasks to your project tool |
| **Add AI-generated solutions to support tickets** | Send new ticket details from Jira, Intercom, or Zendesk to Chatbase, and add the suggested solution back onto the ticket |
| **Analyze customer feedback forms** | Connect Chatbase to Typeform or Google Forms, analyze feedback for intent, tone, and sentiment, and send summaries to email, Slack, or a spreadsheet |

## How to connect Zapier

**1. Set up lead collection in Chatbase**

1. Sign in to your Chatbase account to access your dashboard.
2. Click the AI agent you want to set up lead collection for.
3. From the sidebar, click **Build > Actions**, then select **Create Action** and set up your [Collect Leads Action](https://chatbase.co/docs/user-guides/chatbot/actions/collect-leads.md).

**2. Create a Zap and add the trigger**

1. Sign in to your Zapier account.
2. Click **Create**, then **Zaps**, in the top-left corner of the Zapier homepage.

![Creating a new Zap in Zapier](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-4.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=a1859e7e6805d0a686e450e54ac23fdb)

3. In the Zap editor, click **Trigger**.

![Selecting the trigger in the Zap editor](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-5.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=58e90b7cda886a5e42c02534843d4c74)

4. Search for **Chatbase** in the search bar and click it.

![Searching for Chatbase in the Zapier app list](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-6.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=fe3c94f96afc755f04b3773849c26a7f)

5. On the right side of the page, click the **Event** field and select **Form Submission**, then click **Continue**.

![Selecting the Form Submission event](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-7.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=b9a5dc1f6d2d4b6137ac958ea5ab7c39)

**3. Authenticate your Chatbase account**

Click **Sign in** on the next page. On the authentication page, provide your Chatbase API key and, optionally, a display name, then click **Yes, Continue to Chatbase**.

![Signing in to link your Chatbase account](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-8.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=f07f72517677abcd3ede4061d2bb5edb)

> [!NOTE]
>
> To get your API key, head to your [account dashboard](https://www.chatbase.co/dashboard/), go to **Workspace settings**, then select **API keys** in the sidebar. Copy an existing key, or click **Create API Key** to create a new one.

![The Chatbase authentication page in Zapier](https://mintcdn.com/chatbase/tFta2uWaJCqIJoQ6/user-guides/integrations/images/zapier/zapier-9.png?fit=max\&auto=format\&n=tFta2uWaJCqIJoQ6\&q=85\&s=b970a3c4150e0e6ab4485ce7514e01e2)

**4. Provide your Agent ID and test the trigger**

1. Click **Continue** after authenticating.
2. Paste your Agent ID in the provided input field and click **Continue**.

> [!NOTE]
>
> To find your Agent ID, open the AI agent you want to link with Zapier, go to **Settings → General**, and copy the **Agent ID** from the **Agent details** card.

3. Click **Test Trigger**.

![Testing the Chatbase trigger in Zapier](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-11.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=35e5e5a21c8a86de2e725990342ce7ed)

4. When prompted, click **Continue with selected records**.

**5. Set up the action**

1. A window appears with a list of apps. Search for **Google Docs** and click it.

![Searching for Google Docs in Zapier](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-12.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=dbe8b8fa157f032d90e90c88938a4d6d)

2. Click the **Event** field, select **Append Text to Document**, then click **Continue**.

![Selecting the Append Text to Document event](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-13.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=f1844a32e6dc7f77ddc78a9809bebc22)

3. Sign into your Google account and click **Continue**.
4. Select the document you wish to append to, in the **Document Name** field.
5. In the **Text to Append** field, select the lead form field you want to add, then click **Continue**.

![Mapping lead fields to the Google Docs action](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/zapier/zapier-14.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=454bc6249a9d87ec45ec4380ee931b1e)

**6. Test and publish**

Click to test the setup, then click **Publish** to go live.

> [!TIP]
>
> Trigger a lead capture on your site and confirm the lead is appended to your target Google Docs file.

## Frequently asked questions

> [accordion] Which Chatbase plan do I need for Zapier?
>
> The Basic plan or higher, because the Zapier app signs in with a Chatbase API key and uses Chatbase API endpoints.

> [accordion] Is there a Zapier trigger for new conversations?
>
> No. The only Chatbase trigger is **Form Submission**, which fires when the Collect Leads Action captures a lead. Each lead includes the `conversationId` it came from.

> [accordion] Does Form Submission fire for Collect Data or custom forms?
>
> No. It fires only for the Collect Leads Action. Send Collect Data and custom form submissions to a [webhook](https://chatbase.co/docs/developer-guides/webhooks.md) instead.

> [accordion] Is the Form Submission trigger instant or polling?
>
> Instant. Zapier registers a webhook with Chatbase when you turn the Zap on, so each lead is sent as soon as it's submitted.

> [accordion] Do Zapier actions use message credits?
>
> Yes. Each **Send Prompt** call uses message credits for the model that answers it, like any other reply. The trigger itself doesn't.

> [accordion] Where do I find my API key?
>
> Go to **Workspace settings > API keys** in your Chatbase dashboard. Seeing this page requires the API keys permission.

## Next steps

> [card] [Collect Leads Action](https://chatbase.co/docs/user-guides/chatbot/actions/collect-leads.md)
>
> Configure which details your AI agent captures, and when.

> [card] [viaSocket](https://chatbase.co/docs/user-guides/integrations/viasocket.md)
>
> An alternative no-code automation platform, connected through webhooks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.