Guides / n8n × Pipedrive / Triggers & webhooks

Pipedrive Webhooks v2 vs v1: what changed in the payload

Version 2 renames the fields a receiver reads on every event: current becomes data, meta.object becomes meta.entity, and the identifiers move. What breaks, and how to accept both during the transition.

FlowPatch diagram: Event version to payload shape to consumer. Normalize before changing downstream logic.
A webhook workflow that ran for months starts producing executions where every field is undefined, or stops matching its filter conditions, with no change on the receiving side.
Short answer: Webhooks v2 keeps the delivery mechanism and renames the envelope. The changed record moves from current to data, the prior state from previous to previous (unchanged in name but now omitted rather than null where there is none), the object name moves from meta.object to meta.entity, and meta carries a version field identifying which shape you received. A receiver reading v1 field names silently sees undefined on every v2 event. Branch on meta.version and normalise both shapes into one internal object rather than migrating the whole workflow at once.

What moved

The subscription is created with a version, and that choice determines the payload shape Pipedrive posts. Both versions deliver the same underlying information about the same events — a create, an update or a delete on a deal, person, organization or activity — but the envelope keys differ, and a receiver written against one reads nothing from the other.

Nothing about this failure is loud. HTTP delivery succeeds, the workflow executes, and every expression reading a v1 key against a v2 body evaluates to undefined. If the workflow has an IF node filtering on a field, the filter simply never matches and the execution ends quietly having done nothing.

Envelope keys, v1 and v2

What you wantv1v2
The record after the changecurrentdata
The record before the changepreviousprevious (omitted when absent)
Which object typemeta.objectmeta.entity
Which actionmeta.actionmeta.action
The record's IDmeta.idmeta.entity_id
Payload versionnot presentmeta.version

The two bodies side by side

Seeing both at once makes the migration obvious and also makes the risk obvious: an expression like $json.current.title is valid JavaScript against a v2 body and produces undefined rather than throwing, so nothing draws attention to it.

// v1
{
  "v": 1,
  "meta": { "action": "updated", "object": "deal", "id": 901,
            "company_id": 7654321, "user_id": 12345678 },
  "current":  { "id": 901, "title": "Acme renewal", "status": "won" },
  "previous": { "id": 901, "title": "Acme renewal", "status": "open" }
}

// v2
{
  "meta": { "version": "2.0", "action": "change", "entity": "deal",
            "entity_id": "901", "company_id": "7654321",
            "user_id": "12345678", "timestamp": "2026-09-14T09:12:04Z" },
  "data":     { "id": 901, "title": "Acme renewal", "status": "won" },
  "previous": { "id": 901, "title": "Acme renewal", "status": "open" }
}

// {{ $json.current.title }} against a v2 body -> undefined, no error.

Normalise both shapes at the edge

Do not scatter version checks through the workflow. Put one Code node immediately after the Webhook node that detects the version and emits a single internal shape, and let every node downstream read that shape only. The migration then becomes a change in one place, and running both versions side by side during a transition costs nothing.

meta.version is the reliable discriminator — it is present on v2 and absent on v1. Testing for the presence of data or current works too but is fragile against a future shape change.

// n8n Code node, directly after the Webhook node
const b = $json;
const isV2 = Boolean(b.meta?.version);

return [{ json: {
  entity:   isV2 ? b.meta.entity    : b.meta.object,
  entityId: String(isV2 ? b.meta.entity_id : b.meta.id),
  action:   b.meta.action,                 // same key, values differ by version
  record:   isV2 ? b.data : b.current,
  previous: b.previous ?? null,
  companyId: String(b.meta.company_id),
  raw: b
} }];

// Everything downstream reads .record / .entity / .entityId only.

Action values and deletes need checking, not assuming

The action vocabulary is not identical between versions, so a filter comparing meta.action to a hardcoded v1 string can keep matching nothing even after the field names are normalised. Log the distinct action values your subscription actually delivers for a day before writing conditions against them — that takes one workflow run and removes the guesswork entirely.

Deletes need particular care. On a delete there is no post-change record, so the field holding it is absent rather than containing an empty object, and a receiver that reads straight into it without a guard throws on exactly the events that matter most. Handle the delete branch explicitly and read the identifier from meta rather than from the record body.

Whichever version you are on, the receiver still has to be idempotent. Pipedrive retries a delivery that does not get a prompt 2xx, so the same event can legitimately arrive twice; the pattern is to respond immediately, process asynchronously, and deduplicate on the entity ID plus timestamp.

Verify the subscription's version rather than inferring it from when it was created. A subscription recreated during unrelated troubleshooting can come back on a different version than the one it replaced.

Migrating without a gap in coverage

Because the subscription version is chosen when the subscription is created, a migration is not a setting you flip. The safe sequence is to add a v2 subscription pointing at the same endpoint while the v1 subscription is still live, confirm the normaliser handles both shapes against real traffic, then delete the v1 subscription. For a short period every event arrives twice, which is exactly why the receiver has to be idempotent before you start.

Deduplicate on the entity ID plus the event timestamp rather than on the payload, since the two versions serialise the same event differently and a hash of the body will not match across them. With the normaliser in place this is straightforward: both shapes have already been reduced to one internal object by the time deduplication runs.

List the subscriptions before and after rather than trusting the console. Registration debris — duplicate subscriptions left behind by failed attempts, or an old one pointing at a test URL — is common, and it produces exactly the doubled-event symptom the migration itself produces, which makes the two impossible to tell apart if you have not confirmed the starting state.

Finally, check the receiver's behaviour on a delete event in both versions before switching. It is the shape most likely to be missing a field the normaliser assumes, and the one least likely to be covered by a test.

Securing the receiver, in either version

A webhook URL is a write path into whatever the workflow does next, and it is discoverable by anyone who can guess or observe it. Pipedrive supports HTTP basic authentication on a subscription, which is the simplest control available: set a username and password when creating the subscription, and reject any inbound request that does not present them.

That is worth doing regardless of version, and it is easy to lose during a migration — a subscription recreated for v2 without the auth fields leaves the endpoint open while looking identical in every dashboard. Confirm the credentials are present on the new subscription before deleting the old one.

Pair it with a receiver that responds immediately and processes asynchronously. Pipedrive retries a delivery that does not get a prompt 2xx, so an endpoint doing real work inline produces duplicate events under load — which then looks like a payload-version problem and is not.

Where these facts come from