> ## 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 only for a new lead. When a returning visitor submits the form again with the same email, SiteGPT updates the existing lead and does not send a new email or webhook.

## 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).
* **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).
* [Lead collection](/docs/guides/leads/collect-leads) is turned on.

## Get each lead by email

<Steps>
  <Step title="Open the lead settings">
    In your chatbot's sidebar, select **Leads** > **Leads Settings**.
  </Step>

  <Step title="Turn on custom recipients">
    Under **Lead Capture Email Notifications**, turn on **Enable Lead Notifications**.
  </Step>

  <Step title="Add recipients">
    In **Email Recipients**, enter an email address and select **Add**. Repeat for each person.
  </Step>

  <Step title="Save">
    Select **Save Changes**.
  </Step>
</Steps>

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 off, or the list is empty     | Every team member of the chatbot, except members with the Agent role. |

<Warning>
  Turning off **Enable Lead Notifications** does not stop lead emails. It sends them to the team instead of your list. To stop lead emails, go to **Settings** > **General** and turn on **Disable lead notifications**. This stops only the email. The webhook still fires.
</Warning>

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. It has a **Reply to** button that writes to the visitor, and a link to the lead in the dashboard.

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

## 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`.

<Steps>
  <Step title="Open the webhook settings">
    In your chatbot's sidebar, select **Settings** > **Webhooks**. If your plan does not include webhooks, this opens **General** instead.
  </Step>

  <Step title="Enter the URL">
    In **Leads Webhook URL**, enter the URL that receives the leads.
  </Step>

  <Step title="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.
  </Step>

  <Step title="Save">
    Select **Save Changes**.
  </Step>
</Steps>

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).

## 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#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 sends nothing.
