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

# Pipedrive integration

> Set up the Pipedrive Cometly integration with webhooks to send lead, deal created and deal closed won events and see which ads fill your pipeline.

The Pipedrive Cometly integration sends events from [Pipedrive](https://www.pipedrive.com/) to Cometly with webhooks. An event is an action Cometly tracks, such as a lead or a sale, and a webhook is a message one app sends to another the moment something happens. A Pipedrive automation calls a Cometly webhook URL each time the event happens, and Cometly uses that data for tracking and attribution.

This matters because your leads become deals in Pipedrive, long after the ad click. Once new leads, new deals and won deals reach Cometly, you can see which campaign, ad set and ad produced each one, and judge your ads by the deals they close and not only by the leads they bring in.

The guide covers three use cases:

1. [**Leads**](#send-lead-events): triggers when a new lead is created in Pipedrive.
2. [**Deal Created**](#send-deal-created-events): triggers when a new deal is created in Pipedrive.
3. [**Deal Closed Won**](#send-deal-closed-won-events): triggers when a deal is moved to your won stage in Pipedrive.

Each use case needs its own Cometly event, its own Cometly webhook URL and its own Pipedrive automation. Set them up one at a time.

## Send lead events

**1. Get your Cometly webhook URL**

1. In Cometly, open **Events Manager** and click **Create Event**.
2. Under **App / Integration**, choose **Webhooks**.
3. Pick the event you want to track (for example **Lead**), or click **Create New Event**, then click **Create**.
4. On the page that opens, click **Copy** next to **Your webhook URL**.

Stop here for now. You map the fields and set up filters in the last step, after Pipedrive has sent data. The [Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md) explains each of these screens in detail.

**2. Add an automated webhook in Pipedrive**

1. Log in to your Pipedrive account.

2. Open the **Tools and apps** section in the left-hand menu and click **Automations**.

   ![Pipedrive left menu with arrows on the three-dot icon and on Automations](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/01.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=5270bad5ac621e7a24e3310f3dc3a735)

3. Click **Webhooks** under **Tools**, then click **+ Webhook** in the top right.

   ![Pipedrive Tools and apps menu with arrows on Webhooks and on the + Webhook button](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/02.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=e67c15b6ab1efc472561d341f4b2f67a)

4. From the dropdown menu, select **Automated webhook** (for automation-based triggers).

   ![The + Webhook dropdown in Pipedrive with an arrow on Automated webhook](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/03.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=7113b9dde71ea3e0f0975ff78f291557)

5. Enter a **Webhook name** (for example `Cometly - Leads`) and paste your Cometly webhook URL into **Endpoint URL**. Leave **HTTP Auth username** and **HTTP Auth password** blank. Click **Save**.

   ![Add automated webhook form named Cometly - Leads, with arrows on Endpoint URL and Save](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/04.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=44758c9d4721b92b297c86b390ae4a6d)

6. If Pipedrive shows the error **URL must end with /, &, ?, or =** when you add the Cometly webhook URL, add a `/` to the end of the URL.

**3. Create the automation in Pipedrive**

1. After you have created your webhook, click **Automations**.

2. Click **+ Automation**.

   ![Pipedrive Automations page with an arrow on the + Automation button](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/07.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=bf8374bd5e161ce992e9c50601c2f283)

3. Choose **Lead** as the event trigger.

   ![Event trigger panel of a Pipedrive automation with an arrow on Lead](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/08.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=19ef5b74cdf03f95722e8aaa844e2e3b)

4. Set up the event trigger:

   ![Lead trigger set to Triggered by any user and Added, with an arrow on Apply trigger](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/09.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=37e4d49cd152e00a147ed793bdf9de8c)

   * Select **Triggered by any user**.
   * Select **Added** for the **Event**.
   * Click **Apply trigger**.

5. **Instant conditions:** if you have multiple pipelines, configure the conditions to target the specific pipeline you want to send events to Cometly from.

6. Click the **(+)** sign to add a step, then click **Action**.

   ![Lead created automation with arrows on the plus button and on Action in the Next step panel](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/10.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=f93f3e7b8eb3c36f8de4f1785b6aa3b8)

7. Choose **Webhook**.

   ![Action list of a Pipedrive automation with an arrow on Webhook](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/11.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=798f01e5e1e490b357e96c21c46aa22b)

8. Choose **Send webhook request**.

   ![Webhook action expanded in a Pipedrive automation with an arrow on Send webhook request](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/12.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=af9b7e2e0abf74119538b9e6176876f9)

9. The following fields are selected automatically. Click **Next**.

   ![Send webhook request default fields with Webhook, Method and Body ticked](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/13.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=4fdb7df2f7f82e59f641661aeadc91c5)

10. Choose the webhook you created for **Webhook (Required)** and choose **POST** for **Method (Required)**.

    ![Send webhook request action with Cometly - Leads, POST and the keys email, fullname and phone](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/14.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=24cde5987bc8fcb3070de80f7bdc434e)

    For **Body (Required)**, select **Key-value** and add these entries:

    | Key | Value (dynamic) |
    | - | - |
    | `email` | `Lead contact person email` |
    | `fullname` | `Lead contact person name` |
    | `phone` | `Lead contact person phone` |

11. Click **Apply action**.

12. Turn the toggle on so the automation is **Active**, then click **Save**.

    ![Finished lead automation in Pipedrive with arrows on the Active toggle and the Save button](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/15.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=c22cbd2bf42af76dce8e9f0282888c63)

**4. Send data and finish the webhook in Cometly**

1. Create a new lead in Pipedrive. The automation sends its data to Cometly.
2. Back in Cometly, click **Check for Data**, select the record Pipedrive sent and click **Continue With Selected Record**.
3. Map the fields: `email` to **Email**, `fullname` to **Full Name** and `phone` to **Phone**. The body above has no event time, so set **Event Time** to **The time we receive the event**.
4. Set up filters if you only want some of the data tracked, then click **Activate**.

See the [Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md) for the mapping and filter options.

## Send deal created events

**1. Get your Cometly webhook URL**

1. In Cometly, open **Events Manager** and click **Create Event**.
2. Under **App / Integration**, choose **Webhooks**.
3. Pick the event you want to track, or click **Create New Event** (for example an event named Deal Created), then click **Create**.
4. On the page that opens, click **Copy** next to **Your webhook URL**.

Stop here for now. You map the fields and set up filters in the last step, after Pipedrive has sent data. The [Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md) explains each of these screens in detail.

**2. Add an automated webhook in Pipedrive**

1. Log in to your Pipedrive account.

2. Open the **Tools and apps** section in the left-hand menu and click **Automations**.

3. Click **Webhooks** under **Tools**, then click **+ Webhook** in the top right.

4. From the dropdown menu, select **Automated webhook** (for automation-based triggers).

5. Enter a **Webhook name** (for example `Cometly - Deal Created`) and paste your Cometly webhook URL into **Endpoint URL**. Leave **HTTP Auth username** and **HTTP Auth password** blank. Click **Save**.

   ![Add automated webhook form in Pipedrive with the webhook name Cometly - Deal Created](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/19.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=7909ce2e569f6262e9ee794632c1bc2c)

6. If Pipedrive shows the error **URL must end with /, &, ?, or =** when you add the Cometly webhook URL, add a `/` to the end of the URL.

**3. Create the automation in Pipedrive**

1. After you have created your webhook, click **Automations**.

2. Click **+ Automation**.

3. Choose **Deal** as the event trigger.

   ![Event trigger panel of a Pipedrive automation with an arrow on Deal](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/23.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=863d381888a85aac66f58dc9aa8b377d)

4. Set up the event trigger:

   ![Deal trigger set to Triggered by any user and Added, with an arrow on Apply trigger](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/24.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=364d0a9d95131431c32929214296964e)

   * Select **Triggered by any user**.
   * Select **Added** for the **Event**.
   * Click **Apply trigger**.

5. Click the **(+)** sign to add a step, then click **Action**.

   ![Deal created automation with an arrow on Action in the Next step panel](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/25.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=ae10146abb984de941ad78093dde6a1b)

6. Choose **Webhook**.

   ![Action list of the deal created automation with an arrow on Webhook](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/26.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=a88e08a0ae13e86972a0d1953f0fe221)

7. Choose **Send webhook request**.

   ![Webhook action expanded in the deal created automation with an arrow on Send webhook request](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/27.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=40961fe6e2f108baa4fcd88491e518a9)

8. The following fields are selected automatically. Click **Next**.

9. Choose the webhook you created for **Webhook (Required)** and choose **POST** for **Method (Required)**.

   For **Body (Required)**, select **Key-value** and add these entries:

   | Key | Value (dynamic) |
   | - | - |
   | `email` | `Deal contact person email` |
   | `fullname` | `Deal contact person name` |
   | `amount` | `Deal value` |

10. Click **Apply action**.

11. Turn the toggle on so the automation is **Active**, then click **Save**.

    ![Top of the deal created automation with arrows on the Active toggle and the Save button](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/30.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=42d3cc7e3267a97d8615cf845f515787)

**4. Send data and finish the webhook in Cometly**

1. Create a new deal in Pipedrive. The automation sends its data to Cometly.
2. Back in Cometly, click **Check for Data**, select the record Pipedrive sent and click **Continue With Selected Record**.
3. Map the fields: `email` to **Email**, `fullname` to **Full Name** and `amount` to **Amount**. The body above has no event time, so set **Event Time** to **The time we receive the event**.
4. Set up filters if you only want some of the data tracked, then click **Activate**.

See the [Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md) for the mapping and filter options.

## Send deal closed won events

**1. Get your Cometly webhook URL**

1. In Cometly, open **Events Manager** and click **Create Event**.
2. Under **App / Integration**, choose **Webhooks**.
3. Pick the event you want to track, or click **Create New Event** (for example an event named Deal Closed Won), then click **Create**.
4. On the page that opens, click **Copy** next to **Your webhook URL**.

Stop here for now. You map the fields and set up filters in the last step, after Pipedrive has sent data. The [Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md) explains each of these screens in detail.

**2. Add an automated webhook in Pipedrive**

1. Log in to your Pipedrive account.

2. Open the **Tools and apps** section in the left-hand menu and click **Automations**.

3. Click **Webhooks** under **Tools**, then click **+ Webhook** in the top right.

4. From the dropdown menu, select **Automated webhook** (for automation-based triggers).

5. Enter a **Webhook name** (for example `Cometly - Deal Closed Won`) and paste your Cometly webhook URL into **Endpoint URL**. Leave **HTTP Auth username** and **HTTP Auth password** blank. Click **Save**.

   ![Add automated webhook form in Pipedrive with the webhook name Cometly - Deal Closed Won](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/34.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=ff0007acc7d918f24796b81d4f5cdcad)

6. If Pipedrive shows the error **URL must end with /, &, ?, or =** when you add the Cometly webhook URL, add a `/` to the end of the URL.

**3. Create the automation in Pipedrive**

1. After you have created your webhook, click **Automations**.

2. Click **+ Automation**.

3. Choose **Deal** as the event trigger.

4. Set up the event trigger:

   ![Deal trigger set to Triggered by any user and Updated, with an arrow on Apply trigger](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/39.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=19b2ca2e2b3280f60546d2ee80ccd842)

   * Select **Triggered by any user**.
   * Select **Updated** for the **Event**.
   * Click **Apply trigger**.

5. Add a condition so the automation continues only when **Deal pipeline stage name** **has changed to** `Won`, then click **Apply conditions**. Replace `Won` (the example stage in the image) with the name of the stage that represents closed won deals in your pipeline. If you have multiple pipelines, configure the conditions to target the specific pipeline you want to send events to Cometly from.

   ![Instant condition Deal pipeline stage name has changed to Won, with an arrow on Apply conditions](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/40.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=aa5cab0f85449a9adbdcd4212e0a0106)

6. Click the **(+)** sign to add a step, then click **Action**.

   ![Deal updated automation with the Won condition and an arrow on Action in the Next step panel](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/41.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=0118de2c53715cba2d5f1de7e5fee828)

7. Choose **Webhook**.

   ![Action list of the deal updated automation with an arrow on Webhook](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/42.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=c43f1ec9f34536a430a75edc66db1518)

8. Choose **Send webhook request**.

   ![Webhook action expanded in the deal updated automation with an arrow on Send webhook request](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/43.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=9700107bebc1bd53aea3fde1128f85bf)

9. The following fields are selected automatically. Click **Next**.

10. Choose the webhook you created for **Webhook (Required)** and choose **POST** for **Method (Required)**.

    For **Body (Required)**, select **Key-value** and add these entries:

    | Key | Value (dynamic) |
    | - | - |
    | `email` | `Deal contact person email` |
    | `fullname` | `Deal contact person name` |
    | `amount` | `Deal value` |

11. Click **Apply action**.

12. Turn the toggle on so the automation is **Active**, then click **Save**.

    ![Top of the deal updated automation with arrows on the Active toggle and the Save button](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/pipedrive/46.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=ca494ff047e262c19f36019801cc92a9)

**4. Send data and finish the webhook in Cometly**

1. Move a deal to your closed won stage in Pipedrive. The automation sends its data to Cometly.
2. Back in Cometly, click **Check for Data**, select the record Pipedrive sent and click **Continue With Selected Record**.
3. Map the fields: `email` to **Email**, `fullname` to **Full Name** and `amount` to **Amount**. The body above has no event time, so set **Event Time** to **The time we receive the event**.
4. Set up filters if you only want some of the data tracked, then click **Activate**.

See the [Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md) for the mapping and filter options.

## Check it worked

In [Events Manager](https://app.cometly.com/space/events-manager), each event you activated shows a switch that is turned on in the **Status** column. Create a new lead or deal in Pipedrive (or move a deal to your won stage), then open the **Events Log** tab: the event appears there within 60 seconds, with **SUCCESS** in the **Details** column.

## Frequently asked questions

### How long does it take for a Pipedrive lead or deal to show up in Cometly?

The event shows in the Events Log within 60 seconds of Pipedrive sending it. It can take up to 15 minutes to appear in the reporting areas, such as the Report Builder or Ads Manager.

### Why is my Pipedrive test lead not showing in my Cometly reports?

Test data sent before you clicked **Activate** is not processed and does not appear in your reports. It only serves as the sample record for mapping. Create a new lead or deal in Pipedrive after the event is active, and that one is tracked.

### Can I send more Pipedrive fields to Cometly?

Yes. Add another key-value entry to the **Body** of the webhook action in your Pipedrive automation, then send a new record so Cometly receives the extra field. In Cometly, click **Edit** on the event's row in Events Manager and use **Add Field** in the mapping step to map it.

## Next steps

* [Map fields, format values and add filters with the Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md)
* [Use the Events Log to check incoming events](https://docs.cometly.com/support/troubleshooting/general/event-log.md)
* [Learn how standard and custom events work](https://docs.cometly.com/guides/events/how-events-work.md)
* [Manage custom events such as Deal Created](https://docs.cometly.com/guides/events/custom-events.md)
* [Browse all Cometly integrations](https://docs.cometly.com/integrations/overview.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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