Skip to main content
The Make Cometly integration sends events from a Make.com 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.

Video tutorial

Developer documentation from the video
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.
  • 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
  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 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, 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

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
2

Add a credential

Next to Credentials, click Add.
Make HTTP module settings with an arrow on the Add button next to Credentials
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.
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.
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
6

Set the method

Set the Method to POST.
Make HTTP module with the Method dropdown set to POST
7

Add the headers

Add two headers:
Make HTTP module with two headers: Accept and Content-Type, both set to application/json
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
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 has the full list.

Next steps

Still have questions or need a hand? We’re happy to help. Reach our team at support@cometly.com.