Skip to main content

HubSpot Integration

Learn how to configure the HubSpot integration in Cometly.

Updated over 2 weeks ago

Start Here 👋

Connect your HubSpot account to Cometly to automatically track key events and contact updates. With just a few clicks, you can configure Cometly to receive event data from HubSpot using the following event triggers:

  • Contact Created
    Fires when any new contact is created in HubSpot.

  • Contact Property Change
    Fires when any property is updated on a contact.
    🔸 Requires selecting a Contact Property.
    (when a contact property is updated, such as a lifecycle stage — for example, when a contact moves from Lead to MQL, a MQL event is triggered in Cometly.)

  • Deal Created
    Fires when a new deal is created.
    🔸 Requires selecting a Pipeline and Pipeline Stage.

  • Deal Property Change
    Fires when a specified deal property is updated.
    🔸 Requires selecting a Property Name, Pipeline, and Pipeline Stage.

  • Deal Stage Updated
    Fires when a deal stage is updated.
    🔸 Requires selecting a Pipeline and Pipeline Stage.

  • Deal Closed Won
    Fires when a deal moves to “Closed Won” stage.
    🔸 Requires selecting a Pipeline and Pipeline Stage.

Using HubSpot Forms?

If you're using HubSpot Marketing Forms on your website, make sure your forms are set up correctly for tracking. Follow this guide before sending events →

🛠 Prefer Using HubSpot Workflows?

You can also use HubSpot Webhooks to send event data to Cometly within your workflows. This is a great option if you want full control over which events are sent and when. Your HubSpot plan must include Webhooks to use this method.
Learn how to send data to Cometly using Webhooks →


Step 1: Install Cometly Pixel

Install the Cometly Pixel on every page of your website the <head> tags. Ensure the Cometly Pixel is installed on the thank you page.


Step 2: Create Event

In your Cometly account, navigate to the Events Manager page and click Create Event.

Follow the steps below to create your event for HubSpot:

  1. Select HubSpot as the App/Integration

  2. Choose your event name

    1. You can choose a default event or create a new event.

  3. Click Create


Step 3: Configure Event & HubSpot Integration

Click Configure to begin setting up the HubSpot integration

You can automatically send your selected event from HubSpot to Cometly using a shared account and trigger. Follow the steps below to set up the integration.

  1. Select HubSpot as the App

    • The app field will be pre-selected as HubSpot.

  2. Choose an Account

    • Click on the Select an account dropdown.

    • Select the HubSpot account you want to connect.

    • If this is your first time connecting HubSpot to Cometly, click '+ Connect new account' to add your HubSpot connection.

  3. Select a Trigger
    You need to choose when an event should be sent to Cometly. The available trigger options are:

    • Contact Created – Triggers when any contact is created in your HubSpot account.

    • Contact Property Change – Triggers when a property is changed for any contact in your HubSpot account.
      🔸 Requires selecting a Contact Property.

      • When you select Contact Property Change as the trigger, you'll need to choose a specific contact property to monitor (like Lifecycle Stage, Lead Status, or any custom field you use).

      • 🔁 How it works:
        Whenever the selected property is updated on any contact in your HubSpot account, this trigger will fire and send the event to Cometly.

      • For example:

        • If you select Lifecycle Stage as the property and a contact moves from Lead to MQL, the MQL event will be triggered in Cometly.

        • If you select Lead Status and it changes from New to Qualified, the Qualified Lead event can be sent.

        • 💡 Tip: Choose a property that aligns with the event you want to track in Cometly.

          • The most common Property Name selection is Lifecycle Stage:

    • Deal Created
      Fires when a new deal is created.
      🔸 Requires selecting a Pipeline and Pipeline Stage.

    • Deal Property Change
      Fires when a specified deal property is updated.
      🔸 Requires selecting a Property Name, Pipeline, and Pipeline Stage.

    • Deal Stage Updated
      Fires when a deal stage is updated.
      🔸 Requires selecting a Pipeline and Pipeline Stage.

    • Deal Closed Won
      Fires when a deal moves to “Closed Won” stage.
      🔸 Requires selecting a Pipeline and Pipeline Stage.

  4. Confirm Your Selection (Click 'Continue')

    • Once you select the Account and Trigger, these choices cannot be changed and if you want to use a different account, trigger, or property name, you will have to create a new event.

    • Double-check your selections before proceeding.

🔄 How to Retrieve Data for a Specific Event Type (HubSpot)

You can come back later to map your data once events are sent. Just click Save & Return When Data is Ready to proceed.

To properly configure and test your integration for a specific HubSpot trigger, follow the steps below based on the trigger type:

Contact Created Trigger

This trigger activates when any new contact is created in your HubSpot account.

  • 1. Create a Test Contact in HubSpot

    Go to your HubSpot account and manually add a new contact to trigger the event.

  • 2. Click “Check for Data”

    This will fetch the most recent contact records from HubSpot.

    ⚠️ If no data appears, double-check that your test contact was created successfully, then try again.

  • 3. Select Your Event Record

    Choose the record that matches the test contact you just created.

  • 4. Click “Continue With Selected Record”

    Proceed with the selected contact to complete your setup.Don’t see data yet? This can happen if no events have been sent yet.

Contact Property Change Trigger

This trigger activates when a specific property (like Lifecycle Stage, Lead Status, etc.) is updated on any contact.

  • 1. Update a Property on an Existing Contact

    In your HubSpot account, go to any contact and change the property you plan to track (e.g. change Lifecycle Stage from Lead to MQL).

  • 2. Click “Check for Data”

    This will pull the latest contact property change events from HubSpot.

    ⚠️ Be sure you changed the exact property selected in your integration. If no data appears, try updating the property again and refresh.

  • 3. Select Your Event Record

    Choose the record showing the recent property change.

  • 4. Click “Continue With Selected Record”

    Use the selected contact data to move forward with setting up your event.

Deal Created Trigger

This trigger activates when a new deal is created in your HubSpot account.

  1. Create a Test Deal in HubSpot
    Go to your HubSpot account, select the pipeline and stage defined in your trigger, and manually create a new deal.

  2. Click “Check for Data”
    This will fetch the most recent deal records from HubSpot.
    ⚠️ Make sure the test deal matches the selected pipeline and stage.

  3. Select Your Event Record
    Choose the record that matches the test deal you just created.

  4. Click “Continue With Selected Record”
    Use this deal record to complete the event mapping and save your setup.

Deal Property Change Trigger

This trigger activates when a specific property is updated on a deal.

  1. Update the Selected Deal Property
    Go to any deal within the selected pipeline and stage in HubSpot. Change the exact property you selected when setting up the trigger (e.g. change the "Deal Type" or a custom field).

  2. Click “Check for Data”
    This will fetch the most recent property change events from HubSpot.
    ⚠️ Be sure you modified the correct property and that the deal is in the selected pipeline and stage.

  3. Select Your Event Record
    Pick the record that reflects the recent property update.

  4. Click “Continue With Selected Record”
    Proceed with the selected record to finalize your event mapping.

Deal Stage Updated Trigger

This trigger activates when the stage of a deal is updated in a selected pipeline.

  1. Update the Stage of a Deal
    Go to a deal in your HubSpot pipeline and move it to a different stage (within the pipeline you selected in the integration).

  2. Click “Check for Data”
    This will pull the most recent deal stage update events.
    ⚠️ Ensure the deal is in the correct pipeline and the stage was actually updated.

  3. Select Your Event Record
    Choose the record that shows the stage update.

  4. Click “Continue With Selected Record”
    Complete the event setup using this deal record.

Deal Closed Won Trigger

This trigger activates when a deal reaches the Closed Won stage in a specific pipeline.

  1. Move a Deal to Closed Won
    In HubSpot, open any deal in the selected pipeline and drag it to the Closed Won stage.

  2. Click “Check for Data”
    This will retrieve the latest deals that were marked as Closed Won.
    ⚠️ If no data appears, double-check that the stage was correctly set to Closed Won.

  3. Select Your Event Record
    Pick the record showing the deal that was recently closed.

  4. Click “Continue With Selected Record”
    Use this deal to complete and confirm your event setup.

🔄 How Deal-to-Contact Matching Works in Cometly

To maintain one-to-one accuracy between HubSpot deal counts and Cometly reports, only one contact is associated with a deal in Cometly.

If multiple contacts are associated with a HubSpot deal, Cometly uses the following logic to determine which contact to use:

  1. Check first_conversion_date:

    • If one or more contacts have a non-null first_conversion_date, select the one with the earliest date.

  2. If no valid first_conversion_date:

    • Compare first_deal_created_date across contacts and select the earliest one.

  3. If first_deal_created_date is null or tied:

    • Select the contact with the earliest createdate.

This ensures consistency in reporting and avoids inflating deal numbers in Cometly due to multiple contacts linked to a single HubSpot deal.


Step 4: Configure Mapping

Easily map your app’s data fields to Cometly fields. This step ensures that the event data you send, such as email addresses, event times, or other custom data, aligns with Cometly’s reporting system.

Email and Event Time are required fields.

Mapping Fields

  1. Email - Choose the email address field from your selected record.

    1. Choose the corresponding field from your app’s data (e.g., email@example.com).

  2. Event Time - Choose the dynamic option for the event time 'The time we receive the event.'

Click + Add Field to map more fields:

  • First Name

  • Last Name

  • Phone Number

  • Amount

  • etc.

After you have mapped data to Cometly fields, click Continue to proceed to the next step.


Step 5: Configure Filters & Activating Event

Filters allow you to control when an event in HubSpot should actually trigger an event in Cometly. This step is optional, but highly recommended when you're tracking changes to a contact property (like Lifecycle Stage) and only want to send the event under certain conditions.

🛠 Common Use Cases for Filtering in HubSpot:

  • Only trigger the event in Cometly when Lifecycle Stage = MQL

  • Send the event only when a custom property (like Lead Score or Status) contains a specific value

  • Avoid triggering events for contacts that don't meet your qualification criteria

💡 Pro Tip: If you're using the Contact Property Change trigger, filters are the best way to ensure you're only sending events to Cometly when the property changes to the specific value you care about (like "Customer" or "Opportunity").

To add filters:

  1. Click “Add Another Filter”

  2. Select the field you want to filter by (e.g. lifecycle stage, lead score, contact owner, etc.)

  3. Choose your condition (e.g. equals, contains, starts with)

  4. Enter the value you want to match (e.g. MQL, SQL, etc.)

🧪 Test Result:

  • If your test data matches the filter, you'll see a ✅ green success message like:

    Lifecycle Stage (text) equals MQL – PASS

  • If the data doesn’t pass, you’ll see a message letting you know the webhook would not have continued.

After you have your filters configured properly, click Save, and then click Activate to activate your event.

Did this answer your question?