n8n-nodes-pilot-status 2.21.0 → 2.24.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,35 @@
2
2
 
3
3
  All notable changes to `n8n-nodes-pilot-status`.
4
4
 
5
+ ## 2.24.0 - 2026-11-30
6
+
7
+ ### Added
8
+
9
+ - Number operations **List Contacts** (`GET /v1/numbers/{id}/contacts`, Search + Page/Page
10
+ Size), **Get Contact** (`GET /v1/numbers/{id}/contacts/{phone}`) and **Get Contact Picture**
11
+ (`GET /v1/numbers/{id}/contacts/{phone}/picture`). QR numbers only (official numbers answer
12
+ 422 `FEATURE_NOT_SUPPORTED`); need `chat:read`.
13
+
14
+ ## 2.23.0 - 2026-11-29
15
+
16
+ ### Added
17
+
18
+ - Message → Send: Message Types **Location** (latitude, longitude, optional name/address) and
19
+ **Contact** (contacts as JSON — structured or `{"vcard": ...}` — or a raw vCard).
20
+ - Message operations **React** (`POST /v1/messages/{id}/reaction`, emoji) and **Remove
21
+ Reaction** (`DELETE /v1/messages/{id}/reaction`; 422 `NOT_SUPPORTED_ON_OFFICIAL_NUMBER` on
22
+ official numbers).
23
+
24
+ ## 2.22.0 - 2026-11-29
25
+
26
+ ### Added
27
+
28
+ - Trigger events `message.reaction`, `message.edited` and `message.deleted` (edited/deleted on
29
+ official numbers only in coexistence).
30
+ - Every request sends `x-pilot-status-client: n8n/<version>`, which the API reads before the
31
+ User-Agent. A browser `fetch` cannot set `User-Agent`, so without it browser calls were
32
+ counted as `browser` instead of as this client.
33
+
5
34
  ## 2.21.0 - 2026-11-29
6
35
 
7
36
  ### Added
package/README.md CHANGED
@@ -89,6 +89,7 @@ The secret is returned in clear **once**: in the `201` of the create (`POST /v1/
89
89
  - **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.
90
90
  - **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.
91
91
  - **Chat Archived / Unarchived** (`chat.archived`, `chat.unarchived`) and **Contact Blocked / Unblocked** (`contact.blocked`, `contact.unblocked`): one shared payload, `{ id, event, data: { numberId, numberPhone, provider, jid, phone, isGroup, occurredAt, source } }`. `provider` is `qrcode` or `meta`; `source` is `phone` (changed on the device) or `api` (changed through Pilot Status); `phone` is `null` when the JID is not a phone (group, LID). **`chat.*` is QR Code only**; `contact.*` fires on QR Code numbers and on official Meta numbers (Meta: only when the block is done through the API). Deduplicate on the top-level `id`.
92
+ - **Message Reaction / Edited / Deleted** (`message.reaction`, `message.edited`, `message.deleted`): one shared payload, `{ id, event, data: { messageId, originalMessageId, originalInternalMessageId, whatsappNumberId, provider, from, to, chatId, isGroup, fromMe, createdAt, emoji?, text? } }`. Only changes made by the contact. `emoji` is `null` when the reaction was removed; `text` is the new text of an edit. On official (Meta) numbers, `message.edited` and `message.deleted` only fire for numbers in coexistence (WhatsApp Business app). Deduplicate on the top-level `id`.
92
93
 
93
94
  Webhook payload notes:
94
95
  - 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.
@@ -104,7 +105,7 @@ Webhook payload notes:
104
105
  The **Pilot Status** node provides several resources and operations to manage your account and send messages.
105
106
 
106
107
  ### 1. Message
107
- - **Send:** Pick a **Message Type** first (right below the recipient): **Template** (default; OTP, Utility or Marketing template with variables), **Text** (free text — required **Text** field, no template), **Media** (**Media URL**, **Media Type**, optional **Caption**) or **Interactive** (**Text** plus buttons/list/carousel/Flow from Additional Fields). Workflows saved before this field keep working as **Template**. Choose **Phone Number** or **WhatsApp Group**; for groups use `groupId` (JID ending in `@g.us`) instead of `destinationNumber`. Optional dropdown loads groups from `GET /v1/groups` when the WhatsApp session is connected. Variables can be provided via JSON or the UI collection (including placeholders used in button labels). Add **Mark Read** (switched off) under Additional Fields to reply without marking the conversation read — e.g. an AI agent answering while a human should still see it unread; leave it out to follow the number's **Mark Read On Send** setting. Meta Cloud API numbers only (no "typing" indicator either); on Evolution numbers turn off **Read Messages** instead. Note that **Send Typing Indicator** on a Meta number also marks read. Add **Idempotency Key** under Additional Fields to make retries safe: it is sent as the `Idempotency-Key` header (never in the body), and within 24 hours the same key with the same body returns the first accepted response instead of sending again (`Idempotent-Replayed: true`). Map it from your own data (e.g. an order id) so a retry reuses it. Same key + different body → `409 IDEMPOTENCY_KEY_REUSED`; first call still running → `409 IDEMPOTENCY_KEY_IN_USE`; invalid key → `400 IDEMPOTENCY_KEY_INVALID`. Only 2xx responses are remembered, so after an error you can fix the input and retry with the same key.
108
+ - **Send:** Pick a **Message Type** first (right below the recipient): **Template** (default; OTP, Utility or Marketing template with variables), **Text** (free text — required **Text** field, no template), **Media** (**Media URL**, **Media Type**, optional **Caption**) **Interactive** (**Text** plus buttons/list/carousel/Flow from Additional Fields), **Location** (**Latitude**, **Longitude**, optional **Location Name**/**Location Address**) or **Contact** (**Contacts (JSON)** — 1–257 cards, structured or `{"vcard": ...}` — or a raw **vCard**). Workflows saved before this field keep working as **Template**. Choose **Phone Number** or **WhatsApp Group**; for groups use `groupId` (JID ending in `@g.us`) instead of `destinationNumber`. Optional dropdown loads groups from `GET /v1/groups` when the WhatsApp session is connected. Variables can be provided via JSON or the UI collection (including placeholders used in button labels). Add **Mark Read** (switched off) under Additional Fields to reply without marking the conversation read — e.g. an AI agent answering while a human should still see it unread; leave it out to follow the number's **Mark Read On Send** setting. Meta Cloud API numbers only (no "typing" indicator either); on Evolution numbers turn off **Read Messages** instead. Note that **Send Typing Indicator** on a Meta number also marks read. Add **Idempotency Key** under Additional Fields to make retries safe: it is sent as the `Idempotency-Key` header (never in the body), and within 24 hours the same key with the same body returns the first accepted response instead of sending again (`Idempotent-Replayed: true`). Map it from your own data (e.g. an order id) so a retry reuses it. Same key + different body → `409 IDEMPOTENCY_KEY_REUSED`; first call still running → `409 IDEMPOTENCY_KEY_IN_USE`; invalid key → `400 IDEMPOTENCY_KEY_INVALID`. Only 2xx responses are remembered, so after an error you can fix the input and retry with the same key.
108
109
  - **Get Status:** Retrieve the current status of a specific message using either its Pilot Status message id or WhatsApp provider id.
109
110
  - **Get History:** Read the conversation history of the number, newest first — both directions, every provider, including messages imported from the device on connect. Filters by **Start Date** / **End Date** over the *provider* timestamp (when the message happened, not when it was ingested). This is how you fetch old messages: the webhook does not replay history by default. Requires a number-scoped API key.
110
111
  - **Get Many:** The message **log** — sent and received, with delivery status, newest first. Different from Get History: this is the operational trail (`status`, `errorCode`, `origin`, whether the 24h window was open at send), not the chat thread. Filters: Direction, Status (comma-separated), Page, Page Size. For date/search/template filters use the HTTP Request node.
@@ -114,6 +115,8 @@ The **Pilot Status** node provides several resources and operations to manage yo
114
115
  - **Resend:** `POST /v1/messages/{id}/resend`, no body → `202`, a NEW message (`originalMessageId` points back). Only `FAILED`/`CANCELED` (`409 MESSAGE_NOT_RESENDABLE`); a second resend within 120 s is `409 RESEND_ALREADY_IN_FLIGHT`; no stored request is `422`. Number-scoped credential; needs `messages:resend`.
115
116
  - **Mark as Read:** Blue ticks for a contact's last inbound message and every earlier one, without sending anything. Best-effort: a `200` with `acked: false` means there was nothing to acknowledge, or the number is `RELAY_ONLY`.
116
117
  - **Send Typing Indicator:** Show "typing"/"recording" to a contact. It clears when a message is sent or after a provider timeout (~25s on Meta). On **META** numbers `recording` is shown as `typing` and `paused` is a no-op — read `effectiveState` in the response for what actually happened.
118
+ - **React:** React to a message with one emoji (`POST /v1/messages/{id}/reaction`; the **Message ID** may be the Pilot Status id, the correlationId or the wamid). Counts as a message.
119
+ - **Remove Reaction:** Remove this number's reaction (`DELETE /v1/messages/{id}/reaction`). Official (Meta) numbers answer `422 NOT_SUPPORTED_ON_OFFICIAL_NUMBER`.
117
120
  - **Cancel:** Cancel scheduled (not-yet-sent) messages by id.
118
121
 
119
122
  ### 2. Number
@@ -139,6 +142,7 @@ The **Pilot Status** node provides several resources and operations to manage yo
139
142
  - **Create Meta Number:** `POST /v1/numbers/meta` with `{ name, number, metaPhoneId, metaWabaId, metaAccessToken, metaAppSecret, metaAppId, routeWebhooksToPilot }` → `201 { number, webhook, linkedApiKeyId }`. Your own WABA credentials: the ids are node fields, `metaAccessToken` and `metaAppSecret` come from the **Pilot Status Meta Number** credential. **Route Webhooks to Pilot Status** subscribes the WHOLE WABA to our callback. A number key cannot create numbers; an existing number is `409`.
140
143
  - **Get Many API Keys:** `GET /v1/numbers/{id}/api-keys` → `{ data }`, masked. **Create API Key:** `POST /v1/numbers/{id}/api-keys` with `{ name }` → `201 { apiKey }` — the secret `apiKey.key` is returned **only once**; `409 NUMBER_KEY_LIMIT_REACHED` at the limit. **Revoke API Key:** `DELETE /v1/numbers/{id}/api-keys/{keyId}` → `{ revoked, id }`; the default key is `409 PRIMARY_KEY_USE_REGENERATE` (use API Key → Regenerate). All three need an account credential (`403 NUMBER_SCOPE_NOT_ALLOWED` for a number key).
141
144
  - **Archive / Unarchive Chat:** `POST` / `DELETE /v1/numbers/{id}/chats/{jid}/archive`, no body. QR (Evolution GO) numbers only — an official number is `422 NOT_AVAILABLE_FOR_OFFICIAL_NUMBERS`. **Chat JID** (E.164 or full JID) is URL-encoded.
145
+ - **List Contacts / Get Contact / Get Contact Picture:** `GET /v1/numbers/{id}/contacts` (Search, Page, Page Size — same pagination as Conversation → Get Many; `{ contacts, total, page, pageSize, totalPages }`), `GET …/contacts/{phone}` and `GET …/contacts/{phone}/picture` (`{ url, id?, type? }`; 404 when there is none). QR numbers only: an official number answers `422 FEATURE_NOT_SUPPORTED`. Need `chat:read`.
142
146
  - **Block / Unblock Contact:** `POST` / `DELETE /v1/numbers/{id}/contacts/{phone}/block`, no body. QR and official numbers; any other rail is `422 FEATURE_NOT_SUPPORTED`. **Contact Phone** is URL-encoded. Archive and block need `contacts:manage`.
143
147
 
144
148
  ### 3. API Key
@@ -7,9 +7,9 @@ export declare const DEFAULT_BASE_URL = "https://pilotstatus.com.br";
7
7
  * `/v1` callers by User-Agent and recognises this node only when the header STARTS
8
8
  * with `pilot-status-n8n/<version>`; without it n8n would send its generic `n8n`.
9
9
  */
10
- export declare const USER_AGENT = "pilot-status-n8n/2.21.0";
10
+ export declare const USER_AGENT = "pilot-status-n8n/2.24.0";
11
11
  /** `x-pilot-status-client: n8n/<version>`, read by the API BEFORE the User-Agent. */
12
- export declare const CLIENT_HEADER = "n8n/2.21.0";
12
+ export declare const CLIENT_HEADER = "n8n/2.24.0";
13
13
  export declare class PilotStatusApi implements ICredentialType {
14
14
  name: string;
15
15
  displayName: string;
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "2.21.0";
1
+ export declare const PACKAGE_VERSION = "2.24.0";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PACKAGE_VERSION = void 0;
4
4
  // GENERATED by scripts/write-version.cjs from package.json — do not edit by hand.
5
- exports.PACKAGE_VERSION = "2.21.0";
5
+ exports.PACKAGE_VERSION = "2.24.0";
@@ -250,6 +250,11 @@ export declare function subscriptionBuyExtraNumbersPreSend(this: IExecuteSingleF
250
250
  * by last activity) only when set, plus `page` and `pageSize` (1–100).
251
251
  */
252
252
  export declare function conversationListPreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
253
+ /**
254
+ * Number → List Contacts (`GET /v1/numbers/{id}/contacts`): `page`/`pageSize` always (same
255
+ * pagination as Conversation → Get Many), `search` only when set.
256
+ */
257
+ export declare function numberContactsListPreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
253
258
  /**
254
259
  * Meta Pricing → Get (`GET /v1/meta/pricing`): `market`, `currency`, `category` only when set
255
260
  * (none = the catalogue of markets/currencies/categories; all three = a price; a partial set is
@@ -37,6 +37,7 @@ exports.workspaceMemberRemovePreSend = workspaceMemberRemovePreSend;
37
37
  exports.workspaceMemberResendPreSend = workspaceMemberResendPreSend;
38
38
  exports.subscriptionBuyExtraNumbersPreSend = subscriptionBuyExtraNumbersPreSend;
39
39
  exports.conversationListPreSend = conversationListPreSend;
40
+ exports.numberContactsListPreSend = numberContactsListPreSend;
40
41
  exports.metaPricingGetPreSend = metaPricingGetPreSend;
41
42
  exports.embedCreateSessionPreSend = embedCreateSessionPreSend;
42
43
  exports.knowledgeSearchPreSend = knowledgeSearchPreSend;
@@ -889,6 +890,22 @@ async function conversationListPreSend(requestOptions) {
889
890
  requestOptions.qs = { ...((_a = requestOptions.qs) !== null && _a !== void 0 ? _a : {}), ...qs };
890
891
  return requestOptions;
891
892
  }
893
+ /**
894
+ * Number → List Contacts (`GET /v1/numbers/{id}/contacts`): `page`/`pageSize` always (same
895
+ * pagination as Conversation → Get Many), `search` only when set.
896
+ */
897
+ async function numberContactsListPreSend(requestOptions) {
898
+ var _a;
899
+ const qs = {
900
+ page: Number(this.getNodeParameter('contactPage', 1)),
901
+ pageSize: Number(this.getNodeParameter('contactPageSize', 30)),
902
+ };
903
+ const search = textOrUndefined(this.getNodeParameter('contactSearch', ''));
904
+ if (search)
905
+ qs.search = search;
906
+ requestOptions.qs = { ...((_a = requestOptions.qs) !== null && _a !== void 0 ? _a : {}), ...qs };
907
+ return requestOptions;
908
+ }
892
909
  /**
893
910
  * Meta Pricing → Get (`GET /v1/meta/pricing`): `market`, `currency`, `category` only when set
894
911
  * (none = the catalogue of markets/currencies/categories; all three = a price; a partial set is
@@ -1353,7 +1370,7 @@ class PilotStatus {
1353
1370
  send: {
1354
1371
  preSend: [
1355
1372
  async function (requestOptions) {
1356
- var _a, _b, _c, _d, _e, _f, _g;
1373
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1357
1374
  const destinationType = this.getNodeParameter('sendDestinationType') || 'phone';
1358
1375
  if (!requestOptions.body || typeof requestOptions.body !== 'object') {
1359
1376
  requestOptions.body = {};
@@ -1416,6 +1433,50 @@ class PilotStatus {
1416
1433
  else
1417
1434
  delete body.text;
1418
1435
  }
1436
+ else if (messageType === 'location') {
1437
+ delete body.text;
1438
+ const lat = Number(this.getNodeParameter('locationLatitude', 0));
1439
+ const lng = Number(this.getNodeParameter('locationLongitude', 0));
1440
+ if (!Number.isFinite(lat) || lat < -90 || lat > 90 || !Number.isFinite(lng) || lng < -180 || lng > 180) {
1441
+ throw new Error('Pilot Status: Latitude must be between -90 and 90 and Longitude between -180 and 180.');
1442
+ }
1443
+ const location = { latitude: lat, longitude: lng };
1444
+ const name = String((_d = this.getNodeParameter('locationName', '')) !== null && _d !== void 0 ? _d : '').trim();
1445
+ const address = String((_e = this.getNodeParameter('locationAddress', '')) !== null && _e !== void 0 ? _e : '').trim();
1446
+ if (name)
1447
+ location.name = name;
1448
+ if (address)
1449
+ location.address = address;
1450
+ body.location = location;
1451
+ }
1452
+ else if (messageType === 'contact') {
1453
+ delete body.text;
1454
+ const format = this.getNodeParameter('contactsFormat', 'json') || 'json';
1455
+ if (format === 'vcard') {
1456
+ const vcard = String((_f = this.getNodeParameter('contactsVcard', '')) !== null && _f !== void 0 ? _f : '').trim();
1457
+ if (!vcard) {
1458
+ throw new Error('Pilot Status: fill in the "vCard" field to send a contact.');
1459
+ }
1460
+ body.contacts = [{ vcard }];
1461
+ }
1462
+ else {
1463
+ const raw = this.getNodeParameter('contactsJson', '[]');
1464
+ let parsed = raw;
1465
+ if (typeof raw === 'string') {
1466
+ try {
1467
+ parsed = JSON.parse(raw);
1468
+ }
1469
+ catch {
1470
+ throw new Error(`Pilot Status: "Contacts (JSON)" contains invalid JSON.\nValue received: ${raw}`);
1471
+ }
1472
+ }
1473
+ const contacts = Array.isArray(parsed) ? parsed : [parsed];
1474
+ if (contacts.length === 0 || contacts.some((c) => !c || typeof c !== 'object')) {
1475
+ throw new Error('Pilot Status: "Contacts (JSON)" must be a contact object or a non-empty array of them.');
1476
+ }
1477
+ body.contacts = contacts;
1478
+ }
1479
+ }
1419
1480
  }
1420
1481
  const mode = this.getNodeParameter('variablesMode');
1421
1482
  let variables = {};
@@ -1438,8 +1499,8 @@ class PilotStatus {
1438
1499
  }
1439
1500
  else {
1440
1501
  const ui = this.getNodeParameter('variablesUi');
1441
- for (const entry of (_d = ui === null || ui === void 0 ? void 0 : ui.values) !== null && _d !== void 0 ? _d : []) {
1442
- variables[entry.name] = String((_e = entry.value) !== null && _e !== void 0 ? _e : '');
1502
+ for (const entry of (_g = ui === null || ui === void 0 ? void 0 : ui.values) !== null && _g !== void 0 ? _g : []) {
1503
+ variables[entry.name] = String((_h = entry.value) !== null && _h !== void 0 ? _h : '');
1443
1504
  }
1444
1505
  }
1445
1506
  // reason: defensive re-guard — requestOptions.body is already an object here (set above by the first guard / destination handling), so this branch is unreachable.
@@ -1462,7 +1523,7 @@ class PilotStatus {
1462
1523
  ]) {
1463
1524
  // The fields live under Additional Fields; a top-level parameter of
1464
1525
  // the same name is still honoured for older callers.
1465
- const extras = ((_f = this.getNodeParameter('additionalFields', {})) !== null && _f !== void 0 ? _f : {});
1526
+ const extras = ((_j = this.getNodeParameter('additionalFields', {})) !== null && _j !== void 0 ? _j : {});
1466
1527
  const topLevel = this.getNodeParameter(param, '');
1467
1528
  const bruto = topLevel !== undefined && topLevel !== null && topLevel !== ''
1468
1529
  ? topLevel
@@ -1490,7 +1551,7 @@ class PilotStatus {
1490
1551
  : '';
1491
1552
  if (idempotencyKey) {
1492
1553
  requestOptions.headers = {
1493
- ...((_g = requestOptions.headers) !== null && _g !== void 0 ? _g : {}),
1554
+ ...((_k = requestOptions.headers) !== null && _k !== void 0 ? _k : {}),
1494
1555
  'Idempotency-Key': idempotencyKey,
1495
1556
  };
1496
1557
  }
@@ -1562,6 +1623,24 @@ class PilotStatus {
1562
1623
  action: 'Mark messages as read',
1563
1624
  routing: { request: { method: 'POST', url: '/messages/read' } },
1564
1625
  },
1626
+ {
1627
+ name: 'React',
1628
+ value: 'react',
1629
+ description: 'React to a message with one emoji (202, same shape as Send). The message ID may be the Pilot Status id, the correlationId or the WhatsApp id (wamid). Counts as a message. Official numbers: 422 REACTION_TARGET_INVALID (target not received from the user, older than 30 days, deleted or a reaction) and 422 SERVICE_WINDOW_CLOSED; 404 MESSAGE_NOT_FOUND. Needs messages:send and a number-scoped credential.',
1630
+ action: 'React to a message',
1631
+ routing: {
1632
+ request: { method: 'POST', url: '=/messages/{{encodeURIComponent($parameter.reactionMessageId)}}/reaction' },
1633
+ },
1634
+ },
1635
+ {
1636
+ name: 'Remove Reaction',
1637
+ value: 'removeReaction',
1638
+ description: 'Remove this number\'s reaction from a message (202, no body). Official (Meta Cloud API) numbers answer 422 NOT_SUPPORTED_ON_OFFICIAL_NUMBER. Needs messages:send and a number-scoped credential.',
1639
+ action: 'Remove a reaction',
1640
+ routing: {
1641
+ request: { method: 'DELETE', url: '=/messages/{{encodeURIComponent($parameter.reactionMessageId)}}/reaction' },
1642
+ },
1643
+ },
1565
1644
  {
1566
1645
  name: 'Send Typing Indicator',
1567
1646
  value: 'typing',
@@ -1667,6 +1746,8 @@ class PilotStatus {
1667
1746
  value: 'interactive',
1668
1747
  description: 'Text with buttons, list, carousel or Flow (set them under Additional Fields)',
1669
1748
  },
1749
+ { name: 'Location', value: 'location', description: 'A location pin (latitude, longitude, name, address)' },
1750
+ { name: 'Contact', value: 'contact', description: 'One or more contact cards (JSON or raw vCard)' },
1670
1751
  ],
1671
1752
  default: 'template',
1672
1753
  displayOptions: { show: { resource: ['message'], operation: ['send'] } },
@@ -1708,6 +1789,76 @@ class PilotStatus {
1708
1789
  description: 'Audio and Sticker take no caption. Sticker must be image/webp.',
1709
1790
  displayOptions: { show: { resource: ['message'], operation: ['send'], messageType: ['media'] } },
1710
1791
  },
1792
+ {
1793
+ displayName: 'Latitude',
1794
+ name: 'locationLatitude',
1795
+ type: 'number',
1796
+ typeOptions: { minValue: -90, maxValue: 90, numberPrecision: 7 },
1797
+ default: 0,
1798
+ required: true,
1799
+ description: 'Between -90 and 90',
1800
+ displayOptions: { show: { resource: ['message'], operation: ['send'], messageType: ['location'] } },
1801
+ },
1802
+ {
1803
+ displayName: 'Longitude',
1804
+ name: 'locationLongitude',
1805
+ type: 'number',
1806
+ typeOptions: { minValue: -180, maxValue: 180, numberPrecision: 7 },
1807
+ default: 0,
1808
+ required: true,
1809
+ description: 'Between -180 and 180',
1810
+ displayOptions: { show: { resource: ['message'], operation: ['send'], messageType: ['location'] } },
1811
+ },
1812
+ {
1813
+ displayName: 'Location Name',
1814
+ name: 'locationName',
1815
+ type: 'string',
1816
+ default: '',
1817
+ description: 'Optional place name (1–1000 characters)',
1818
+ displayOptions: { show: { resource: ['message'], operation: ['send'], messageType: ['location'] } },
1819
+ },
1820
+ {
1821
+ displayName: 'Location Address',
1822
+ name: 'locationAddress',
1823
+ type: 'string',
1824
+ default: '',
1825
+ description: 'Optional address (1–1000 characters)',
1826
+ displayOptions: { show: { resource: ['message'], operation: ['send'], messageType: ['location'] } },
1827
+ },
1828
+ {
1829
+ displayName: 'Contacts Format',
1830
+ name: 'contactsFormat',
1831
+ type: 'options',
1832
+ options: [
1833
+ { name: 'JSON', value: 'json' },
1834
+ { name: 'vCard', value: 'vcard' },
1835
+ ],
1836
+ default: 'json',
1837
+ displayOptions: { show: { resource: ['message'], operation: ['send'], messageType: ['contact'] } },
1838
+ },
1839
+ {
1840
+ displayName: 'Contacts (JSON)',
1841
+ name: 'contactsJson',
1842
+ type: 'json',
1843
+ default: '[{"name":{"formattedName":""},"phones":[{"phone":""}]}]',
1844
+ required: true,
1845
+ description: '1–257 contacts. Each: {"name":{"formattedName","first?","last?"},"phones":[{"phone","type?"}] (1–20),"emails?":[{"email","type?"}],"org?":{"company?","title?"}} or {"vcard":"BEGIN:VCARD..."}. A single object is also accepted.',
1846
+ displayOptions: {
1847
+ show: { resource: ['message'], operation: ['send'], messageType: ['contact'], contactsFormat: ['json'] },
1848
+ },
1849
+ },
1850
+ {
1851
+ displayName: 'vCard',
1852
+ name: 'contactsVcard',
1853
+ type: 'string',
1854
+ typeOptions: { rows: 6 },
1855
+ default: '',
1856
+ required: true,
1857
+ description: 'Raw vCard 3.0/4.0 text; may contain several BEGIN:VCARD blocks. The API converts it.',
1858
+ displayOptions: {
1859
+ show: { resource: ['message'], operation: ['send'], messageType: ['contact'], contactsFormat: ['vcard'] },
1860
+ },
1861
+ },
1711
1862
  {
1712
1863
  displayName: 'Caption',
1713
1864
  name: 'mediaCaption',
@@ -2122,6 +2273,26 @@ class PilotStatus {
2122
2273
  default: '',
2123
2274
  required: true,
2124
2275
  },
2276
+ // Message: React / Remove Reaction
2277
+ {
2278
+ displayName: 'Message ID',
2279
+ name: 'reactionMessageId',
2280
+ type: 'string',
2281
+ description: 'Target message: Pilot Status id, correlationId or WhatsApp id (wamid)',
2282
+ displayOptions: { show: { resource: ['message'], operation: ['react', 'removeReaction'] } },
2283
+ default: '',
2284
+ required: true,
2285
+ },
2286
+ {
2287
+ displayName: 'Emoji',
2288
+ name: 'reactionEmoji',
2289
+ type: 'string',
2290
+ description: 'Exactly one emoji, e.g. 👍',
2291
+ displayOptions: { show: { resource: ['message'], operation: ['react'] } },
2292
+ default: '',
2293
+ required: true,
2294
+ routing: { send: { type: 'body', property: 'emoji' } },
2295
+ },
2125
2296
  // Message: Get Unread Counts
2126
2297
  {
2127
2298
  displayName: 'WhatsApp Number IDs',
@@ -2491,6 +2662,40 @@ class PilotStatus {
2491
2662
  },
2492
2663
  },
2493
2664
  },
2665
+ {
2666
+ name: 'List Contacts',
2667
+ value: 'listContacts',
2668
+ description: "The number's address book: {contacts, total, page, pageSize, totalPages}; each contact {phone, lid, jid, name, firstName, fullName, pushName, businessName, found}. Search filters by name or phone. QR numbers only: an official number answers 422 FEATURE_NOT_SUPPORTED. Needs chat:read.",
2669
+ action: 'List contacts of a number',
2670
+ routing: {
2671
+ request: { method: 'GET', url: '=/numbers/{{$parameter.numberId}}/contacts' },
2672
+ send: { preSend: [numberContactsListPreSend] },
2673
+ },
2674
+ },
2675
+ {
2676
+ name: 'Get Contact',
2677
+ value: 'getContact',
2678
+ description: 'One contact of the address book: {phone, lid, jid, name, firstName, fullName, pushName, businessName, found}. 404 when not found. QR numbers only (official: 422 FEATURE_NOT_SUPPORTED). Needs chat:read.',
2679
+ action: 'Get a contact of a number',
2680
+ routing: {
2681
+ request: {
2682
+ method: 'GET',
2683
+ url: '=/numbers/{{$parameter.numberId}}/contacts/{{encodeURIComponent($parameter.contactPhone)}}',
2684
+ },
2685
+ },
2686
+ },
2687
+ {
2688
+ name: 'Get Contact Picture',
2689
+ value: 'getContactPicture',
2690
+ description: "A contact's profile picture: {phone, jid, url, pictureId, cachedForSeconds}. 404 when there is none. QR numbers only (official: 422 FEATURE_NOT_SUPPORTED). Needs chat:read.",
2691
+ action: 'Get the profile picture of a contact',
2692
+ routing: {
2693
+ request: {
2694
+ method: 'GET',
2695
+ url: '=/numbers/{{$parameter.numberId}}/contacts/{{encodeURIComponent($parameter.contactPhone)}}/picture',
2696
+ },
2697
+ },
2698
+ },
2494
2699
  {
2495
2700
  name: 'Block Contact',
2496
2701
  value: 'block',
@@ -2569,6 +2774,9 @@ class PilotStatus {
2569
2774
  'unarchive',
2570
2775
  'block',
2571
2776
  'unblock',
2777
+ 'listContacts',
2778
+ 'getContact',
2779
+ 'getContactPicture',
2572
2780
  ],
2573
2781
  },
2574
2782
  },
@@ -2646,11 +2854,39 @@ class PilotStatus {
2646
2854
  displayName: 'Contact Phone',
2647
2855
  name: 'contactPhone',
2648
2856
  type: 'string',
2649
- displayOptions: { show: { resource: ['number'], operation: ['block', 'unblock'] } },
2857
+ displayOptions: {
2858
+ show: { resource: ['number'], operation: ['block', 'unblock', 'getContact', 'getContactPicture'] },
2859
+ },
2650
2860
  default: '',
2651
2861
  required: true,
2652
2862
  description: 'Contact number in E.164 (+ optional); URL-encoded',
2653
2863
  },
2864
+ {
2865
+ displayName: 'Search',
2866
+ name: 'contactSearch',
2867
+ type: 'string',
2868
+ displayOptions: { show: { resource: ['number'], operation: ['listContacts'] } },
2869
+ default: '',
2870
+ description: 'Free-text filter on the contact name or phone. Blank = every contact.',
2871
+ },
2872
+ {
2873
+ displayName: 'Page',
2874
+ name: 'contactPage',
2875
+ type: 'number',
2876
+ typeOptions: { minValue: 1 },
2877
+ displayOptions: { show: { resource: ['number'], operation: ['listContacts'] } },
2878
+ default: 1,
2879
+ description: 'Page number, from 1',
2880
+ },
2881
+ {
2882
+ displayName: 'Page Size',
2883
+ name: 'contactPageSize',
2884
+ type: 'number',
2885
+ typeOptions: { minValue: 1, maxValue: 100 },
2886
+ displayOptions: { show: { resource: ['number'], operation: ['listContacts'] } },
2887
+ default: 30,
2888
+ description: 'Contacts per page (1–100)',
2889
+ },
2654
2890
  {
2655
2891
  displayName: 'Phone Number',
2656
2892
  name: 'checkNumber',
@@ -223,6 +223,21 @@ class PilotStatusTrigger {
223
223
  value: 'contact.unblocked',
224
224
  description: 'A contact was unblocked. QR Code numbers (on the phone or via the API) and Meta numbers (via the API only).',
225
225
  },
226
+ {
227
+ name: 'Message Reaction',
228
+ value: 'message.reaction',
229
+ description: 'A contact reacted to a message, or removed the reaction (data.emoji is null). QR Code and Meta numbers.',
230
+ },
231
+ {
232
+ name: 'Message Edited',
233
+ value: 'message.edited',
234
+ description: 'A contact edited a message (data.text is the new text). QR Code numbers; on Meta numbers only in coexistence (WhatsApp Business app).',
235
+ },
236
+ {
237
+ name: 'Message Deleted',
238
+ value: 'message.deleted',
239
+ description: 'A contact deleted a message for everyone (data.originalMessageId). QR Code numbers; on Meta numbers only in coexistence (WhatsApp Business app).',
240
+ },
226
241
  ],
227
242
  default: '*',
228
243
  description: 'The event to listen to',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-pilot-status",
3
- "version": "2.21.0",
3
+ "version": "2.24.0",
4
4
  "description": "n8n node for Pilot Status API",
5
5
  "keywords": [
6
6
  "n8ncommunity",