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

# Make integration

> Set up the Make Cometly integration: send events from a Make scenario to the Cometly API so each lead or sale is attributed to the ad behind it.

The Make Cometly integration sends events from a [Make.com](https://www.make.com/en/register?pc=cometly) scenario (Make's name for an automated workflow) to Cometly. An event is an action Cometly tracks, such as a lead, a sign-up or a purchase. This guide assumes you already have a scenario with data coming in to Make. You will structure that data as JSON and send it to Cometly with the Cometly API, so the event can be attributed.

This matters because Cometly can only attribute the events it receives. Once Make passes along the leads and sales from your other apps, you can see which campaign, ad set and ad produced each one.

## Alternative method: Cometly webhooks

This guide uses the **Cometly API**. You can also have Make send the data to a Cometly webhook URL instead.

If you prefer that method, or need more flexibility in your setup, follow the [Cometly webhooks guide](https://docs.cometly.com/integrations/webhooks.md).

## Video tutorial

[Make Integration video](https://www.loom.com/embed/0ef0f9ffbe9446c3a56fb5ae033a5f00)

[**Developer documentation from the video**](https://docs.cometly.com/api-reference/overview.md)

> [!NOTE]
>
> The video shows the setup on screen. The written steps below cover the same setup from start to finish.

## Before you start

* A Make scenario that already receives the data you want to send. If you need help building one, see [Make's documentation](https://www.make.com/en/help/home).
* Access to the **Cometly API** integration in the Cometly space (a workspace in your Cometly account) that should receive the events. If you cannot see the **Cometly API** card on the Integrations page, ask a space Administrator: the card is hidden from roles without API access.

## Step 1: Capture data

Make sure data is flowing into your scenario, from an existing scenario or a new one. The scenario needs incoming data before you can map it to Cometly.

## Step 2: Format the data for Cometly

Structure the incoming data so Cometly can read it.

![Make module picker with Create JSON highlighted under the JSON app](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/01.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=9a615d271322bbc33302e503daffb8a8)

1. Add a module in Make and click **Create JSON**.

2. Create and name your data structure.

3. Under **Specification**, add one item per Cometly field and type the Cometly field name in the **Name** field. The [Create Event reference](https://docs.cometly.com/api-reference/endpoint/create-event.md) lists the Cometly fields.

   Required fields:

   * `event_name`
   * `email` (if you have no email, send `fingerprint` and `ip` together instead)

4. Save your data structure.

5. Type the `event_name` value by hand, using an event name from the [Create Event reference](https://docs.cometly.com/api-reference/endpoint/create-event.md), for example `lead_generated`.

6. Map the other fields dynamically, using data from the previous modules.

7. Save your changes.

![Make Create JSON module with event\_name typed in and email, name and phone fields mapped](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/02.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=00cab880e1c0e23c1137dcb5fd24bb51)

## Step 3: Send the data to Cometly

With the data structure in place, send it to Cometly through the API.

**1. Add an HTTP module**

Create another module and select **HTTP**, then choose **Make an API Key Auth request**.

![Make HTTP module list with Make an API Key Auth request highlighted](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/03.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=c93469705730c21954664ecc9632e702)

**2. Add a credential**

Next to **Credentials**, click **Add**.

![Make HTTP module settings with an arrow on the Add button next to Credentials](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/04.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=303ae1f6e28110c91c270cc40668d855)

**3. Create an API token in Cometly**

1. In Cometly, click **Integrations** in the sidebar and open the **Cometly API** card (category **Webhooks & API**).
2. If the API is not active yet, click **Activate Cometly API**.
3. Under **Manage API tokens**, enter a **Token Name** and click **Create Token**.
4. Copy the token straight away. It is shown only once.

> [!NOTE]
>
> API tokens are different for each space. If you use several spaces, make sure you create the token in the space that should receive the events.

**4. Save the token in Make**

Go back to Make and fill in the **Add new keychain** form:

1. **Name**: any name for the key.
2. **Key**: the word `Bearer`, then a space, then your API token, for example `Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXX`.
3. **API Key parameter name**: `Authorization`.

**5. Enter the URL**

For the **URL**, use `https://app.cometly.com/public-api/v1/events`.

> [!NOTE]
>
> This is Cometly's original events endpoint, and Cometly still accepts requests on it. The API reference documents the newer endpoint, `POST https://app.cometly.com/public-api/v1/events/track`.

![Make HTTP module with the Cometly events URL entered in the URL field](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/07.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=3ad5489f09782772ab00403d7c7862a5)

**6. Set the method**

Set the **Method** to **POST**.

![Make HTTP module with the Method dropdown set to POST](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/08.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=18452af532c5acec75e982c0cbb5ce44)

**7. Add the headers**

Add two headers:

| Name | Value |
| - | - |
| `Accept` | `application/json` |
| `Content-Type` | `application/json` |

![Make HTTP module with two headers: Accept and Content-Type, both set to application/json](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/09.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=11b309fa5124a6de4b702851f2a0634c)

**8. Add the request body**

Set the **Body type** to **Raw** and map the **JSON string** from the Create JSON module into the **Request content** box.

![Make HTTP module with Body type Raw and the JSON string mapped into Request content](https://mintcdn.com/cometly/gJhojf-axy7BVk83/images/integrations/platforms/make/10.webp?fit=max\&auto=format\&n=gJhojf-axy7BVk83\&q=85\&s=92856fcb571c8e0dd9d4f5b758236238)

**9. Test the scenario**

Run a test in Make to confirm Cometly receives the data.

In Cometly, click **Events Manager** in the sidebar and open the **Events Log** tab to check that the event arrived.

## Check it worked

After the test run, the event appears in the **Events Log** tab of **Events Manager** with the details you sent from Make. Cometly queues incoming API events for processing, so give it a moment and refresh the page if the event is not there yet.

## Frequently asked questions

### Does Cometly have a native Make integration?

No. There is no Make card on Cometly's **Integrations** page. You connect the two with the **Cometly API**, as this guide shows, or by sending the data from Make to a Cometly webhook URL.

### Why does my Make HTTP request to Cometly return 401 Unauthenticated?

A 401 means the API token is missing or invalid. In Make, check that the **Key** is the word `Bearer`, a space, then your token, and that the **API Key parameter name** is `Authorization`. Also check that you created the token in the space that should receive the events, because tokens are different for each space.

### Which event names can I send from Make to Cometly?

You can send any of Cometly's standard event names, such as `lead_generated`, `purchase` or `schedule`, or a custom event named `custom_event_1` through `custom_event_50`. Configure a custom event in Cometly before you send it. The [Create Event reference](https://docs.cometly.com/api-reference/endpoint/create-event.md) has the full list.

## Next steps

* [Check the fields you can send in the Create Event reference](https://docs.cometly.com/api-reference/endpoint/create-event.md)
* [Set up your conversion events in Cometly](https://docs.cometly.com/getting-started/events.md)
* [Learn how events work in Cometly](https://docs.cometly.com/guides/events/how-events-work.md)
* [Send event data with Cometly webhooks instead](https://docs.cometly.com/integrations/webhooks.md)
* [Activate the Cometly API and manage API tokens](https://docs.cometly.com/integrations/api.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.