Pipedrive
This integration is community-maintained. Reference: ory/integrates/crm/pipedrive.
Pipedrive is a sales-focused CRM with a contact-and-activity timeline as its central abstraction. This integration syncs Ory identities to Pipedrive persons on registration and profile updates, and logs a login activity to the person's timeline on every login so sales has a real-time view of customer engagement.
Use case
A sales-led B2B product wants every registered user mirrored into Pipedrive as a contact, with the Ory identity ID stored on a custom field so sales can reverse-lookup. Login activity (time, IP, device, method) lands on the contact's timeline so account-based outbound and customer-success teams see live engagement signal alongside CRM history.
How it works
- Sync (async post-registration / post-settings) — Ory calls
POST /pipedrive/sync-userwithidentity.id, traits, andcreated_at. The handler returns200immediately, then searches Pipedrive for an existing person by email and either creates a new person or updates the existing one, writingory_identity_idto a custom field. - Track login (async post-login) — Ory calls
POST /pipedrive/track-login-activitywith identity, session metadata, and request headers. The handler returns200immediately, finds the Pipedrive person by email, and creates atask-type activity with the login details (time, IP, device, method, session preview) marked done. - Both hooks are fire-and-forget so Pipedrive availability never blocks user flows.
Prerequisites
- An Ory Network project.
- A Pipedrive account and a personal API token (Pipedrive → Settings → Personal preferences → API).
- A
custom_fields.ory_identity_idfield on the Person object in Pipedrive (create it in Pipedrive → Settings → Data fields → Person). - A deployment target for the webhook handler.
Deploy the webhook handler
cd webhook/
cp .env.example .env
# Fill ORY_WEBHOOK_SECRET and PIPEDRIVE_API_TOKEN.
npm install
npm start
The server listens on the port specified in .env (default 3000) and exposes:
GET /health— readiness check.POST /pipedrive/sync-user— Ory async post-registration / post-settings target.POST /pipedrive/track-login-activity— Ory async post-login target.
Configure Ory
- Configure the three Action hooks using the snippets in
ory-actions.yaml(post-registration, post-settings, post-login). - Body templates:
jsonnet/sync-user.jsonnetandjsonnet/track-login.jsonnet. - Set
ORY_WEBHOOK_SECRETin the handler's.envto match theX-Webhook-Secretvalue in the hook config.
A sample of the webhook response Pipedrive returns lives at
assets/sample_webhook_response.json.
Troubleshooting
401 invalid webhook secret—ORY_WEBHOOK_SECRETdoesn't matchX-Webhook-Secretin the Ory Action config.Pipedrive search 401—PIPEDRIVE_API_TOKENinvalid or revoked.- Custom field
ory_identity_idignored on the new Person — the field isn't defined on the Pipedrive Person object; create it in Pipedrive admin first. - Duplicate Pipedrive persons — the upsert searches by email; if the email is different from what's in Pipedrive (e.g.
plus-addressing), you get a duplicate. Consider switching the lookup to the
ory_identity_idcustom field once it's populated. - Login activities appear without a person link — the login email doesn't match any Pipedrive person; either sync at registration time or pre-populate Pipedrive with your customer list.
Resources
- Pipedrive
- Ory Actions
- Reference: ory/integrates/crm/pipedrive
