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

# Query an agent using Zapier

This guide explains how to use the Send Message action in Zapier to send messages to your CustomGPT agent, enabling automated conversations and responses triggered by any app supported by Zapier.

## What is the Send Message action?

The **Send Message** action allows you to send a user query to an agent's conversation directly from Zapier. This is useful when you want to automate chatbot replies, enrich CRM records, or trigger AI-powered responses from workflows like form submissions, chat messages, or new user events.

***

## What this does

When this action runs:

* A message (or query) is sent to a selected agent and conversation.
* The agent processes the query and generates a response.
* You can pass external IDs to associate the conversation with CRM records or external systems.

You can combine this with other Zapier steps like **Create Conversation**, **Upload File**, or **Send Email** to build rich AI-driven automations.

***

## How to configure this action in Zapier

1. Log in to your[ Zapier account](https://zapier.com/app/login)  and click **Create Zap**.

<Image align="center" border={true} src="https://files.readme.io/47879e5f870e0f2b661e51b370424451a27981892c823934341bfab0f13bc25d-create_zap.png" className="border" />

2. In the Trigger section, select the app that will start the workflow (e.g., **Slack**, **Google Drive**, or[any supported Zapier app trigger.](https://zapier.com/apps) ).

<Image align="center" border={true} src="https://files.readme.io/a9cde296b20ffd8bea4ba54ffbf70e1dd3eba614fa68c1ae962343a87af7a577-trigger_app.png" className="border" />

3. Choose a trigger event such as **New file**, **New message**, or **Form submission** and test the trigger to make sure it’s working correctly.

<Image align="center" border={true} src="https://files.readme.io/b0be8d2d4f3ead3520b18d27f48def4f8bb926ba6f7c8ccbe87c3058d697e703-test_trigger.png" className="border" />

4. In the **Action** step, search for **CustomGPT**.

<Image align="center" border={true} src="https://files.readme.io/ef249ff5cce2aecd2469bda54fd24958f3134b0c9d0864aaa9099750b8567de4-customgpt_action.png" className="border" />

5. Select the **Send Message** action.

<Image align="center" border={true} src="https://files.readme.io/3f26fdf6cb3c36e12e08d4990f4e042b731db4b2d603b09331c80576c2a5a8fd-send_message.png" className="border" />

6. When prompted, sign in to CustomGPT by clicking **Sign In** and entering your API key. To get your API key, see the [API Key Guide](https://docs.customgpt.ai/docs/api-1) .

<Image align="center" border={true} src="https://files.readme.io/e97545d4614956dfd3ed782a8a10ebf82f9ee4da6fdf9f5954f76e25edcb7234-api_deyploymnet_key.png" className="border" />

7. In the **Set up action** section, fill out the following fields:

* **Agent Name:** Choose the agent that should process the message.
* **Conversation Name:** Select an existing conversation or use a mapped field (like user email or ID) to create consistency in responses.
* **Message Text:** Enter the actual message to send. This could be a static message or pulled dynamically from your trigger step.
* **External ID (optional):** Use this field to associate the message with an external record (like a CRM ID or ticket number).  Learn more about [CRM integration and External ID →](https://docs.customgpt.ai/docs/how-to-enable-and-use-crm-integration-for-your-agent)

<Image align="center" border={true} src="https://files.readme.io/1b24754195f83b073a86e40dd09b355f19ccaa83847f14dfeeb04a3168506d63-send_message_set_up.png" className="border" />

8. Click **Continue**, then use **Test** to confirm that the action runs as expected.

<Image align="center" border={true} src="https://files.readme.io/520ca5e4fae2c4ac23d4724383a308bceae9945ae2ac3b52d4d70eaaf8bba49e-send_mesage_test_step.png" className="border" />

9. Once confirmed, click **Publish** to activate your Zap.

<Image align="center" border={true} src="https://files.readme.io/da136c001b776031eb63532d1fb9b6e32d43c5c5538fe6529c3ea96f7e639e07-send_message_publish.png" className="border" />

***

## Input parameters

| Field                 | Description                                                           |
| :-------------------- | :-------------------------------------------------------------------- |
| **Agent Name**        | Select the agent that will handle the message.                        |
| **Conversation Name** | Choose a conversation or create one dynamically for context tracking. |
| **Message Text**      | The content of the user query to send to the agent.                   |
| **External ID**       | (Optional) A unique ID used to sync with CRM records or other tools.  |