n8n-nodes-pilot-status 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,52 @@
2
2
 
3
3
  All notable changes to `n8n-nodes-pilot-status`.
4
4
 
5
+ ## 2.6.0 - 2026-10-11
6
+
7
+ ### Added
8
+
9
+ - **Number → Pay Extra Charge** — `POST /v1/numbers/{id}/pay`, no body; takes only the
10
+ **Number Instance ID**. "Pay now" for the extra-number charge of one number. A number
11
+ past the workspace's paid capacity is charged when it first connects; if that charge is
12
+ refused, sending from the number is blocked (`409 NUMBER_BLOCKED`,
13
+ `reason: "extra_charge_unpaid"`) until it is paid. With a card on file this **charges**
14
+ it. Requires a **tenant-scoped API key** with the `billing:manage` permission.
15
+ - Answers `{ ok: true, status: "paid" }`, or `status: "not_required"` when nothing is
16
+ owed for the number — so the operation is safe to repeat.
17
+ - Fails the item with `402 PAYMENT_FAILED` (may carry `declineCode`, `proratedTotal`,
18
+ `currency`), `402 INSUFFICIENT_FUNDS` (no credits and no usable card),
19
+ `409 PAYMENT_IN_PROGRESS` (another payment of the workspace is running — retry in a
20
+ few seconds), `502 PAYMENT_PROVIDER_ERROR` (the charge could not be concluded; Pilot
21
+ Status retries it on its own), `404 NUMBER_NOT_FOUND`, or
22
+ `403 NUMBER_SCOPE_NOT_ALLOWED` / `PERMISSION_DENIED`.
23
+ - **Number → Get** now returns `extraChargeUnpaidSince` and `extraChargeDisconnectAt` (ISO
24
+ timestamps or `null`) at the top level of the number. The first is non-null while sending
25
+ is blocked for the unpaid charge; the second is when the number is disconnected if it
26
+ stays unpaid (7 days after the block) and is always `null` on a Meta Cloud API number.
27
+ No node change: the node passes the API response through.
28
+
29
+ ## 2.5.0 - 2026-10-08
30
+
31
+ ### Added
32
+
33
+ - **Lead resource** (Meta Lead Ads — Facebook / Instagram Instant Forms). Read-only, and
34
+ requires a **number-scoped API key**: a lead belongs to the number whose Page is linked in
35
+ the dashboard.
36
+ - **Get Many** — `GET /v1/leads`, newest first by when the person submitted the form.
37
+ Filters: **Form ID**, **Ad ID**, **Page ID** (exact match), **Start Date** /
38
+ **End Date** (Meta's `created_time`, not when Pilot Status received the lead), **Page**,
39
+ **Page Size** (max 100). Answers `{ leads, total, page, pageSize, totalPages, notice? }`.
40
+ - **Get** — `GET /v1/leads/{id}`, by the Pilot Status `id` (= `data.leadId` on the
41
+ `lead.received` webhook, **not** Meta's `leadgenId`). A lead of another number is
42
+ `404 LEAD_NOT_FOUND`.
43
+ - On a **RELAY_ONLY** number a lead keeps its ids, attribution and status but comes back
44
+ with `redacted: true` and no name, e-mail, phone or answers; the response carries
45
+ `notice`. `consentGiven: null` means **unknown**, never a refusal.
46
+ - **Lead Received** (`lead.received`) in the trigger's event list, on **every** provider:
47
+ the whole lead under `data`. The number field is **`whatsappNumberId`, not `numberId`**;
48
+ `leadgenId` is Meta's id (use it to deduplicate), `leadId` is the one **Lead → Get**
49
+ takes. `fields` values are always a list.
50
+
5
51
  ## 2.4.0 - 2026-10-05
6
52
 
7
53
  ### Added
package/README.md CHANGED
@@ -74,6 +74,7 @@ The API never returns the secret — not even in the `201` of the create call
74
74
  - **Number Created / Connected / Disconnected / Removed / Restored** (`number.created`, `number.connected`, `number.disconnected`, `number.removed`, `number.restored`): Lifecycle of a WhatsApp number in your account. `number.restored` means a deleted number was brought back within its 30-day window — it returns disconnected and must be reconnected.
75
75
  - **Call Ringing / Connected / Ended / Missed / Permission Updated** (`call.ringing`, `call.connected`, `call.ended`, `call.missed`, `call.permission_updated`): WhatsApp Business Calling events (`call.*`) — Meta Cloud API **and web (Pilot Status) numbers** (`call.permission_updated` is Meta-only). Payloads are **flat** (fields next to `event`, no `data` wrapper): `{ event, callId, externalCallId?, direction, status, from, to, timestamp, duration? }`; `duration` (seconds) appears on `call.ended` only when the call was answered. `externalCallId` is the provider call id (Meta `wacid...` or Evolution GO CallID).
76
76
  - **Flow Response Received** (`flow.response_received`): Triggered when someone SUBMITS a WhatsApp Flow form — the answers arrive here. **META numbers only.** Wrapped in `data`: `{ event, data: { event, flowId, metaFlowId, flowToken, messageId, whatsappNumberId, from, receivedAt, response, responseRaw, flowMedia, submitted } }`. Four things to know. The number field is **`whatsappNumberId`, not `numberId`** — same value, different name on the wire. **`response` and `responseRaw` are mutually exclusive**: `response` holds what your own Flow endpoint returned, already parsed, and `responseRaw` is `null`; if the parse failed it is the other way round, and the raw string is the only copy of the answer there is. **On a Flow with a `data_exchange` endpoint `response` is EMPTY even on a number that stores everything** — Meta's completion payload carries only the `flow_token` — and what the person typed is in **`submitted`**: one entry per `data_exchange` screen, `{ screen, at, data, omitted }`, in order, where `omitted` (`DATA_TOO_LARGE`, `LIMIT_REACHED` or `UNREADABLE`) says why a `data` is `null`. `flowMedia` holds the files attached inside the form: `{ field, fileName, mimeType, status, url }`. Both are `null` and **never `[]`** when empty, so a node testing for an empty array never fires; `GET /v1/flows/{id}/responses` publishes the same two lists as arrays, under `media` and `submitted`. And picking this event for a **non-Meta** number fails SILENTLY: the API filters a webhook's events down to what the number's provider can emit, so the subscription is created with an empty event list, returns `201`, and never fires.
77
+ - **Lead Received** (`lead.received`): A lead from a **Meta Lead Ads Instant Form** (Facebook / Instagram), delivered on the WhatsApp number whose Page is linked in the dashboard — **any provider**, not only Meta numbers. Wrapped in `data`: `{ event, data: { leadId, leadgenId, whatsappNumberId, pageId, pageName, formId, formName, adId, adsetId, campaignId, adName, adsetName, campaignName, platform, isOrganic, createdAt, fullName, email, phone, fields, consentGiven, conversationId } }`. The number field is **`whatsappNumberId`, not `numberId`**. `leadId` is the Pilot Status id (the one **Lead → Get** takes); `leadgenId` is Meta's, unique per lead — use it to deduplicate. `createdAt` is when the person **submitted** the form. `fields` holds every answer as `{ key, label?, values }`, and `values` is **always a list**, even for a single answer. `label` is absent when it could not be resolved; on **Lead → Get** / **Get Many** it is always present, falling back to the key. `consentGiven` is `true`/`false` only when the form has a consent checkbox configured; `null` means **unknown**, never a refusal.
77
78
 
78
79
  Webhook payload notes:
79
80
  - Customer webhook payloads do not include: `projectSlug`, `lastMessageId`. Optional `correlationId` (same as HTTP 202 when present) may appear on outbound status events and on `message.reply` / `message.received` when correlated to a prior send.
@@ -110,6 +111,7 @@ The **Pilot Status** node provides several resources and operations to manage yo
110
111
  - **Restore:** Undo a soft-delete inside the window. Gives back the **row**, not the connection: run **Connect** afterwards (`requiresReconnect: true`).
111
112
  - **Purge:** Irreversible hard delete. Cascades chat, messages, templates and keys, and tears the number down at Meta.
112
113
  - **Logout:** Unpair the device without deleting anything — id, keys, webhooks and history are kept.
114
+ - **Pay Extra Charge:** Pay now the extra-number charge of one number (`POST /numbers/{id}/pay`, no body). A number past the paid capacity is charged when it first connects; if that charge is refused, **sending** from it is blocked (`409 NUMBER_BLOCKED`, `reason: "extra_charge_unpaid"`) until it is paid — **Get** shows `extraChargeUnpaidSince` and, for a non-Meta number, `extraChargeDisconnectAt` (when it is disconnected if it stays unpaid). With a card on file this **charges** it, and it needs a **tenant-scoped API key** with the `billing:manage` permission. Answers `status: "paid"`, or `"not_required"` when nothing is owed (safe to repeat). Fails with `402 PAYMENT_FAILED` / `INSUFFICIENT_FUNDS`, `409 PAYMENT_IN_PROGRESS`, or `502 PAYMENT_PROVIDER_ERROR` (retried by Pilot Status on its own).
113
115
  - **Check on WhatsApp:** Whether a phone exists on WhatsApp. **Non-official (Evolution) numbers only** — a Meta number answers `400 NOT_SUPPORTED_FOR_META`. For Brazilian mobiles the 9th-digit variant is probed too, and the returned `number` is the **registered** form to send to, which may differ from what you passed.
114
116
  - **Update Settings:** Per-number settings. This is the only settings endpoint: there is no `POST /numbers/{id}/settings`, and Evolution's `syncFullHistory` does not exist here. Partial — only the fields you add to the collection change.
115
117
  - **History Import Enabled** / **Webhook Historical Messages** apply to every provider. The second is off by default: each reconnect replays up to 30 days of conversation, and your integration cannot tell it apart from new traffic (on the FREE plan it also consumes inbound quota). To *read* history, use Message → Get History.
@@ -137,6 +139,15 @@ The **Pilot Status** node provides several resources and operations to manage yo
137
139
  ### 5. Service Window
138
140
  - **Get:** Whether the Meta 24h customer-service window is open for a contact. ⚠️ Branch on `windowType`, not on `open`: on a **META** number `windowType` is `META_24H` and `open` is a real constraint (outside the window only an approved template goes through); on a **web/unofficial** number `windowType` is `NONE` and `open` is **always** `true`, because the Meta rule does not exist there.
139
141
 
142
+ ### 8. Lead (Meta Lead Ads — Facebook / Instagram Instant Forms)
143
+
144
+ Read-only, and requires a **number-scoped API key**: a lead belongs to the number whose Page is linked in the dashboard.
145
+
146
+ - **Get Many:** `GET /v1/leads` — the number's leads, newest first by the time the person **submitted** the form. Filters: **Form ID**, **Ad ID**, **Page ID** (exact match), **Start Date** / **End Date** (Meta's `created_time`, not when Pilot Status received the lead), **Page**, **Page Size** (max 100). Answers `{ leads, total, page, pageSize, totalPages, notice? }`.
147
+ - **Get:** `GET /v1/leads/{id}` — one lead by its Pilot Status `id` (= `data.leadId` on the `lead.received` webhook, **not** Meta's `leadgenId`). Answers `{ lead, notice? }`; a lead of another number is `404 LEAD_NOT_FOUND`.
148
+
149
+ Each lead: `{ id, leadgenId, whatsappNumberId, pageId, pageName, formId, formName, adId, adName, adsetName, campaignName, platform, isOrganic, createdAt, fullName, email, phone, fields, consentGiven, conversationId, autoSendStatus, autoSendReason, source, redacted }`, with `fields` as `{ key, label, values }`. ⚠️ `consentGiven: null` means **unknown** (no consent checkbox configured, or not answered) — never read it as a refusal. On a **RELAY_ONLY** number a lead keeps its ids, attribution and status but comes back with `redacted: true` and no name, e-mail, phone or answers, and the response carries `notice: "PII_RELAY_ONLY"`.
150
+
140
151
  ### 7. Phone Line (identity verification + activation audio)
141
152
 
142
153
  Requires a **workspace (tenant-scoped) API key** — a number-scoped key is refused. The verification operations need the **OWNER** role (`phone_lines:purchase`); the audio needs `phone_lines:read`. Errors come back as `{ error, code }`.
@@ -297,6 +297,7 @@ class PilotStatus {
297
297
  { name: 'Newsletter', value: 'newsletter' },
298
298
  { name: 'Analytics', value: 'analytics' },
299
299
  { name: 'Service Window', value: 'serviceWindow' },
300
+ { name: 'Lead', value: 'lead' },
300
301
  { name: 'Remote Pairing', value: 'remotePairing' },
301
302
  { name: 'Call', value: 'call' },
302
303
  { name: 'Phone Line', value: 'phoneLine' },
@@ -1139,6 +1140,13 @@ class PilotStatus {
1139
1140
  action: 'Logout a number',
1140
1141
  routing: { request: { method: 'POST', url: '=/numbers/{{$parameter.numberId}}/logout' } },
1141
1142
  },
1143
+ {
1144
+ name: 'Pay Extra Charge',
1145
+ value: 'pay',
1146
+ description: 'Pay now the extra-number charge of one number. A number past the paid capacity is charged when it first connects; if that charge is refused, SENDING from the number is blocked (409 NUMBER_BLOCKED, reason extra_charge_unpaid) until it is paid — Get shows extraChargeUnpaidSince and extraChargeDisconnectAt. With a card on file this CHARGES it. Requires a tenant-scoped API key with the billing:manage permission. Answers status paid, or not_required when nothing is owed (safe to repeat). Fails with 402 PAYMENT_FAILED or INSUFFICIENT_FUNDS, 409 PAYMENT_IN_PROGRESS, or 502 PAYMENT_PROVIDER_ERROR (retried by Pilot Status on its own).',
1147
+ action: 'Pay the extra charge of a number',
1148
+ routing: { request: { method: 'POST', url: '=/numbers/{{$parameter.numberId}}/pay' } },
1149
+ },
1142
1150
  {
1143
1151
  name: 'Check on WhatsApp',
1144
1152
  value: 'check',
@@ -1211,6 +1219,7 @@ class PilotStatus {
1211
1219
  'restore',
1212
1220
  'purge',
1213
1221
  'logout',
1222
+ 'pay',
1214
1223
  'get',
1215
1224
  'updateSettings',
1216
1225
  ],
@@ -1800,6 +1809,145 @@ class PilotStatus {
1800
1809
  routing: { send: { type: 'query', property: 'destinationNumber' } },
1801
1810
  },
1802
1811
  // ----------------------------------
1812
+ // Lead Operations (Meta Lead Ads Instant Forms — Facebook / Instagram)
1813
+ // ----------------------------------
1814
+ // Read-only. Leads belong to the number whose Page is linked in the dashboard, so these
1815
+ // routes require a NUMBER-scoped API key (a workspace key is refused), like Get History.
1816
+ {
1817
+ displayName: 'Operation',
1818
+ name: 'operation',
1819
+ type: 'options',
1820
+ noDataExpression: true,
1821
+ displayOptions: { show: { resource: ['lead'] } },
1822
+ options: [
1823
+ {
1824
+ name: 'Get Many',
1825
+ value: 'getAll',
1826
+ description: 'List the leads captured from Meta Lead Ads Instant Forms (Facebook / Instagram) of the Pages linked to the key\'s number, newest first by the time the person SUBMITTED the form. Answers {leads, total, page, pageSize, totalPages, notice?}. ⚠️ consentGiven is three-state: null means UNKNOWN (no consent checkbox configured, or not answered) — never a refusal. On a RELAY_ONLY number a lead keeps its ids and attribution but comes back with redacted=true and no name, email, phone or answers, and the page carries notice=PII_RELAY_ONLY. Requires a number-scoped API key.',
1827
+ action: 'Get many leads',
1828
+ routing: { request: { method: 'GET', url: '/leads' } },
1829
+ },
1830
+ {
1831
+ name: 'Get',
1832
+ value: 'get',
1833
+ description: 'One lead by its Pilot Status id — the `id` of Get Many, and the `leadId` of the lead.received webhook (NOT Meta\'s leadgenId). Answers {lead, notice?}. A lead of another number answers 404 LEAD_NOT_FOUND. Requires a number-scoped API key.',
1834
+ action: 'Get a lead',
1835
+ routing: { request: { method: 'GET', url: '=/leads/{{$parameter.leadId}}' } },
1836
+ },
1837
+ ],
1838
+ default: 'getAll',
1839
+ },
1840
+ {
1841
+ displayName: 'Lead ID',
1842
+ name: 'leadId',
1843
+ type: 'string',
1844
+ displayOptions: { show: { resource: ['lead'], operation: ['get'] } },
1845
+ default: '',
1846
+ required: true,
1847
+ description: 'Pilot Status lead id — `id` from Get Many or `data.leadId` from the lead.received webhook. Not Meta\'s leadgenId.',
1848
+ },
1849
+ {
1850
+ displayName: 'Form ID',
1851
+ name: 'leadFormId',
1852
+ type: 'string',
1853
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1854
+ default: '',
1855
+ description: 'Only leads from this Meta Instant Form (exact match)',
1856
+ },
1857
+ {
1858
+ displayName: 'Ad ID',
1859
+ name: 'leadAdId',
1860
+ type: 'string',
1861
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1862
+ default: '',
1863
+ description: 'Only leads attributed to this Meta ad (exact match)',
1864
+ },
1865
+ {
1866
+ displayName: 'Page ID',
1867
+ name: 'leadPageId',
1868
+ type: 'string',
1869
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1870
+ default: '',
1871
+ description: 'Only leads from this Facebook Page (exact match)',
1872
+ },
1873
+ {
1874
+ displayName: 'Start Date',
1875
+ name: 'leadStartDate',
1876
+ type: 'dateTime',
1877
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1878
+ default: '',
1879
+ description: 'Only leads submitted at or after this instant. Compared against Meta\'s created_time (when the person submitted the form), not when Pilot Status received it.',
1880
+ },
1881
+ {
1882
+ displayName: 'End Date',
1883
+ name: 'leadEndDate',
1884
+ type: 'dateTime',
1885
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1886
+ default: '',
1887
+ description: 'Only leads submitted at or before this instant. Must not precede Start Date.',
1888
+ },
1889
+ {
1890
+ displayName: 'Page',
1891
+ name: 'leadPage',
1892
+ type: 'number',
1893
+ typeOptions: { minValue: 1 },
1894
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1895
+ default: 1,
1896
+ routing: { send: { type: 'query', property: 'page' } },
1897
+ },
1898
+ {
1899
+ displayName: 'Page Size',
1900
+ name: 'leadPageSize',
1901
+ type: 'number',
1902
+ typeOptions: { minValue: 1, maxValue: 100 },
1903
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1904
+ default: 30,
1905
+ description: 'Items per page (max 100)',
1906
+ routing: { send: { type: 'query', property: 'pageSize' } },
1907
+ },
1908
+ // Empty filters are omitted rather than sent as `?formId=`, and the dates are converted
1909
+ // to ISO 8601 — the n8n date picker hands over another format.
1910
+ {
1911
+ displayName: 'Form ID',
1912
+ name: 'leadFormIdNormalized',
1913
+ type: 'hidden',
1914
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1915
+ default: '={{ $parameter.leadFormId || undefined }}',
1916
+ routing: { send: { type: 'query', property: 'formId' } },
1917
+ },
1918
+ {
1919
+ displayName: 'Ad ID',
1920
+ name: 'leadAdIdNormalized',
1921
+ type: 'hidden',
1922
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1923
+ default: '={{ $parameter.leadAdId || undefined }}',
1924
+ routing: { send: { type: 'query', property: 'adId' } },
1925
+ },
1926
+ {
1927
+ displayName: 'Page ID',
1928
+ name: 'leadPageIdNormalized',
1929
+ type: 'hidden',
1930
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1931
+ default: '={{ $parameter.leadPageId || undefined }}',
1932
+ routing: { send: { type: 'query', property: 'pageId' } },
1933
+ },
1934
+ {
1935
+ displayName: 'Start Date',
1936
+ name: 'leadStartDateNormalized',
1937
+ type: 'hidden',
1938
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1939
+ default: '={{ $parameter.leadStartDate ? new Date($parameter.leadStartDate).toISOString() : undefined }}',
1940
+ routing: { send: { type: 'query', property: 'startDate' } },
1941
+ },
1942
+ {
1943
+ displayName: 'End Date',
1944
+ name: 'leadEndDateNormalized',
1945
+ type: 'hidden',
1946
+ displayOptions: { show: { resource: ['lead'], operation: ['getAll'] } },
1947
+ default: '={{ $parameter.leadEndDate ? new Date($parameter.leadEndDate).toISOString() : undefined }}',
1948
+ routing: { send: { type: 'query', property: 'endDate' } },
1949
+ },
1950
+ // ----------------------------------
1803
1951
  // Remote Pairing Operations
1804
1952
  // ----------------------------------
1805
1953
  {
@@ -171,6 +171,13 @@ class PilotStatusTrigger {
171
171
  // where the choice is made.
172
172
  description: 'Answers of a submitted WhatsApp Flow. META numbers only: on any other number this subscribes to nothing and the Trigger never fires, with no error at activation. The data wrapper names the number whatsappNumberId, NOT numberId. On a Flow with a data_exchange endpoint the answers are in data.submitted, NOT in data.response — see the payload notice below before mapping anything.',
173
173
  },
174
+ {
175
+ name: 'Lead Received',
176
+ value: 'lead.received',
177
+ // Offered on EVERY provider: the lead arrives on the Facebook PAGE, not through
178
+ // the number's provider, and is routed to the number its Page is linked to.
179
+ description: 'A lead from a Meta Lead Ads Instant Form (Facebook / Instagram), delivered on the number whose Page is linked in the dashboard — any provider. The data wrapper names the number whatsappNumberId, NOT numberId, and the lead id is data.leadId (the id GET /v1/leads/{id} takes), NOT Meta\'s leadgenId. consentGiven null means UNKNOWN, not a refusal.',
180
+ },
174
181
  ],
175
182
  default: '*',
176
183
  description: 'The event to listen to',
@@ -195,7 +202,7 @@ class PilotStatusTrigger {
195
202
  name: 'payloadNotice',
196
203
  type: 'notice',
197
204
  default: '',
198
- description: 'The full JSON body is passed through (event + data). Phones are E.164 with a leading "+"; message.* events carry from/to/numberId/id/messageId/type/createdAt and may include an optional correlationId. message.reply adds contentReplied and quotedMessageId. call.* events (WhatsApp Business Calling — Meta Cloud API and web/Pilot Status numbers; call.permission_updated is Meta-only) are FLAT — fields sit next to event with no data wrapper: { event, callId, externalCallId?, direction, status, from, to, timestamp, duration? }. externalCallId is the provider call id (Meta wacid or Evolution GO CallID). On every number.* event, data.numberId is the WhatsApp NUMBER id — the same id GET /v1/numbers returns and the other number operations take. It used to carry the underlying instance id on number.created/connected/removed, so a workflow that stored that value and matched later events against it never matched. flow.response_received (Meta numbers only) carries the submitted Flow answers under data: { event, flowId, metaFlowId, flowToken, messageId, whatsappNumberId, from, receivedAt, response, responseRaw, flowMedia, submitted }. Its number field is whatsappNumberId, NOT numberId — same value, different name, so a mapping copied from a message.* branch reads undefined. response and responseRaw are mutually exclusive: response holds what YOUR OWN Flow endpoint returned, already parsed, and responseRaw carries the raw bytes from Meta ONLY when that parse failed. On a Flow with a data_exchange endpoint response is EMPTY even on a number that stores everything — Meta\'s completion payload carries only the flow_token — and WHAT THE PERSON TYPED IS IN submitted: one entry per data_exchange screen, { screen, at, data, omitted }, in order, where omitted (DATA_TOO_LARGE, LIMIT_REACHED or UNREADABLE) says why a data is null. flowMedia holds the files attached inside the form: { field, fileName, mimeType, status, url }. Both submitted and flowMedia are null and NEVER [] when empty, so a node testing for an empty array never fires; GET /v1/flows/{id}/responses publishes the same two lists as arrays, under media and submitted.',
205
+ description: 'The full JSON body is passed through (event + data). Phones are E.164 with a leading "+"; message.* events carry from/to/numberId/id/messageId/type/createdAt and may include an optional correlationId. message.reply adds contentReplied and quotedMessageId. call.* events (WhatsApp Business Calling — Meta Cloud API and web/Pilot Status numbers; call.permission_updated is Meta-only) are FLAT — fields sit next to event with no data wrapper: { event, callId, externalCallId?, direction, status, from, to, timestamp, duration? }. externalCallId is the provider call id (Meta wacid or Evolution GO CallID). On every number.* event, data.numberId is the WhatsApp NUMBER id — the same id GET /v1/numbers returns and the other number operations take. It used to carry the underlying instance id on number.created/connected/removed, so a workflow that stored that value and matched later events against it never matched. flow.response_received (Meta numbers only) carries the submitted Flow answers under data: { event, flowId, metaFlowId, flowToken, messageId, whatsappNumberId, from, receivedAt, response, responseRaw, flowMedia, submitted }. Its number field is whatsappNumberId, NOT numberId — same value, different name, so a mapping copied from a message.* branch reads undefined. response and responseRaw are mutually exclusive: response holds what YOUR OWN Flow endpoint returned, already parsed, and responseRaw carries the raw bytes from Meta ONLY when that parse failed. On a Flow with a data_exchange endpoint response is EMPTY even on a number that stores everything — Meta\'s completion payload carries only the flow_token — and WHAT THE PERSON TYPED IS IN submitted: one entry per data_exchange screen, { screen, at, data, omitted }, in order, where omitted (DATA_TOO_LARGE, LIMIT_REACHED or UNREADABLE) says why a data is null. flowMedia holds the files attached inside the form: { field, fileName, mimeType, status, url }. Both submitted and flowMedia are null and NEVER [] when empty, so a node testing for an empty array never fires; GET /v1/flows/{id}/responses publishes the same two lists as arrays, under media and submitted. lead.received (Meta Lead Ads, any provider) carries the whole lead under data: { leadId, leadgenId, whatsappNumberId, pageId, pageName, formId, formName, adId, adsetId, campaignId, adName, adsetName, campaignName, platform, isOrganic, createdAt, fullName, email, phone, fields, consentGiven, conversationId }. leadId is the Pilot Status id (the one GET /v1/leads/{id} takes); leadgenId is Meta\'s, unique per lead — use it to deduplicate. createdAt is when the person SUBMITTED the form. fields holds every answer as { key, label?, values } and values is ALWAYS a list, even for one answer. consentGiven is true/false only when the form has a consent checkbox configured; null means UNKNOWN, never a refusal.',
199
206
  },
200
207
  ],
201
208
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-pilot-status",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "description": "n8n node for Pilot Status API",
5
5
  "keywords": [
6
6
  "n8ncommunity",