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

# Send leads to email, your CRM, and other tools

> Get each new lead by email, send it to your own systems with a webhook, or export leads as a CSV file.

SiteGPT can send each new lead out of the dashboard in three ways:

* **Email**: an email to your team for each new lead.
* **Leads webhook**: a JSON message to a URL you choose, for each new lead. Use it to connect a CRM or an automation tool.
* **CSV export**: a file with all your leads, for a one-time import.

Email and the webhook fire for a new lead. When a returning visitor submits the lead form again with the same email, SiteGPT updates the existing lead. It sends no webhook. It sends an email only if you turn on **Email for every form submission**. See [Get each lead by email](#get-each-lead-by-email).

## Before you start

* **Plan:** lead emails and CSV export work on any plan. The leads webhook needs the Scale plan or higher. See [Plans and limits](/docs/reference/plans-and-limits.md).
* **Role:** any team role can change lead email settings. To set up webhooks, you need the Manager role or higher. See [Team members](/docs/guides/account/team-members.md).
* [Lead collection](/docs/guides/leads/collect-leads.md) is turned on.

## Get each lead by email

**1. Open the lead settings**

In your chatbot's sidebar, select **Leads** > **Leads Settings**.

**2. Turn on lead emails**

Under **Lead Capture Email Notifications**, make sure **Enable Lead Notifications** is on.

**3. Choose emails for returning visitors (optional)**

To also get an email when a returning visitor fills out the lead form again, turn on **Email for every form submission**. It is off by default, and you can change it only while **Enable Lead Collection** and **Enable Lead Notifications** are on. While one of them is off, the switch keeps its saved value when you save the page. In API v2, it is `notifications.everySubmission` in the `lead-form` settings section.

**4. Add recipients**

To send the emails to specific people, enter an email address in **Email Recipients** and select **Add**. Repeat for each person. To send the emails to your team, leave the list empty.

**5. Save**

Select **Save Changes**.

Who gets the lead email:

| Setting | Recipients |
| - | - |
| **Enable Lead Notifications** is on and the list has addresses | Only the addresses in the list. |
| **Enable Lead Notifications** is on and the list is empty | Every team member of the chatbot, except members with the Agent role. |
| **Enable Lead Notifications** is off | Nobody. SiteGPT sends no lead emails. |

To stop lead emails, turn off **Enable Lead Notifications** and select **Save Changes**. This stops only the email. The leads webhook still fires, and iPhone push notifications still work.

The email subject contains `New Lead Capture` and the chatbot name. The email shows the lead's name, email, phone, custom fields, and the time of capture. Custom fields show in the order and with the labels that you set in the lead form. The page URL comes last. The email has a **Reply to** button that writes to the visitor, and a link to the lead in the dashboard.

With **Email for every form submission** on, a returning visitor's new form submission sends an email with `Returning Lead` in the subject. It goes to the same recipients. It shows the values and the time of that submission. Lead forms in the widget, on WhatsApp, and in Zendesk count. If the visitor leaves the name or phone empty, the email shows the values saved on the lead. SiteGPT sends at most one `Returning Lead` email for each lead in 60 seconds. A submission less than 60 seconds after the lead was created, or after the last `Returning Lead` email, sends no email. This stops duplicate emails, for example from a double click. The leads webhook and iPhone push are still sent only for new leads.

For all SiteGPT emails and alerts, see [Choose who gets notified](/docs/guides/human-support/notifications.md).

## Send each lead to a webhook

The leads webhook sends a `POST` request with a JSON body to your URL each time a new lead is collected. The event name is `NEW_LEAD_CAPTURE`.

**1. Open the webhook settings**

In your chatbot's sidebar, select **Settings** > **Webhooks**. If your plan does not include webhooks, this opens **General** instead.

**2. Enter the URL**

In **Leads Webhook URL**, enter the URL that receives the leads.

**3. Enter a token**

In **Leads Webhook Token**, enter a secret string. SiteGPT sends it in the `X-WEBHOOK-TOKEN` header. Check this header in your system to confirm that the request comes from SiteGPT.

**4. Save**

Select **Save Changes**.

The body contains the chatbot ID and name, a link to the lead in the dashboard, and the lead details: ID, name, email, phone, custom fields, and capture time.

SiteGPT sends each webhook one time. It does not retry if your endpoint is down. For the full payload and the other webhook types, see [Webhooks](/docs/developers/webhooks.md).

## Connect a CRM

SiteGPT has no built-in CRM connection. To send leads to a CRM, use the leads webhook with a tool that can receive webhooks.

1. In your CRM, or in an automation tool that connects to it, create a flow that starts from an incoming webhook.
2. Copy the webhook URL that the tool gives you.
3. Paste it into **Leads Webhook URL** in SiteGPT, as in [Send each lead to a webhook](#send-each-lead-to-a-webhook).
4. In the tool, map the fields from `leadDetails` to your CRM fields. For example, map `leadDetails.email` to the contact email.
5. Submit a test lead in your chatbot.

If your plan does not include webhooks, use the lead email or a CSV export instead.

## Export leads as a CSV file

In **Leads** > **Leads Dashboard**, select **Export CSV**. The file includes every lead that matches the current filter and search. For the columns, see [Export leads to CSV](/docs/guides/leads/manage-leads.md#export-leads-to-csv).

## Check that it works

1. Open your chatbot and submit the lead form with a new test email, for example `visitor@example.com`.
2. Check the result for each method you set up:
   * **Email**: the recipients get a "New Lead Capture" email.
   * **Webhook**: your endpoint gets a `NEW_LEAD_CAPTURE` request with the `X-WEBHOOK-TOKEN` header.
   * **CSV**: the new lead is a row in the exported file.

Use a new email for each test. A repeat email updates the existing lead and does not fire the webhook or iPhone push. It sends a `Returning Lead` email only when **Email for every form submission** is on. To test that email, wait at least 1 minute. Then submit the form again with the same email.


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