n8n-nodes-pilot-status 2.8.0 → 2.9.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 +14 -0
- package/README.md +1 -1
- package/dist/nodes/PilotStatus/PilotStatus.node.js +20 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `n8n-nodes-pilot-status`.
|
|
4
4
|
|
|
5
|
+
## 2.9.0 - 2026-10-25
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Message → Send → Additional Fields → Idempotency Key** (string, optional). Sent as the
|
|
10
|
+
`Idempotency-Key` header, never in the body; blank or left out, the request is unchanged.
|
|
11
|
+
Within 24 hours (per workspace + number + key) the same key with the same body returns the
|
|
12
|
+
stored response of the first accepted (2xx) call and sends nothing again
|
|
13
|
+
(`Idempotent-Replayed: true`); same key + different body → `409 IDEMPOTENCY_KEY_REUSED`;
|
|
14
|
+
first call still running → `409 IDEMPOTENCY_KEY_IN_USE`; invalid key (>255 chars or
|
|
15
|
+
control characters) → `400 IDEMPOTENCY_KEY_INVALID`. Only 2xx responses are remembered,
|
|
16
|
+
so after an error the same key can be retried with corrected input. Map it from your own
|
|
17
|
+
data (e.g. an order id) so that n8n's Retry On Fail reuses it.
|
|
18
|
+
|
|
5
19
|
## 2.8.0 - 2026-10-20
|
|
6
20
|
|
|
7
21
|
### Added
|
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ Webhook payload notes:
|
|
|
90
90
|
The **Pilot Status** node provides several resources and operations to manage your account and send messages.
|
|
91
91
|
|
|
92
92
|
### 1. Message
|
|
93
|
-
- **Send:** Send a template message (OTP, Utility, or Marketing). 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.
|
|
93
|
+
- **Send:** Send a template message (OTP, Utility, or Marketing). 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.
|
|
94
94
|
- **Get Status:** Retrieve the current status of a specific message using either its Pilot Status message id or WhatsApp provider id.
|
|
95
95
|
- **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.
|
|
96
96
|
- **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.
|
|
@@ -370,7 +370,7 @@ class PilotStatus {
|
|
|
370
370
|
send: {
|
|
371
371
|
preSend: [
|
|
372
372
|
async function (requestOptions) {
|
|
373
|
-
var _a, _b;
|
|
373
|
+
var _a, _b, _c;
|
|
374
374
|
const destinationType = this.getNodeParameter('sendDestinationType') || 'phone';
|
|
375
375
|
if (!requestOptions.body || typeof requestOptions.body !== 'object') {
|
|
376
376
|
requestOptions.body = {};
|
|
@@ -457,6 +457,18 @@ class PilotStatus {
|
|
|
457
457
|
requestOptions.body[campo] = valor;
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
+
// Optional Idempotency-Key: a HEADER, never a body field. Blank or
|
|
461
|
+
// absent leaves the request exactly as before (no deduplication).
|
|
462
|
+
const additional = this.getNodeParameter('additionalFields', {});
|
|
463
|
+
const idempotencyKey = typeof (additional === null || additional === void 0 ? void 0 : additional.idempotencyKey) === 'string'
|
|
464
|
+
? additional.idempotencyKey.trim()
|
|
465
|
+
: '';
|
|
466
|
+
if (idempotencyKey) {
|
|
467
|
+
requestOptions.headers = {
|
|
468
|
+
...((_c = requestOptions.headers) !== null && _c !== void 0 ? _c : {}),
|
|
469
|
+
'Idempotency-Key': idempotencyKey,
|
|
470
|
+
};
|
|
471
|
+
}
|
|
460
472
|
return requestOptions;
|
|
461
473
|
},
|
|
462
474
|
],
|
|
@@ -682,6 +694,13 @@ class PilotStatus {
|
|
|
682
694
|
default: '',
|
|
683
695
|
description: 'Optional expiration limit for the message delivery (ISO8601)',
|
|
684
696
|
},
|
|
697
|
+
{
|
|
698
|
+
displayName: 'Idempotency Key',
|
|
699
|
+
name: 'idempotencyKey',
|
|
700
|
+
type: 'string',
|
|
701
|
+
default: '',
|
|
702
|
+
description: 'Optional. Sent as the Idempotency-Key header (max 255 characters, no control characters), never in the body. REUSE THE SAME KEY when retrying the same message: within 24 hours (per workspace + number + key) the API returns the first accepted response instead of sending again (Idempotent-Replayed: true). Map it from your own data (e.g. an order id) — a key that changes on every run makes retries unsafe. Same key with a DIFFERENT body → 409 IDEMPOTENCY_KEY_REUSED; first call still running → 409 IDEMPOTENCY_KEY_IN_USE; invalid key → 400 IDEMPOTENCY_KEY_INVALID. Only successful (2xx) responses are remembered, so after an error you can fix the input and retry with the same key.',
|
|
703
|
+
},
|
|
685
704
|
{
|
|
686
705
|
displayName: 'Labels',
|
|
687
706
|
name: 'labels',
|