n8n-nodes-pilot-status 2.11.0 → 2.13.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,44 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `n8n-nodes-pilot-status`.
|
|
4
4
|
|
|
5
|
+
## 2.13.0 - 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Workspace (Account Key)** resource:
|
|
10
|
+
- **Create** — new **Share Reserve Card** boolean (default off). On, the body is
|
|
11
|
+
`{ name, shareCard: true }`; off, it stays exactly `{ name }` (no `shareCard` key). A
|
|
12
|
+
value that is not a real boolean (e.g. an expression resolving to `"true"`) is refused
|
|
13
|
+
before the request instead of being dropped.
|
|
14
|
+
- **Link Shared Card** (`PUT /v1/workspaces/{workspaceId}/shared-card`) and **Unlink
|
|
15
|
+
Shared Card** (`DELETE …/shared-card`), no body, with a new **Workspace ID** field;
|
|
16
|
+
both answer `{ workspaceId, sharedCard, changed }`.
|
|
17
|
+
- Get Many / Create descriptions now name `sharedCard: { linked, sourceWorkspaceId }`.
|
|
18
|
+
- **Number → Create** description names `numberId` in the 201 (the number id, not
|
|
19
|
+
`instance.id`).
|
|
20
|
+
- **Pilot Status Trigger**: the payload notice names the top-level `id` of every
|
|
21
|
+
`number.*` event (dedup key, stable across retries) and `data.connectedAt` on
|
|
22
|
+
`number.connected`. Payloads were already passed through whole.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- ⚠️ API behaviour (server side): a workspace created via `POST /v1/workspaces` without
|
|
27
|
+
`shareCard: true` is no longer linked to the reseller's reserve card automatically.
|
|
28
|
+
|
|
29
|
+
### Not included
|
|
30
|
+
|
|
31
|
+
- `price` / `currency` of `GET /v1/phone-lines/available`: the node does not list or buy
|
|
32
|
+
phone lines (only verification and activation audio), so there is nothing to map.
|
|
33
|
+
|
|
34
|
+
## 2.12.0 - 2026-10-29
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **Template → Get Insights** (`GET /v1/templates/{id}/insights`): Meta's
|
|
39
|
+
sent/delivered/read totals, `readRate`, button `clicks` and a `daily` series, with
|
|
40
|
+
**Days** 7, 30 (default) or 90 sent as `?days=`. `422
|
|
41
|
+
TEMPLATE_INSIGHTS_UNAVAILABLE_SMB` on WhatsApp Business App / coexistence accounts.
|
|
42
|
+
|
|
5
43
|
## 2.11.0 - 2026-10-28
|
|
6
44
|
|
|
7
45
|
### Added
|
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ The API never returns the secret — not even in the `201` of the create call
|
|
|
72
72
|
- **Message Received** (`message.received`): Triggered when a general inbound message is received on your connected WhatsApp number.
|
|
73
73
|
- **Group Message** (`message.group`): Triggered when an inbound group message is received (group subject is included when available).
|
|
74
74
|
- **Newsletter Message** (`message.newsletter`): Triggered when an inbound WhatsApp channel / newsletter message is received.
|
|
75
|
-
- **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
|
+
- **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. Every `number.*` body carries a top-level `id` (UUID), the same on every retry or replay of that event — deduplicate on it; `number.connected` also carries `data.connectedAt` (ISO 8601, when the connection was established).
|
|
76
76
|
- **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).
|
|
77
77
|
- **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.
|
|
78
78
|
- **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.
|
|
@@ -104,7 +104,7 @@ The **Pilot Status** node provides several resources and operations to manage yo
|
|
|
104
104
|
|
|
105
105
|
> ⚠️ **Delete changed meaning.** It used to destroy the number and free the phone for immediate reconnection. It is now a **30-day soft delete**: the device is logged out, the row survives, and the response carries `restorableUntil`. Use **Restore** to undo it (you must reconnect afterwards) or **Purge** for the old, irreversible behaviour. Deleting still does **not** reduce paid capacity — the freed slot stays available to reconnect another number this cycle.
|
|
106
106
|
|
|
107
|
-
- **Create:** Provision a new WhatsApp number instance. It returns a base64 QR Code and optional `pairingCode` (letter code) for WhatsApp “link a device
|
|
107
|
+
- **Create:** Provision a new WhatsApp number instance. It returns a base64 QR Code and optional `pairingCode` (letter code) for WhatsApp “link a device”, plus `numberId` — the **number** id (the one Get Many, Delete and the webhooks' `data.numberId` use), not `instance.id`. By default, the number is linked to the API Key used in the request.
|
|
108
108
|
- **Connect (QR + pairing code):** Regenerate QR and pairing code for an existing instance (only when not `OPEN`).
|
|
109
109
|
- **Get Status:** Check the connection status of a WhatsApp instance (e.g., `CONNECTING`, `OPEN`).
|
|
110
110
|
- **Get:** Full detail of one number, including the `settings` block and — for official Meta numbers — the nested `meta` block.
|
|
@@ -232,12 +232,22 @@ Tenant-scoped credential. Nothing here charges by itself — a human pays the ho
|
|
|
232
232
|
- **Sync Payment Intent:** `POST /v1/billing/payment-intents/{id}/sync` → `{ paymentIntentId, status, orderId, orderStatus, amount, currency, credited, balance, cardSaved }` — credits the wallet exactly once; never charges.
|
|
233
233
|
- ⛔ Never log a `clientSecret`. `503 PAYMENTS_NOT_CONFIGURED` when card payments are unavailable.
|
|
234
234
|
|
|
235
|
+
### 17. Template
|
|
236
|
+
|
|
237
|
+
- **Get Many** / **Get:** `GET /v1/templates[/{id}]`. Only `sendable: true` templates can be sent.
|
|
238
|
+
- **Get Insights:** `GET /v1/templates/{id}/insights?days=7|30|90` (default 30) — Meta's
|
|
239
|
+
sent/delivered/read totals, `readRate`, button `clicks` and a `daily` series for a META
|
|
240
|
+
template. WhatsApp Business App / coexistence accounts answer `422
|
|
241
|
+
TEMPLATE_INSIGHTS_UNAVAILABLE_SMB` (Meta gives no insights there); a non-Meta template
|
|
242
|
+
answers `409 TEMPLATE_NOT_ON_META`. The first call may enable insights on the WABA at Meta.
|
|
243
|
+
|
|
235
244
|
### 16. Workspace and Workspace API Key (account key only)
|
|
236
245
|
|
|
237
246
|
These need an **account key** (`ps_account_...`); any other key or an OAuth token answers `403 ACCOUNT_KEY_REQUIRED`. The credential's Workspace ID is ignored here.
|
|
238
247
|
|
|
239
|
-
- **Workspace (Account Key) → Get Many:** `GET /v1/workspaces` → `{ data: [{ id, name, role, plan, createdAt }] }` — the workspaces the key's user is an active member of.
|
|
240
|
-
- **Workspace (Account Key) → Create:** `POST /v1/workspaces` with `{ name }` → `201 { id, name, plan, createdAt, role: "OWNER", apiKey }`, `apiKey` being the new workspace's primary `ps_workspace_...` key, **shown only here** — or `null` if minting failed (the workspace exists: mint a key with Workspace API Key → Create, do not create again). `409 WORKSPACE_LIMIT_REACHED`.
|
|
248
|
+
- **Workspace (Account Key) → Get Many:** `GET /v1/workspaces` → `{ data: [{ id, name, role, plan, createdAt, sharedCard: { linked, sourceWorkspaceId } }] }` — the workspaces the key's user is an active member of.
|
|
249
|
+
- **Workspace (Account Key) → Create:** `POST /v1/workspaces` with `{ name }` → `201 { id, name, plan, createdAt, role: "OWNER", apiKey, sharedCard }`, `apiKey` being the new workspace's primary `ps_workspace_...` key, **shown only here** — or `null` if minting failed (the workspace exists: mint a key with Workspace API Key → Create, do not create again). `409 WORKSPACE_LIMIT_REACHED`. **Share Reserve Card** (off by default) sends `{ name, shareCard: true }` and links the new workspace to your reserve card source; off sends no `shareCard`, and the workspace is **not** shared. With it on, `409 SHARED_CARD_NOT_CONFIGURED`, `SOURCE_ARCHIVED` or `NO_SHARED_OWNER` create **no** workspace.
|
|
250
|
+
- **Workspace (Account Key) → Link / Unlink Shared Card:** `PUT` / `DELETE /v1/workspaces/{workspaceId}/shared-card`, no body, OWNER of that workspace only → `{ workspaceId, sharedCard, changed }` (idempotent: `changed: false` when nothing changed). Unlink is how a reseller stops its card from paying a defaulting customer's renewals. `409 SHARED_CARD_NOT_CONFIGURED`, `SOURCE_ARCHIVED`, `NO_SHARED_OWNER`; `400 SELF_SOURCE` when linking the source workspace itself.
|
|
241
251
|
- **Workspace API Key → Get Many / Create / Revoke:** `GET|POST /v1/workspaces/{workspaceId}/api-keys`, `DELETE .../api-keys/{keyId}`, with the user's live role (ADMIN and up). Create mints a named key (`apiKey.key` shown once; `409 WORKSPACE_KEY_LIMIT_REACHED`); Revoke answers `{ id, revokedAt }` (`409 PRIMARY_KEY_NOT_REVOCABLE` for the primary, `404 API_KEY_NOT_FOUND`).
|
|
242
252
|
|
|
243
253
|
---
|
|
@@ -86,8 +86,13 @@ export declare function workspaceWebhookCreatePreSend(this: IExecuteSingleFuncti
|
|
|
86
86
|
*/
|
|
87
87
|
export declare function workspaceWebhookUpdatePreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
88
88
|
/**
|
|
89
|
-
* Workspace → Create: the body is exactly `{ name }
|
|
90
|
-
* field with 400
|
|
89
|
+
* Workspace → Create: the body is exactly `{ name }`, or `{ name, shareCard: true }` when
|
|
90
|
+
* Share Reserve Card is on — `POST /v1/workspaces` refuses any other field with 400
|
|
91
|
+
* UNKNOWN_FIELDS. Off sends NO `shareCard` key (absent = not shared, same as `false`).
|
|
92
|
+
*
|
|
93
|
+
* ⛔ A value that is not a real boolean (an expression resolving to "true", 1, …) is refused
|
|
94
|
+
* here instead of being dropped: dropping it would create the workspace UNSHARED and say
|
|
95
|
+
* nothing, and the API itself answers 400 INVALID_SHARE_CARD to anything but a JSON boolean.
|
|
91
96
|
*/
|
|
92
97
|
export declare function workspaceCreatePreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
93
98
|
/** Workspace API Key → Create: the body is exactly `{ name }`. */
|
|
@@ -278,11 +278,21 @@ function requiredName(param, what) {
|
|
|
278
278
|
return name;
|
|
279
279
|
}
|
|
280
280
|
/**
|
|
281
|
-
* Workspace → Create: the body is exactly `{ name }
|
|
282
|
-
* field with 400
|
|
281
|
+
* Workspace → Create: the body is exactly `{ name }`, or `{ name, shareCard: true }` when
|
|
282
|
+
* Share Reserve Card is on — `POST /v1/workspaces` refuses any other field with 400
|
|
283
|
+
* UNKNOWN_FIELDS. Off sends NO `shareCard` key (absent = not shared, same as `false`).
|
|
284
|
+
*
|
|
285
|
+
* ⛔ A value that is not a real boolean (an expression resolving to "true", 1, …) is refused
|
|
286
|
+
* here instead of being dropped: dropping it would create the workspace UNSHARED and say
|
|
287
|
+
* nothing, and the API itself answers 400 INVALID_SHARE_CARD to anything but a JSON boolean.
|
|
283
288
|
*/
|
|
284
289
|
async function workspaceCreatePreSend(requestOptions) {
|
|
285
|
-
|
|
290
|
+
const name = requiredName.call(this, 'workspaceName', 'a workspace');
|
|
291
|
+
const shareCard = this.getNodeParameter('workspaceShareCard', false);
|
|
292
|
+
if (shareCard !== true && shareCard !== false && shareCard !== undefined && shareCard !== null) {
|
|
293
|
+
throw new Error('Pilot Status: "Share Reserve Card" must be a boolean (true or false).');
|
|
294
|
+
}
|
|
295
|
+
requestOptions.body = shareCard === true ? { name, shareCard: true } : { name };
|
|
286
296
|
return requestOptions;
|
|
287
297
|
}
|
|
288
298
|
/** Workspace API Key → Create: the body is exactly `{ name }`. */
|
|
@@ -1439,7 +1449,7 @@ class PilotStatus {
|
|
|
1439
1449
|
{
|
|
1440
1450
|
name: 'Create',
|
|
1441
1451
|
value: 'create',
|
|
1442
|
-
description: 'Create/Connect a WhatsApp Number',
|
|
1452
|
+
description: 'Create/Connect a WhatsApp Number. Answers 201 {numberId, instance, qrcodeBase64, pairingCode, …}: numberId is the NUMBER id (the id of Get Many, Delete and the webhooks\' data.numberId), NOT instance.id.',
|
|
1443
1453
|
action: 'Create a number',
|
|
1444
1454
|
routing: { request: { method: 'POST', url: '/numbers' } },
|
|
1445
1455
|
},
|
|
@@ -1717,6 +1727,15 @@ class PilotStatus {
|
|
|
1717
1727
|
action: 'Get a template',
|
|
1718
1728
|
routing: { request: { method: 'GET', url: '=/templates/{{$parameter.templateIdForGet}}' } },
|
|
1719
1729
|
},
|
|
1730
|
+
{
|
|
1731
|
+
name: 'Get Insights',
|
|
1732
|
+
value: 'getInsights',
|
|
1733
|
+
description: 'Meta analytics for one META template: sent/delivered/read totals, readRate (null when nothing was delivered), button clicks and a daily series. WhatsApp Business App / coexistence accounts answer 422 TEMPLATE_INSIGHTS_UNAVAILABLE_SMB (Meta gives no insights there); a non-Meta template answers 409 TEMPLATE_NOT_ON_META. The first call may enable insights on the WABA at Meta.',
|
|
1734
|
+
action: 'Get template insights',
|
|
1735
|
+
routing: {
|
|
1736
|
+
request: { method: 'GET', url: '=/templates/{{$parameter.templateIdForGet}}/insights' },
|
|
1737
|
+
},
|
|
1738
|
+
},
|
|
1720
1739
|
],
|
|
1721
1740
|
default: 'getAll',
|
|
1722
1741
|
},
|
|
@@ -1724,10 +1743,24 @@ class PilotStatus {
|
|
|
1724
1743
|
displayName: 'Template ID',
|
|
1725
1744
|
name: 'templateIdForGet',
|
|
1726
1745
|
type: 'string',
|
|
1727
|
-
displayOptions: { show: { resource: ['template'], operation: ['get'] } },
|
|
1746
|
+
displayOptions: { show: { resource: ['template'], operation: ['get', 'getInsights'] } },
|
|
1728
1747
|
default: '',
|
|
1729
1748
|
required: true,
|
|
1730
1749
|
},
|
|
1750
|
+
{
|
|
1751
|
+
displayName: 'Days',
|
|
1752
|
+
name: 'templateInsightsDays',
|
|
1753
|
+
type: 'options',
|
|
1754
|
+
displayOptions: { show: { resource: ['template'], operation: ['getInsights'] } },
|
|
1755
|
+
options: [
|
|
1756
|
+
{ name: '7 Days', value: 7 },
|
|
1757
|
+
{ name: '30 Days', value: 30 },
|
|
1758
|
+
{ name: '90 Days', value: 90 },
|
|
1759
|
+
],
|
|
1760
|
+
default: 30,
|
|
1761
|
+
description: 'Window of the insights, ending today',
|
|
1762
|
+
routing: { send: { type: 'query', property: 'days' } },
|
|
1763
|
+
},
|
|
1731
1764
|
// ----------------------------------
|
|
1732
1765
|
// Flow Operations
|
|
1733
1766
|
// ----------------------------------
|
|
@@ -3933,10 +3966,34 @@ class PilotStatus {
|
|
|
3933
3966
|
{
|
|
3934
3967
|
name: 'Get Many',
|
|
3935
3968
|
value: 'getAll',
|
|
3936
|
-
description: 'The workspaces the account key\'s user is an active member of: {data: [{id, name, role, plan, createdAt}]}. Use an id as the credential\'s Workspace ID.',
|
|
3969
|
+
description: 'The workspaces the account key\'s user is an active member of: {data: [{id, name, role, plan, createdAt, sharedCard: {linked, sourceWorkspaceId}}]}. Use an id as the credential\'s Workspace ID.',
|
|
3937
3970
|
action: 'Get many workspaces',
|
|
3938
3971
|
routing: { request: { method: 'GET', url: '/workspaces' } },
|
|
3939
3972
|
},
|
|
3973
|
+
{
|
|
3974
|
+
name: 'Link Shared Card',
|
|
3975
|
+
value: 'linkSharedCard',
|
|
3976
|
+
description: 'Link the caller\'s RESERVE card source to this workspace, so its renewals fall back to that card (its own card is still tried first). OWNER of the workspace only (403 otherwise). Answers {workspaceId, sharedCard: {linked, sourceWorkspaceId}, changed} — idempotent: already linked → changed: false. 409 SHARED_CARD_NOT_CONFIGURED (no reserve card for this user), SOURCE_ARCHIVED, NO_SHARED_OWNER; 400 SELF_SOURCE when the workspace IS the source.',
|
|
3977
|
+
action: 'Link the shared card of a workspace',
|
|
3978
|
+
routing: {
|
|
3979
|
+
request: {
|
|
3980
|
+
method: 'PUT',
|
|
3981
|
+
url: '=/workspaces/{{encodeURIComponent($parameter.workspaceSharedCardWorkspaceId)}}/shared-card',
|
|
3982
|
+
},
|
|
3983
|
+
},
|
|
3984
|
+
},
|
|
3985
|
+
{
|
|
3986
|
+
name: 'Unlink Shared Card',
|
|
3987
|
+
value: 'unlinkSharedCard',
|
|
3988
|
+
description: 'Unlink the reserve card from this workspace, so the reseller\'s card stops paying its renewals (e.g. a defaulting customer). OWNER of the workspace only (403 otherwise). Answers {workspaceId, sharedCard, changed} — idempotent: not linked → changed: false. 409 NO_SHARED_OWNER when it is linked to a source the caller is not an active OWNER of.',
|
|
3989
|
+
action: 'Unlink the shared card of a workspace',
|
|
3990
|
+
routing: {
|
|
3991
|
+
request: {
|
|
3992
|
+
method: 'DELETE',
|
|
3993
|
+
url: '=/workspaces/{{encodeURIComponent($parameter.workspaceSharedCardWorkspaceId)}}/shared-card',
|
|
3994
|
+
},
|
|
3995
|
+
},
|
|
3996
|
+
},
|
|
3940
3997
|
],
|
|
3941
3998
|
default: 'getAll',
|
|
3942
3999
|
},
|
|
@@ -3949,6 +4006,23 @@ class PilotStatus {
|
|
|
3949
4006
|
default: '',
|
|
3950
4007
|
required: true,
|
|
3951
4008
|
},
|
|
4009
|
+
{
|
|
4010
|
+
displayName: 'Share Reserve Card',
|
|
4011
|
+
name: 'workspaceShareCard',
|
|
4012
|
+
type: 'boolean',
|
|
4013
|
+
description: 'Whether to link the new workspace to your reserve card source (sent as shareCard: true). Off = NOT shared — a workspace created via the API no longer inherits the reserve card. 409 SHARED_CARD_NOT_CONFIGURED, SOURCE_ARCHIVED or NO_SHARED_OWNER create NO workspace.',
|
|
4014
|
+
displayOptions: { show: { resource: ['workspace'], operation: ['create'] } },
|
|
4015
|
+
default: false,
|
|
4016
|
+
},
|
|
4017
|
+
{
|
|
4018
|
+
displayName: 'Workspace ID',
|
|
4019
|
+
name: 'workspaceSharedCardWorkspaceId',
|
|
4020
|
+
type: 'string',
|
|
4021
|
+
description: 'data[].id from Workspace (Account Key) → Get Many',
|
|
4022
|
+
displayOptions: { show: { resource: ['workspace'], operation: ['linkSharedCard', 'unlinkSharedCard'] } },
|
|
4023
|
+
default: '',
|
|
4024
|
+
required: true,
|
|
4025
|
+
},
|
|
3952
4026
|
// ----------------------------------
|
|
3953
4027
|
// Workspace API Key Operations (/v1/workspaces/{id}/api-keys) — ACCOUNT KEY ONLY, acting
|
|
3954
4028
|
// with the user's LIVE role in that workspace (ADMIN and up; not a member → 403
|
|
@@ -202,7 +202,7 @@ class PilotStatusTrigger {
|
|
|
202
202
|
name: 'payloadNotice',
|
|
203
203
|
type: 'notice',
|
|
204
204
|
default: '',
|
|
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.',
|
|
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). Every number.* event carries a top-level id (UUID), the same on every retry or replay of that event — deduplicate on it; number.connected also carries data.connectedAt (ISO 8601, when the connection was established). 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.',
|
|
206
206
|
},
|
|
207
207
|
],
|
|
208
208
|
};
|