n8n-nodes-corbit-sms 1.0.2 → 1.1.1
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/README.md +18 -4
- package/dist/credentials/CorbitSmsApi.credentials.js +2 -1
- package/dist/credentials/CorbitSmsApi.credentials.js.map +1 -1
- package/dist/nodes/CorbitSms/CorbitSms.node.js +45 -20
- package/dist/nodes/CorbitSms/CorbitSms.node.js.map +1 -1
- package/dist/nodes/CorbitSms/CorbitSms.node.json +11 -2
- package/dist/nodes/CorbitSms/CorbitSmsDescription.js +13 -12
- package/dist/nodes/CorbitSms/CorbitSmsDescription.js.map +1 -1
- package/dist/nodes/CorbitSms/GenericFunctions.d.ts +3 -2
- package/dist/nodes/CorbitSms/GenericFunctions.js +66 -24
- package/dist/nodes/CorbitSms/GenericFunctions.js.map +1 -1
- package/dist/package.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ This is an n8n community node for [Corbit SMS](https://sms.corbit.sa), an SMS ga
|
|
|
8
8
|
- [Operations](#operations)
|
|
9
9
|
- [Credentials](#credentials)
|
|
10
10
|
- [Usage](#usage)
|
|
11
|
+
- [Example workflow](#example-workflow)
|
|
11
12
|
- [Compatibility](#compatibility)
|
|
12
13
|
- [Resources](#resources)
|
|
13
14
|
|
|
@@ -40,21 +41,34 @@ Keep **Base URL** as `https://api.corbit.sa` unless Corbit support gives you ano
|
|
|
40
41
|
|
|
41
42
|
## Usage
|
|
42
43
|
|
|
43
|
-
**Phone numbers.** Use the international format, for example `
|
|
44
|
+
**Phone numbers.** Use the international format, for example `966501234567`. Spaces, dashes, brackets, a leading `+` or `00` are removed, and Arabic digits are accepted. Saudi local numbers (`05XXXXXXXX`) are converted to `9665XXXXXXXX`. Anything that could turn into a wrong number is rejected and nothing is sent: local numbers of other countries (starting with `0`; write them in international format), decimals such as `9.66501E+11` from a spreadsheet, and extra text such as `ext 12`.
|
|
44
45
|
|
|
45
46
|
**Sender name.** Open the list to pick one of your approved sender names (it loads when you open it), or switch to **By Name** and type the name. You can also use an expression.
|
|
46
47
|
|
|
47
|
-
**Send Bulk.** Enter the numbers separated by commas or new lines, or pass
|
|
48
|
+
**Send Bulk.** Enter the numbers separated by commas or new lines, or pass a list with an expression. Duplicates are removed. If any number is invalid, the node stops before sending, because Corbit SMS rejects the whole request.
|
|
48
49
|
|
|
49
50
|
**Message length.** Up to 1600 characters.
|
|
50
51
|
|
|
51
52
|
**Duplicate protection.** Corbit SMS blocks the same text to the same number within one hour. To send it again on purpose (for example an OTP resend), turn on **Allow Duplicate** under **Options**.
|
|
52
53
|
|
|
53
|
-
**Safe retries.** Set an **Idempotency Key** under **Options
|
|
54
|
+
**Safe retries.** Set an **Idempotency Key** under **Options**, with a different value for each message (for example `{{ $execution.id }}-{{ $json.orderId }}`). If the request is retried with the same key, Corbit SMS returns the first result and does not send again. Don't use one fixed key for many items.
|
|
54
55
|
|
|
55
56
|
**Rate limit.** 1000 requests per minute per token. If you hit it, turn on **Retry On Fail** in the node settings.
|
|
56
57
|
|
|
57
|
-
**Output.** Send returns `messageId`, `status`, `to` and `senderName`. Use `messageId` with Get Status or Get Delivery Report.
|
|
58
|
+
**Output.** Send returns `messageId`, `status`, `to` and `senderName`; Send Bulk also returns `numbers` and `recipients`. Use `messageId` with Get Status or Get Delivery Report. Get Delivery Report returns one item per recipient.
|
|
59
|
+
|
|
60
|
+
**AI agents.** The node can be used as a tool by the n8n AI Agent. Set **Sender Name** to a fixed value when you use it as a tool, so the agent doesn't have to guess it.
|
|
61
|
+
|
|
62
|
+
## Example workflow
|
|
63
|
+
|
|
64
|
+
[`examples/send-otp-and-check-delivery.json`](examples/send-otp-and-check-delivery.json) sends a one-time code and checks that it was delivered. Import it in n8n with **Workflow menu → Import from File**.
|
|
65
|
+
|
|
66
|
+
1. **Webhook** (POST `/send-otp`) receives `{ "phone": "966501234567", "code": "4821" }`.
|
|
67
|
+
2. **Corbit SMS → Send** sends `Your verification code is 4821` to the phone. **Allow Duplicate** is on, so a resend of the same code is not blocked, and the execution ID is the idempotency key, so a retry of the same execution never sends twice.
|
|
68
|
+
3. **Wait** 30 seconds.
|
|
69
|
+
4. **Corbit SMS → Get Status** reads the delivery status of the message.
|
|
70
|
+
|
|
71
|
+
Before you run it, choose your Corbit SMS credential in both Corbit SMS nodes and replace `YourSender` with one of your approved sender names.
|
|
58
72
|
|
|
59
73
|
## Compatibility
|
|
60
74
|
|
|
@@ -22,6 +22,7 @@ class CorbitSmsApi {
|
|
|
22
22
|
name: 'baseUrl',
|
|
23
23
|
type: 'string',
|
|
24
24
|
default: 'https://api.corbit.sa',
|
|
25
|
+
placeholder: 'https://api.corbit.sa',
|
|
25
26
|
description: 'Leave as it is unless Corbit support gives you another address',
|
|
26
27
|
},
|
|
27
28
|
];
|
|
@@ -35,7 +36,7 @@ class CorbitSmsApi {
|
|
|
35
36
|
};
|
|
36
37
|
this.test = {
|
|
37
38
|
request: {
|
|
38
|
-
baseURL: '={{$credentials.baseUrl.replace(/\\/+$/, "")}}',
|
|
39
|
+
baseURL: '={{($credentials.baseUrl || "https://api.corbit.sa").replace(/\\/+$/, "")}}',
|
|
39
40
|
url: '/api/v1/get-balance',
|
|
40
41
|
method: 'POST',
|
|
41
42
|
headers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorbitSmsApi.credentials.js","sourceRoot":"","sources":["../../credentials/CorbitSmsApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QAEtB,gBAAW,GAAG,gBAAgB,CAAC;QAE/B,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,qBAAgB,GAAG,2BAA2B,CAAC;QAE/C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,6DAA6D;aAC9D;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EAAE,gEAAgE;aAC7E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,mCAAmC;iBAClD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CorbitSmsApi.credentials.js","sourceRoot":"","sources":["../../credentials/CorbitSmsApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QAEtB,gBAAW,GAAG,gBAAgB,CAAC;QAE/B,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,qBAAgB,GAAG,2BAA2B,CAAC;QAE/C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,6DAA6D;aAC9D;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EAAE,uBAAuB;gBACpC,WAAW,EAAE,gEAAgE;aAC7E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,mCAAmC;iBAClD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,6EAA6E;gBACtF,GAAG,EAAE,qBAAqB;gBAC1B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;iBAC1B;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAjDD,oCAiDC"}
|
|
@@ -52,7 +52,7 @@ class CorbitSms {
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
async execute() {
|
|
55
|
-
var _a, _b, _c, _d, _e, _f;
|
|
55
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
56
56
|
const items = this.getInputData();
|
|
57
57
|
const returnData = [];
|
|
58
58
|
const node = this.getNode();
|
|
@@ -62,22 +62,31 @@ class CorbitSms {
|
|
|
62
62
|
const operation = this.getNodeParameter('operation', i);
|
|
63
63
|
if (resource === 'sms' && (operation === 'send' || operation === 'sendBulk')) {
|
|
64
64
|
const senderName = senderValue(this.getNodeParameter('senderName', i));
|
|
65
|
-
const message = this.getNodeParameter('message', i);
|
|
66
65
|
const options = this.getNodeParameter('options', i, {});
|
|
67
66
|
if (senderName === '') {
|
|
68
|
-
throw new n8n_workflow_1.NodeOperationError(node,
|
|
67
|
+
throw new n8n_workflow_1.NodeOperationError(node, "Choose a value for 'Sender Name'", {
|
|
68
|
+
itemIndex: i,
|
|
69
|
+
});
|
|
69
70
|
}
|
|
70
|
-
(0, GenericFunctions_1.checkMessage)(node, message, i);
|
|
71
|
+
const message = (0, GenericFunctions_1.checkMessage)(node, this.getNodeParameter('message', i), i);
|
|
71
72
|
const headers = { 'Content-Type': 'application/json' };
|
|
72
|
-
if (options.idempotencyKey)
|
|
73
|
-
|
|
73
|
+
if (options.idempotencyKey !== undefined && String(options.idempotencyKey) !== '') {
|
|
74
|
+
const key = String(options.idempotencyKey);
|
|
75
|
+
if (key.length > GenericFunctions_1.MAX_IDEMPOTENCY_KEY_LENGTH) {
|
|
76
|
+
throw new n8n_workflow_1.NodeOperationError(node, `'Idempotency Key' is ${key.length} characters; the limit is ${GenericFunctions_1.MAX_IDEMPOTENCY_KEY_LENGTH}`, { itemIndex: i });
|
|
77
|
+
}
|
|
78
|
+
headers['Idempotency-Key'] = key;
|
|
79
|
+
}
|
|
74
80
|
if (options.allowDuplicate === true)
|
|
75
81
|
headers['X-Allow-Duplicate'] = 'true';
|
|
76
82
|
if (operation === 'send') {
|
|
77
83
|
const raw = this.getNodeParameter('to', i);
|
|
78
84
|
const number = (0, GenericFunctions_1.normalizeNumber)(raw);
|
|
79
85
|
if (!number) {
|
|
80
|
-
throw new n8n_workflow_1.NodeOperationError(node, `
|
|
86
|
+
throw new n8n_workflow_1.NodeOperationError(node, `'To' is not a valid mobile number: "${String(raw !== null && raw !== void 0 ? raw : '')}"`, {
|
|
87
|
+
itemIndex: i,
|
|
88
|
+
description: 'Use the international format, e.g. 966501234567. Saudi local numbers (05XXXXXXXX) are converted automatically.',
|
|
89
|
+
});
|
|
81
90
|
}
|
|
82
91
|
const response = await GenericFunctions_1.corbitApiRequest.call(this, 'POST', '/api/v1/send', { senderName, number, messageBody: message, sendAtOption: 'NOW' }, { headers, itemIndex: i });
|
|
83
92
|
const sent = ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : {});
|
|
@@ -90,15 +99,16 @@ class CorbitSms {
|
|
|
90
99
|
const raw = (0, GenericFunctions_1.splitNumbers)(this.getNodeParameter('numbers', i));
|
|
91
100
|
const invalid = raw.filter((n) => !(0, GenericFunctions_1.normalizeNumber)(n));
|
|
92
101
|
if (invalid.length > 0) {
|
|
93
|
-
throw new n8n_workflow_1.NodeOperationError(node, `
|
|
102
|
+
throw new n8n_workflow_1.NodeOperationError(node, `'Numbers' contains invalid mobile numbers: ${invalid.slice(0, 5).join(', ')}${invalid.length > 5 ? ` and ${invalid.length - 5} more` : ''}`, {
|
|
94
103
|
itemIndex: i,
|
|
95
|
-
description: 'Corbit SMS rejects the whole request if any number is invalid, so nothing was sent.',
|
|
104
|
+
description: 'Use the international format, e.g. 966501234567. Corbit SMS rejects the whole request if any number is invalid, so nothing was sent.',
|
|
96
105
|
});
|
|
97
106
|
}
|
|
98
107
|
const numbers = [...new Set(raw.map((n) => (0, GenericFunctions_1.normalizeNumber)(n)))];
|
|
99
108
|
if (numbers.length === 0) {
|
|
100
|
-
throw new n8n_workflow_1.NodeOperationError(node, '
|
|
109
|
+
throw new n8n_workflow_1.NodeOperationError(node, "'Numbers' is empty", {
|
|
101
110
|
itemIndex: i,
|
|
111
|
+
description: 'Add at least one mobile number.',
|
|
102
112
|
});
|
|
103
113
|
}
|
|
104
114
|
const response = await GenericFunctions_1.corbitApiRequest.call(this, 'POST', '/api/v1/send-bulk', { senderName, numbers, messageBody: message, sendAtOption: 'Now' }, { headers, itemIndex: i });
|
|
@@ -116,42 +126,53 @@ class CorbitSms {
|
|
|
116
126
|
}
|
|
117
127
|
}
|
|
118
128
|
else if (resource === 'sms' && (operation === 'getStatus' || operation === 'getReport')) {
|
|
119
|
-
const messageId = String(this.getNodeParameter('messageId', i)).trim();
|
|
129
|
+
const messageId = String((_e = this.getNodeParameter('messageId', i)) !== null && _e !== void 0 ? _e : '').trim();
|
|
120
130
|
if (messageId === '') {
|
|
121
|
-
throw new n8n_workflow_1.NodeOperationError(node, '
|
|
131
|
+
throw new n8n_workflow_1.NodeOperationError(node, "'Message ID' is empty", {
|
|
132
|
+
itemIndex: i,
|
|
133
|
+
description: 'Use the message ID returned by the Send or Send Bulk operation.',
|
|
134
|
+
});
|
|
122
135
|
}
|
|
123
136
|
const path = operation === 'getStatus' ? '/api/v1/message-status/' : '/api/v1/message-report/';
|
|
124
137
|
const response = await GenericFunctions_1.corbitApiRequest.call(this, 'POST', path + encodeURIComponent(messageId), undefined, { itemIndex: i });
|
|
125
138
|
if (operation === 'getStatus') {
|
|
126
|
-
const data = ((
|
|
139
|
+
const data = ((_f = response.data) !== null && _f !== void 0 ? _f : {});
|
|
127
140
|
returnData.push({
|
|
128
141
|
json: { messageId, status: data.status },
|
|
129
142
|
pairedItem: { item: i },
|
|
130
143
|
});
|
|
131
144
|
}
|
|
132
145
|
else {
|
|
133
|
-
|
|
146
|
+
const msgs = Array.isArray(response.msgs) ? response.msgs : [];
|
|
147
|
+
const jobId = response.jobId;
|
|
148
|
+
if (msgs.length === 0) {
|
|
149
|
+
returnData.push({ json: { ...response, messageId, jobId }, pairedItem: { item: i } });
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
for (const m of msgs) {
|
|
153
|
+
returnData.push({ json: { ...m, messageId, jobId }, pairedItem: { item: i } });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
134
156
|
}
|
|
135
157
|
}
|
|
136
158
|
else if (resource === 'account' && operation === 'getBalance') {
|
|
137
159
|
const response = await GenericFunctions_1.corbitApiRequest.call(this, 'POST', '/api/v1/get-balance', undefined, {
|
|
138
160
|
itemIndex: i,
|
|
139
161
|
});
|
|
140
|
-
const data = ((
|
|
162
|
+
const data = ((_g = response.data) !== null && _g !== void 0 ? _g : {});
|
|
141
163
|
returnData.push({ json: { balance: data.balance }, pairedItem: { item: i } });
|
|
142
164
|
}
|
|
143
165
|
else if (resource === 'senderName' && operation === 'getAll') {
|
|
144
166
|
const returnAll = this.getNodeParameter('returnAll', i);
|
|
145
167
|
const filters = this.getNodeParameter('filters', i, {});
|
|
146
|
-
|
|
168
|
+
const limit = returnAll ? undefined : this.getNodeParameter('limit', i);
|
|
169
|
+
let senders = await GenericFunctions_1.getAllSenderNames.call(this, filters.status ? undefined : limit);
|
|
147
170
|
if (filters.status) {
|
|
148
171
|
const wanted = String(filters.status).toLowerCase();
|
|
149
172
|
senders = senders.filter((s) => String(s.status).toLowerCase() === wanted);
|
|
150
173
|
}
|
|
151
|
-
if (
|
|
152
|
-
const limit = this.getNodeParameter('limit', i);
|
|
174
|
+
if (limit !== undefined)
|
|
153
175
|
senders = senders.slice(0, limit);
|
|
154
|
-
}
|
|
155
176
|
returnData.push(...senders.map((s) => ({ json: s, pairedItem: { item: i } })));
|
|
156
177
|
}
|
|
157
178
|
else {
|
|
@@ -160,8 +181,12 @@ class CorbitSms {
|
|
|
160
181
|
}
|
|
161
182
|
catch (error) {
|
|
162
183
|
if (this.continueOnFail()) {
|
|
184
|
+
const description = error.description;
|
|
163
185
|
returnData.push({
|
|
164
|
-
json: {
|
|
186
|
+
json: {
|
|
187
|
+
error: error.message,
|
|
188
|
+
...(typeof description === 'string' && description ? { description } : {}),
|
|
189
|
+
},
|
|
165
190
|
pairedItem: { item: i },
|
|
166
191
|
});
|
|
167
192
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorbitSms.node.js","sourceRoot":"","sources":["../../../nodes/CorbitSms/CorbitSms.node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"CorbitSms.node.js","sourceRoot":"","sources":["../../../nodes/CorbitSms/CorbitSms.node.ts"],"names":[],"mappings":";;;AAyBA,kCAKC;AAjBD,+CAAqF;AACrF,yDAO4B;AAC5B,iEAAwD;AAGxD,SAAgB,WAAW,CAAC,GAAY;;IACvC,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,GAAG,EAAE,CAAC;QACtD,OAAO,MAAM,CAAC,MAAC,GAAmB,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACxD,CAAC;IACD,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACpE,CAAC;AAED,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,WAA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,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;gBAChF,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YACtE,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AArOD,8BAqOC"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"node": "n8n-nodes-corbit-sms.corbitSms",
|
|
3
3
|
"nodeVersion": "1.0",
|
|
4
4
|
"codexVersion": "1.0",
|
|
5
|
-
"categories": [
|
|
5
|
+
"categories": [
|
|
6
|
+
"Communication"
|
|
7
|
+
],
|
|
6
8
|
"resources": {
|
|
7
9
|
"credentialDocumentation": [
|
|
8
10
|
{
|
|
@@ -14,5 +16,12 @@
|
|
|
14
16
|
"url": "https://github.com/agamalsa/n8n-nodes-corbit-sms#readme"
|
|
15
17
|
}
|
|
16
18
|
]
|
|
17
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"alias": [
|
|
21
|
+
"SMS",
|
|
22
|
+
"text message",
|
|
23
|
+
"OTP",
|
|
24
|
+
"Saudi Arabia",
|
|
25
|
+
"Corbit"
|
|
26
|
+
]
|
|
18
27
|
}
|
|
@@ -25,25 +25,25 @@ exports.nodeProperties = [
|
|
|
25
25
|
{
|
|
26
26
|
name: 'Get Delivery Report',
|
|
27
27
|
value: 'getReport',
|
|
28
|
-
action: 'Get
|
|
29
|
-
description: 'Get the delivery result for each recipient of a message',
|
|
28
|
+
action: 'Get delivery report of message',
|
|
29
|
+
description: 'Get the delivery result for each recipient of a message, one item per recipient',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
name: 'Get Status',
|
|
33
33
|
value: 'getStatus',
|
|
34
|
-
action: 'Get
|
|
34
|
+
action: 'Get status of message',
|
|
35
35
|
description: 'Get the current status of a sent message',
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
name: 'Send',
|
|
39
39
|
value: 'send',
|
|
40
|
-
action: 'Send
|
|
40
|
+
action: 'Send SMS',
|
|
41
41
|
description: 'Send an SMS to one mobile number',
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
name: 'Send Bulk',
|
|
45
45
|
value: 'sendBulk',
|
|
46
|
-
action: 'Send
|
|
46
|
+
action: 'Send SMS to many numbers',
|
|
47
47
|
description: 'Send the same SMS to many mobile numbers in one request',
|
|
48
48
|
},
|
|
49
49
|
],
|
|
@@ -59,7 +59,7 @@ exports.nodeProperties = [
|
|
|
59
59
|
{
|
|
60
60
|
name: 'Get Balance',
|
|
61
61
|
value: 'getBalance',
|
|
62
|
-
action: 'Get
|
|
62
|
+
action: 'Get account balance',
|
|
63
63
|
description: 'Get the remaining SMS balance of the account',
|
|
64
64
|
},
|
|
65
65
|
],
|
|
@@ -88,7 +88,7 @@ exports.nodeProperties = [
|
|
|
88
88
|
required: true,
|
|
89
89
|
default: { mode: 'list', value: '' },
|
|
90
90
|
displayOptions: { show: { resource: ['sms'], operation: sendOps } },
|
|
91
|
-
description: '
|
|
91
|
+
description: 'Sender name the message is sent from. It must exactly match a sender name that is approved on your Corbit SMS account.',
|
|
92
92
|
modes: [
|
|
93
93
|
{
|
|
94
94
|
displayName: 'From List',
|
|
@@ -110,9 +110,9 @@ exports.nodeProperties = [
|
|
|
110
110
|
type: 'string',
|
|
111
111
|
required: true,
|
|
112
112
|
default: '',
|
|
113
|
-
placeholder: '
|
|
113
|
+
placeholder: 'e.g. 966501234567',
|
|
114
114
|
displayOptions: { show: { resource: ['sms'], operation: ['send'] } },
|
|
115
|
-
description: 'Mobile number in international format. Saudi local numbers
|
|
115
|
+
description: 'Mobile number in international format, e.g. 966501234567. Saudi local numbers (05XXXXXXXX) are converted automatically; numbers from other countries must use the international format.',
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
displayName: 'Numbers',
|
|
@@ -121,9 +121,9 @@ exports.nodeProperties = [
|
|
|
121
121
|
typeOptions: { rows: 4 },
|
|
122
122
|
required: true,
|
|
123
123
|
default: '',
|
|
124
|
-
placeholder: '
|
|
124
|
+
placeholder: 'e.g. 966501234567, 966551234567',
|
|
125
125
|
displayOptions: { show: { resource: ['sms'], operation: ['sendBulk'] } },
|
|
126
|
-
description: '
|
|
126
|
+
description: 'Comma-separated mobile numbers in international format (new lines also work). If any number is invalid, nothing is sent.',
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
displayName: 'Message',
|
|
@@ -134,6 +134,7 @@ exports.nodeProperties = [
|
|
|
134
134
|
default: '',
|
|
135
135
|
displayOptions: { show: { resource: ['sms'], operation: sendOps } },
|
|
136
136
|
description: 'Text of the SMS, up to 1600 characters',
|
|
137
|
+
placeholder: 'e.g. Your verification code is 4821',
|
|
137
138
|
},
|
|
138
139
|
{
|
|
139
140
|
displayName: 'Options',
|
|
@@ -155,7 +156,7 @@ exports.nodeProperties = [
|
|
|
155
156
|
name: 'idempotencyKey',
|
|
156
157
|
type: 'string',
|
|
157
158
|
default: '',
|
|
158
|
-
description: 'A unique value (up to 255 characters). If the request is retried with the same key, the first result is returned and nothing is sent again.',
|
|
159
|
+
description: 'A unique value per message (up to 255 characters), for example an expression that combines the execution ID with the ID of the item. If the same request is retried with the same key, the first result is returned and nothing is sent again. Do not use one fixed key for many items.',
|
|
159
160
|
},
|
|
160
161
|
],
|
|
161
162
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorbitSmsDescription.js","sourceRoot":"","sources":["../../../nodes/CorbitSms/CorbitSmsDescription.ts"],"names":[],"mappings":";;;AAEA,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAExB,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,SAAS,EAAE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 @@
|
|
|
1
1
|
import type { IDataObject, IExecuteFunctions, IHttpRequestMethods, ILoadOptionsFunctions, INode } from 'n8n-workflow';
|
|
2
2
|
export declare const MAX_MESSAGE_LENGTH = 1600;
|
|
3
|
+
export declare const MAX_IDEMPOTENCY_KEY_LENGTH = 255;
|
|
3
4
|
type Context = IExecuteFunctions | ILoadOptionsFunctions;
|
|
4
5
|
export interface CorbitRequestExtras {
|
|
5
6
|
qs?: IDataObject;
|
|
@@ -8,7 +9,7 @@ export interface CorbitRequestExtras {
|
|
|
8
9
|
}
|
|
9
10
|
export declare function normalizeNumber(raw: unknown): string | undefined;
|
|
10
11
|
export declare function splitNumbers(value: unknown): string[];
|
|
11
|
-
export declare function checkMessage(node: INode,
|
|
12
|
+
export declare function checkMessage(node: INode, raw: unknown, itemIndex: number): string;
|
|
12
13
|
export declare function corbitApiRequest(this: Context, method: IHttpRequestMethods, path: string, body?: IDataObject, extras?: CorbitRequestExtras): Promise<IDataObject>;
|
|
13
|
-
export declare function getAllSenderNames(this: Context): Promise<IDataObject[]>;
|
|
14
|
+
export declare function getAllSenderNames(this: Context, maxItems?: number): Promise<IDataObject[]>;
|
|
14
15
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_MESSAGE_LENGTH = void 0;
|
|
3
|
+
exports.MAX_IDEMPOTENCY_KEY_LENGTH = exports.MAX_MESSAGE_LENGTH = void 0;
|
|
4
4
|
exports.normalizeNumber = normalizeNumber;
|
|
5
5
|
exports.splitNumbers = splitNumbers;
|
|
6
6
|
exports.checkMessage = checkMessage;
|
|
@@ -8,17 +8,43 @@ exports.corbitApiRequest = corbitApiRequest;
|
|
|
8
8
|
exports.getAllSenderNames = getAllSenderNames;
|
|
9
9
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
10
10
|
exports.MAX_MESSAGE_LENGTH = 1600;
|
|
11
|
+
exports.MAX_IDEMPOTENCY_KEY_LENGTH = 255;
|
|
11
12
|
function normalizeNumber(raw) {
|
|
12
|
-
|
|
13
|
+
let text;
|
|
14
|
+
if (typeof raw === 'number') {
|
|
15
|
+
if (!Number.isSafeInteger(raw) || raw <= 0)
|
|
16
|
+
return undefined;
|
|
17
|
+
text = String(raw);
|
|
18
|
+
}
|
|
19
|
+
else if (typeof raw === 'string') {
|
|
20
|
+
text = raw
|
|
21
|
+
.trim()
|
|
22
|
+
.replace(/[٠-٩]/g, (d) => String(d.charCodeAt(0) - 0x0660))
|
|
23
|
+
.replace(/[۰-۹]/g, (d) => String(d.charCodeAt(0) - 0x06f0));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
13
26
|
return undefined;
|
|
14
|
-
|
|
15
|
-
if (
|
|
27
|
+
}
|
|
28
|
+
if (!/^\+?[\d\s\-()]+$/.test(text))
|
|
29
|
+
return undefined;
|
|
30
|
+
let digits = text.replace(/\D/g, '');
|
|
31
|
+
if (text.startsWith('+')) {
|
|
32
|
+
}
|
|
33
|
+
else if (digits.startsWith('00')) {
|
|
16
34
|
digits = digits.slice(2);
|
|
17
|
-
|
|
35
|
+
}
|
|
36
|
+
else if (/^05\d{8}$/.test(digits)) {
|
|
18
37
|
digits = '966' + digits.slice(1);
|
|
19
|
-
|
|
38
|
+
}
|
|
39
|
+
else if (/^5\d{8}$/.test(digits)) {
|
|
20
40
|
digits = '966' + digits;
|
|
21
|
-
|
|
41
|
+
}
|
|
42
|
+
else if (digits.startsWith('0')) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (/^9660\d{9}$/.test(digits))
|
|
46
|
+
digits = '966' + digits.slice(4);
|
|
47
|
+
return /^[1-9]\d{7,14}$/.test(digits) ? digits : undefined;
|
|
22
48
|
}
|
|
23
49
|
function splitNumbers(value) {
|
|
24
50
|
if (Array.isArray(value))
|
|
@@ -30,33 +56,42 @@ function splitNumbers(value) {
|
|
|
30
56
|
.map((v) => v.trim())
|
|
31
57
|
.filter((v) => v !== '');
|
|
32
58
|
}
|
|
33
|
-
function checkMessage(node,
|
|
59
|
+
function checkMessage(node, raw, itemIndex) {
|
|
60
|
+
const message = raw === null || raw === undefined ? '' : String(raw);
|
|
34
61
|
if (message.trim() === '') {
|
|
35
|
-
throw new n8n_workflow_1.NodeOperationError(node, '
|
|
62
|
+
throw new n8n_workflow_1.NodeOperationError(node, "'Message' is empty", {
|
|
63
|
+
itemIndex,
|
|
64
|
+
description: 'Enter the text of the SMS.',
|
|
65
|
+
});
|
|
36
66
|
}
|
|
37
67
|
if (message.length > exports.MAX_MESSAGE_LENGTH) {
|
|
38
|
-
throw new n8n_workflow_1.NodeOperationError(node, `
|
|
68
|
+
throw new n8n_workflow_1.NodeOperationError(node, `'Message' is ${message.length} characters; the limit is ${exports.MAX_MESSAGE_LENGTH}`, { itemIndex });
|
|
39
69
|
}
|
|
70
|
+
return message;
|
|
40
71
|
}
|
|
72
|
+
const CODE_HINTS = {
|
|
73
|
+
INSUFFICIENT_BALANCE: 'Your Corbit SMS balance is not enough. Top up at sms.corbit.sa and run the node again.',
|
|
74
|
+
SENDER_NOT_ALLOWED: "This sender name is not approved on your account. Pick one from the 'Sender Name' list.",
|
|
75
|
+
DUPLICATE: "The same text was sent to the same number within the last hour. Turn on 'Allow Duplicate' to send it again on purpose.",
|
|
76
|
+
IDEMPOTENCY_IN_PROGRESS: 'A request with the same idempotency key is still being processed. Wait a moment and try again.',
|
|
77
|
+
IDEMPOTENCY_KEY_REUSED: "This idempotency key was already used for a different message. Use a different 'Idempotency Key' for each message, for example with an expression.",
|
|
78
|
+
};
|
|
41
79
|
function errorFromBody(node, statusCode, body, headers, itemIndex) {
|
|
80
|
+
var _a;
|
|
42
81
|
const apiMessage = typeof body.message === 'string' && body.message ? body.message : '';
|
|
43
82
|
const code = typeof body.code === 'string' ? body.code : '';
|
|
44
|
-
let description = code ? `
|
|
83
|
+
let description = code ? (_a = CODE_HINTS[code]) !== null && _a !== void 0 ? _a : `Corbit SMS code: ${code}` : undefined;
|
|
45
84
|
if (statusCode === 401) {
|
|
46
|
-
description =
|
|
85
|
+
description = "The API token was rejected. Check 'API Token' in the Corbit SMS credential.";
|
|
47
86
|
}
|
|
48
|
-
else if (statusCode === 429) {
|
|
87
|
+
else if (statusCode === 429 || code === 'RATE_LIMIT') {
|
|
49
88
|
const retryAfter = headers['retry-after'];
|
|
50
|
-
description = `Too many requests. ${retryAfter ? `Try again in ${String(retryAfter)} seconds. ` : ''}You can turn on
|
|
51
|
-
}
|
|
52
|
-
else if (code === 'DUPLICATE') {
|
|
53
|
-
description =
|
|
54
|
-
'The same text was sent to the same number within the last hour. Turn on "Allow Duplicate" to send it again on purpose.';
|
|
89
|
+
description = `Too many requests. ${retryAfter ? `Try again in ${String(retryAfter)} seconds. ` : ''}You can turn on 'Retry On Fail' in the node settings.`;
|
|
55
90
|
}
|
|
56
91
|
return new n8n_workflow_1.NodeApiError(node, body, {
|
|
57
92
|
message: apiMessage || `Corbit SMS returned HTTP ${statusCode}`,
|
|
58
93
|
description,
|
|
59
|
-
httpCode: String(statusCode),
|
|
94
|
+
...(statusCode >= 400 ? { httpCode: String(statusCode) } : {}),
|
|
60
95
|
itemIndex,
|
|
61
96
|
});
|
|
62
97
|
}
|
|
@@ -95,28 +130,35 @@ async function corbitApiRequest(method, path, body, extras = {}) {
|
|
|
95
130
|
}
|
|
96
131
|
const parsed = data && typeof data === 'object' && !Array.isArray(data) ? data : {};
|
|
97
132
|
if (statusCode >= 400 || parsed.status === 'Error') {
|
|
98
|
-
throw errorFromBody(this.getNode(), statusCode
|
|
133
|
+
throw errorFromBody(this.getNode(), statusCode, parsed, (_b = response.headers) !== null && _b !== void 0 ? _b : {}, extras.itemIndex);
|
|
99
134
|
}
|
|
100
135
|
if (Array.isArray(data))
|
|
101
136
|
return { data };
|
|
102
137
|
return parsed;
|
|
103
138
|
}
|
|
104
|
-
async function getAllSenderNames() {
|
|
139
|
+
async function getAllSenderNames(maxItems) {
|
|
105
140
|
var _a;
|
|
106
141
|
const perPage = 50;
|
|
107
142
|
const all = [];
|
|
143
|
+
let previousFirst;
|
|
108
144
|
for (let page = 1; page <= 100; page++) {
|
|
109
145
|
const response = await corbitApiRequest.call(this, 'GET', '/api/v1/sendernames', undefined, {
|
|
110
146
|
qs: { per_page: perPage, page },
|
|
111
147
|
});
|
|
112
148
|
const items = Array.isArray(response.data) ? response.data : [];
|
|
149
|
+
if (items.length === 0)
|
|
150
|
+
break;
|
|
151
|
+
const first = JSON.stringify(items[0]);
|
|
152
|
+
if (page > 1 && first === previousFirst)
|
|
153
|
+
break;
|
|
154
|
+
previousFirst = first;
|
|
113
155
|
all.push(...items);
|
|
156
|
+
if (maxItems !== undefined && all.length >= maxItems)
|
|
157
|
+
break;
|
|
114
158
|
const pagination = ((_a = response.pagination) !== null && _a !== void 0 ? _a : {});
|
|
115
159
|
const total = Number(pagination.total);
|
|
116
160
|
const currentPage = Number(pagination.current_page);
|
|
117
161
|
const pageSize = Number(pagination.per_page) || perPage;
|
|
118
|
-
if (items.length === 0)
|
|
119
|
-
break;
|
|
120
162
|
if (Number.isFinite(total) && all.length >= total)
|
|
121
163
|
break;
|
|
122
164
|
if (!Number.isFinite(total) && items.length < pageSize)
|
|
@@ -124,6 +166,6 @@ async function getAllSenderNames() {
|
|
|
124
166
|
if (Number.isFinite(currentPage) && currentPage !== page)
|
|
125
167
|
break;
|
|
126
168
|
}
|
|
127
|
-
return all;
|
|
169
|
+
return maxItems === undefined ? all : all.slice(0, maxItems);
|
|
128
170
|
}
|
|
129
171
|
//# sourceMappingURL=GenericFunctions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/CorbitSms/GenericFunctions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/CorbitSms/GenericFunctions.ts"],"names":[],"mappings":";;;AA8BA,0CA6BC;AAGD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M,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC;QACxD,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,KAAK;YAAE,MAAM;QACzD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,QAAQ;YAAE,MAAM;QAE9D,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,KAAK,IAAI;YAAE,MAAM;IACjE,CAAC;IACD,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-corbit-sms",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "n8n node for Corbit SMS: send SMS (single and bulk), check delivery status and reports, read the balance and sender names.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/agamalsa/n8n-nodes-corbit-sms#readme",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@n8n/node-cli": "
|
|
48
|
+
"@n8n/node-cli": "0.55.5",
|
|
49
49
|
"eslint": "9.32.0",
|
|
50
50
|
"prettier": "3.6.2",
|
|
51
51
|
"release-it": "^21.1.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-corbit-sms",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "n8n node for Corbit SMS: send SMS (single and bulk), check delivery status and reports, read the balance and sender names.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/agamalsa/n8n-nodes-corbit-sms#readme",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@n8n/node-cli": "
|
|
48
|
+
"@n8n/node-cli": "0.55.5",
|
|
49
49
|
"eslint": "9.32.0",
|
|
50
50
|
"prettier": "3.6.2",
|
|
51
51
|
"release-it": "^21.1.0",
|