Skip to content

Calendly + Customerlabs 1PD Ops Integration

Calendly is a popular scheduling tool used by customers to book appointments and meetings via personal scheduling links. When Calendly bookings are forwarded to ad platforms such as Meta, insufficient user identity data results in low event match quality — which degrades campaign attribution accuracy.

This integration resolves that by passing the CustomerLabs UID (cluid) as the utm_term query parameter on every Calendly link at page load. The cluid is then captured in the booking payload and forwarded to Customerlabs 1PD Ops via a webhook, linking the server-side booking event to the originating browser session and enabling accurate event unification.

  1. Calendly account with API & Webhooks access
  2. Active CustomerLabs Account
  3. Postman (or equivalent API client) for webhook subscription setup

The integration uses three components working together:

  1. UTM Term injection — At page load, the CustomerLabs tracking script appends the cluid to every Calendly link on the page as a utm_term query parameter.
  2. Calendly Webhook — When an invitee books a meeting, Calendly forwards the booking data (including the utm_term field containing the cluid) to the CustomerLabs webhook URL.
  3. Event unification — CustomerLabs matches the webhook payload to the originating browser session using the cluid, enabling full browser-to-server event unification.

Step 1: Install the CustomerLabs Tracking Script

Section titled “Step 1: Install the CustomerLabs Tracking Script”

Sign in to your CustomerLabs account and place the tracking script above the </head> tag on your website. This script generates and stores the cluid for each visitor.

Step 2: Configure the Custom Destination in CustomerLabs

Section titled “Step 2: Configure the Custom Destination in CustomerLabs”

The Custom Destination script appends the cluid to every Calendly link on the page as a utm_term parameter. This ensures the booking payload includes the visitor’s unique identifier.

In CustomerLabs, navigate to Destinations, search for Custom Integration, and click View Details.

customerlabs destination tab with custom integration

Provide a name for the integration (for example, calendly_integration) and paste the following script into the code editor.

naming integration and adding script in customerlabs
function updateCalendlyLinks(utmTerm) {
document.querySelectorAll('a[href^="https://calendly.com"]').forEach(link => {
try {
const url = new URL(link.href);
url.searchParams.set('utm_term', utmTerm);
link.href = url.toString();
} catch (error) {
console.error('Error updating Calendly link:', error);
}
});
}
updateCalendlyLinks(window.CLabsgbVar.generalProps.uid);

The script selects all anchor tags pointing to calendly.com and appends the cluid as the utm_term parameter. When an invitee books a meeting, Calendly captures this value in the booking payload.

Save the integration after pasting the script.

To create a webhook subscription, you must authenticate with the Calendly API using a personal access token.

  1. Sign in to your Calendly account.
  2. Navigate to Integrations & AppsAPI & Webhooks.
  3. Click Generate New Token.
  4. Name the token (for example, Calendly token) and generate it.
calendly integrations and apps
  1. Copy the token immediately and save it — you will need it in the following steps.

Step 4: Retrieve Your User and Organization URIs

Section titled “Step 4: Retrieve Your User and Organization URIs”

The Calendly webhook subscription requires your organization URI. Use the Calendly API to retrieve it.

Open Postman (or any API client), import the following request, and replace {access_token} with the token generated above:

curl --request GET \
--url https://api.calendly.com/users/me \
--header 'authorization: Bearer {access_token}'
postman request to retrieve user and organization urIs

Review the response payload:

  • uri — your user URI
  • current_organization — your organization URI

Save the organization URI — it is required when creating the webhook subscription.

Step 5: Create a Custom Source in CustomerLabs

Section titled “Step 5: Create a Custom Source in CustomerLabs”

CustomerLabs generates a unique webhook URL to receive Calendly booking data.

  1. In CustomerLabs, navigate to SourcesConnect SourceCustom Source.
connect source tab with custom source option
  1. Name the source (for example, Calendly Integration).
  2. Once created, copy the webhook URL displayed by CustomerLabs. This URL will receive the Calendly booking payloads.
custom source webhook url generation

Step 6: Create the Webhook Subscription in Calendly

Section titled “Step 6: Create the Webhook Subscription in Calendly”

Use the Calendly API to register the CustomerLabs webhook URL as the endpoint for booking events.

Open Postman, import the following request, and replace the placeholder values as described below:

curl --request POST \
--url https://api.calendly.com/webhook_subscriptions \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer <your personal access token>' \
--data '{
"url": "<CustomerLabs webhook URL>",
"events": ["invitee.created", "invitee.canceled"],
"organization": "<your organization URI>",
"scope": "organization"
}'
postman request to create webhook subscription in calendly

Replace the following values:

  • <your personal access token> — the API token created in Step 3
  • <CustomerLabs webhook URL> — the webhook URL copied from CustomerLabs in Step 5
  • <your organization URI> — the organization URI retrieved in Step 4

To test the webhook, book a meeting using your Calendly link. This triggers the invitee.created event and sends the booking payload to your CustomerLabs webhook URL.

In CustomerLabs, navigate to the source and open the incoming data log to verify that the cluid is present in the utm_term field of the received payload. Once confirmed, proceed to configure the workflow.

A Workflow processes the raw data received from a source and transforms it into structured event data. Workflows apply field mappings, filters, and event configurations. Multiple workflows can be created per source, and each workflow runs continuously, updating user profiles in real time.

Assign a descriptive name that reflects the data being processed.

naming the workflow in customerlabs

Example: A workflow receiving booking data from Calendly can be named cl_leads or calendly_booking.

Configure a workflow delay when multiple workflows are attached to the same source. Without a delay, all workflows receive the incoming payload simultaneously. Under concurrent execution, Customerlabs 1PD Ops may create separate user records across workflows before the first workflow has committed the new user identity to the database. Setting a delay ensures that user identity is resolved before subsequent workflows process the same event.

To configure event mappings, a sample payload must be available. Book a test meeting using your Calendly link to populate the sample data panel. Up to five samples can be fetched at a time.

configuring workflow delay
selecting sample data in workflow
sample payload with cluid in utm_term field

Select the event name from the dropdown or define a custom event name. For Calendly booking submissions, use a custom event name such as cl_leads or cl_booking.

event configuration screen
selecting custom event name

Map the cluid from the utm_term field as the primary user identifier. The cluid links the server-side booking event to the originating browser session, enabling unification of browser and server-side events in Customerlabs 1PD Ops.

mapping cluid as user identity

Up to three user identifiers can be configured per workflow, including external IDs. Customerlabs 1PD Ops stores these identifiers to build an enriched, unified user profile.

Map all user-level attributes from the Calendly booking payload under User Traits. These traits are forwarded to connected destinations and are required for accurate audience targeting and personalization.

user traits mapping configuration

Common traits to map include first_name, last_name, email, and phone. For destination-specific requirements — such as forwarding an email address to an email platform like Klaviyo — the relevant trait must be explicitly mapped in this section.

completed user traits mapping

Source Logs record all payloads received by the source webhook prior to workflow processing. Logs may have a display latency of up to 10 minutes. Access logs by navigating to the source and clicking Logs.

accessing source logs

Each inbound message is assigned a unique message ID for traceability across workflows and the event manager.

Displays the raw payload received from the Calendly webhook in JSON format.

source data in log

Displays the processed payload forwarded to configured workflows, along with the generated message ID.

source data out log

Each workflow maintains its own log, showing how incoming events are transformed — including user traits, event attributes, group traits, external IDs, and group identities.

workflow logs panel
workflow data out details

The following status messages may appear in the Data Out log:

StatusDescription
Mapping not foundThe workflow is in draft mode and has not been published.
Filter condition failedThe incoming event did not satisfy the configured filter criteria and was not processed.
User ID missing / Account ID missingThe payload does not contain a required user or account identity field. The event will not be processed further.
Data not foundThe event is still being processed. Under high load, processing may take up to 10 minutes.

Once events are processed through workflows, the resulting data can be forwarded to connected third-party destinations to support advertising, analytics, and marketing automation use cases.