@xnkee/n8n-nodes-instagram 2.0.0 → 2.1.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/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './nodes/Instagram/Instagram.node';
2
+ export * from './nodes/Instagram/InstagramChatTrigger.node';
2
3
  export * from './credentials/InstagramApi.credentials';
3
4
  export * from './credentials/InstagramOAuth2Api.credentials';
4
5
  export * from './credentials/InstagramUnifiedLoginOAuth2Api.credentials';
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./nodes/Instagram/Instagram.node"), exports);
18
+ __exportStar(require("./nodes/Instagram/InstagramChatTrigger.node"), exports);
18
19
  __exportStar(require("./credentials/InstagramApi.credentials"), exports);
19
20
  __exportStar(require("./credentials/InstagramOAuth2Api.credentials"), exports);
20
21
  __exportStar(require("./credentials/InstagramUnifiedLoginOAuth2Api.credentials"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,yEAAuD;AACvD,+EAA6D;AAC7D,2FAAyE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,8EAA4D;AAC5D,yEAAuD;AACvD,+EAA6D;AAC7D,2FAAyE"}
@@ -0,0 +1,17 @@
1
+ import { IHookFunctions, INodeType, INodeTypeDescription, IWebhookFunctions, IWebhookResponseData } from 'n8n-workflow';
2
+ export declare class InstagramChatTrigger implements INodeType {
3
+ description: INodeTypeDescription;
4
+ /**
5
+ * The Callback URL is configured once per app in the Meta App Dashboard (it cannot be
6
+ * registered per workflow with the account token), so there is nothing to create or
7
+ * delete here. Meta verifies the URL through the GET handshake handled in webhook().
8
+ */
9
+ webhookMethods: {
10
+ default: {
11
+ checkExists(this: IHookFunctions): Promise<boolean>;
12
+ create(this: IHookFunctions): Promise<boolean>;
13
+ delete(this: IHookFunctions): Promise<boolean>;
14
+ };
15
+ };
16
+ webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
17
+ }
@@ -0,0 +1,415 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstagramChatTrigger = void 0;
4
+ const crypto_1 = require("crypto");
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const MESSAGE_TYPE_OPTIONS = [
7
+ { name: 'Audio', value: 'audio' },
8
+ { name: 'Deleted', value: 'deleted', description: 'The contact deleted a message' },
9
+ { name: 'Ephemeral (View Once)', value: 'ephemeral' },
10
+ { name: 'File', value: 'file' },
11
+ { name: 'Image', value: 'image' },
12
+ { name: 'Quick Reply', value: 'quick_reply', description: 'A quick reply option was tapped' },
13
+ { name: 'Reel', value: 'reel', description: 'A reel was shared (ig_reel / reel)' },
14
+ { name: 'Share (Post)', value: 'share', description: 'A post / media was shared' },
15
+ { name: 'Story Mention', value: 'story_mention' },
16
+ { name: 'Story Reply', value: 'story_reply', description: 'Text reply to a story' },
17
+ { name: 'Text', value: 'text' },
18
+ { name: 'Unsupported', value: 'unsupported' },
19
+ { name: 'Video', value: 'video' },
20
+ ];
21
+ function toIso(timestamp) {
22
+ const value = Number(timestamp);
23
+ if (!Number.isFinite(value) || value <= 0)
24
+ return undefined;
25
+ // Meta sends milliseconds, but be tolerant with seconds.
26
+ return new Date(value < 1e12 ? value * 1000 : value).toISOString();
27
+ }
28
+ function normalizeAttachmentType(type) {
29
+ if (type === 'ig_reel' || type === 'reel')
30
+ return 'reel';
31
+ return type;
32
+ }
33
+ function detectMessageType(message) {
34
+ if (message.is_deleted)
35
+ return 'deleted';
36
+ if (message.is_unsupported)
37
+ return 'unsupported';
38
+ if (message.quick_reply)
39
+ return 'quick_reply';
40
+ const attachments = message.attachments ?? [];
41
+ if (attachments.length > 0) {
42
+ return normalizeAttachmentType(String(attachments[0].type ?? 'unknown'));
43
+ }
44
+ const replyTo = message.reply_to;
45
+ if (replyTo?.story)
46
+ return 'story_reply';
47
+ if (message.text !== undefined)
48
+ return 'text';
49
+ if (message.admin_text !== undefined)
50
+ return 'handoff';
51
+ return 'unknown';
52
+ }
53
+ /** Collects messaging objects from both payload formats (messaging/standby arrays and changes). */
54
+ function extractMessagingEvents(body) {
55
+ const result = [];
56
+ const entries = body.entry ?? [];
57
+ for (const entry of entries) {
58
+ for (const item of entry.messaging ?? []) {
59
+ result.push({ entry, item, standby: false });
60
+ }
61
+ for (const item of entry.standby ?? []) {
62
+ result.push({ entry, item, standby: true });
63
+ }
64
+ // Format used by the App Dashboard "Test" button and some Instagram Login deliveries.
65
+ for (const change of entry.changes ?? []) {
66
+ const field = String(change.field ?? '');
67
+ if (!['messages', 'message_reactions', 'messaging_postbacks', 'messaging_seen', 'messaging_referral', 'standby'].includes(field)) {
68
+ continue;
69
+ }
70
+ const value = change.value;
71
+ if (value && typeof value === 'object') {
72
+ result.push({ entry, item: value, standby: field === 'standby' });
73
+ }
74
+ }
75
+ }
76
+ return result;
77
+ }
78
+ function formatEvent(entry, item, standby) {
79
+ const accountId = String(entry.id ?? '');
80
+ const senderId = String(item.sender?.id ?? '');
81
+ const recipientId = String(item.recipient?.id ?? '');
82
+ const timestamp = item.timestamp ?? entry.time;
83
+ const message = item.message;
84
+ const isEcho = Boolean(message?.is_echo);
85
+ const fromMe = isEcho || (accountId !== '' && senderId === accountId);
86
+ const contactId = fromMe ? recipientId : senderId;
87
+ const base = {
88
+ fromMe,
89
+ direction: (fromMe ? 'outgoing' : 'incoming'),
90
+ accountId: fromMe ? senderId || accountId : recipientId || accountId,
91
+ contactId,
92
+ senderId,
93
+ recipientId,
94
+ standby,
95
+ timestamp,
96
+ date: toIso(timestamp),
97
+ };
98
+ if (message) {
99
+ const attachments = (message.attachments ?? []).map((attachment) => {
100
+ const payload = attachment.payload ?? {};
101
+ return {
102
+ type: normalizeAttachmentType(String(attachment.type ?? 'unknown')),
103
+ url: payload.url ?? null,
104
+ ...(payload.title !== undefined ? { title: payload.title } : {}),
105
+ };
106
+ });
107
+ const replyTo = message.reply_to;
108
+ const story = replyTo?.story;
109
+ const quickReply = message.quick_reply;
110
+ const messageType = detectMessageType(message);
111
+ return {
112
+ event: messageType === 'handoff' ? 'handoff' : 'message',
113
+ messageType,
114
+ ...base,
115
+ messageId: message.mid ?? null,
116
+ text: message.text ?? null,
117
+ mediaUrl: attachments.find((attachment) => attachment.url)?.url ?? null,
118
+ attachments,
119
+ isEcho,
120
+ isDeleted: Boolean(message.is_deleted),
121
+ isUnsupported: Boolean(message.is_unsupported),
122
+ replyToMessageId: replyTo?.mid ?? null,
123
+ story: story ? { id: story.id ?? null, url: story.url ?? null } : null,
124
+ quickReplyPayload: quickReply?.payload ?? null,
125
+ referral: message.referral ?? null,
126
+ adminText: message.admin_text ?? null,
127
+ handoffReason: message.handoff_reason ?? null,
128
+ };
129
+ }
130
+ const reaction = item.reaction;
131
+ if (reaction) {
132
+ return {
133
+ event: 'reaction',
134
+ messageType: 'reaction',
135
+ ...base,
136
+ messageId: reaction.mid ?? null,
137
+ action: reaction.action ?? null,
138
+ reaction: reaction.reaction ?? null,
139
+ emoji: reaction.emoji ?? null,
140
+ };
141
+ }
142
+ const postback = item.postback;
143
+ if (postback) {
144
+ return {
145
+ event: 'postback',
146
+ messageType: 'postback',
147
+ ...base,
148
+ messageId: postback.mid ?? null,
149
+ text: postback.title ?? null,
150
+ title: postback.title ?? null,
151
+ payload: postback.payload ?? null,
152
+ };
153
+ }
154
+ const read = item.read;
155
+ if (read) {
156
+ return {
157
+ event: 'seen',
158
+ messageType: 'seen',
159
+ ...base,
160
+ messageId: read.mid ?? null,
161
+ };
162
+ }
163
+ const referral = item.referral;
164
+ if (referral) {
165
+ return {
166
+ event: 'referral',
167
+ messageType: 'referral',
168
+ ...base,
169
+ ref: referral.ref ?? null,
170
+ source: referral.source ?? null,
171
+ referralType: referral.type ?? null,
172
+ referral,
173
+ };
174
+ }
175
+ return undefined;
176
+ }
177
+ function isValidSignature(rawBody, header, appSecret) {
178
+ if (!rawBody || !header || !header.startsWith('sha256='))
179
+ return false;
180
+ const expected = (0, crypto_1.createHmac)('sha256', appSecret).update(rawBody).digest('hex');
181
+ const received = header.slice('sha256='.length);
182
+ const a = Buffer.from(expected, 'utf8');
183
+ const b = Buffer.from(received, 'utf8');
184
+ return a.length === b.length && (0, crypto_1.timingSafeEqual)(a, b);
185
+ }
186
+ class InstagramChatTrigger {
187
+ constructor() {
188
+ this.description = {
189
+ displayName: 'Instagram Chat Trigger',
190
+ name: 'instagramChatTrigger',
191
+ icon: 'file:instagram.svg',
192
+ group: ['trigger'],
193
+ version: 1,
194
+ subtitle: '={{$parameter["direction"] === "all" ? "All messages" : $parameter["direction"] === "incoming" ? "Received messages" : "Sent by me"}}',
195
+ description: 'Starts the workflow when an Instagram Direct (chat) event arrives: messages, reactions, postbacks, seen and referrals, already formatted',
196
+ defaults: {
197
+ name: 'Instagram Chat Trigger',
198
+ },
199
+ inputs: [],
200
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
201
+ webhooks: [
202
+ {
203
+ name: 'setup',
204
+ httpMethod: 'GET',
205
+ responseMode: 'onReceived',
206
+ path: 'webhook',
207
+ },
208
+ {
209
+ name: 'default',
210
+ httpMethod: 'POST',
211
+ responseMode: 'onReceived',
212
+ path: 'webhook',
213
+ },
214
+ ],
215
+ properties: [
216
+ {
217
+ displayName: 'Copy the Production URL above into Meta App Dashboard > Webhooks (object "Instagram") as the Callback URL, use the same Verify Token below and subscribe to the "messages" field (plus "message_reactions", "messaging_postbacks", "messaging_seen" and "messaging_referral" if you want them). The workflow must be active for Meta to verify the URL.',
218
+ name: 'setupNotice',
219
+ type: 'notice',
220
+ default: '',
221
+ },
222
+ {
223
+ displayName: 'Verify Token',
224
+ name: 'verifyToken',
225
+ type: 'string',
226
+ typeOptions: { password: true },
227
+ default: '',
228
+ required: true,
229
+ description: 'Any secret string. It must be exactly the same as the "Verify Token" typed in the Meta App Dashboard when configuring the Callback URL.',
230
+ },
231
+ {
232
+ displayName: 'App Secret',
233
+ name: 'appSecret',
234
+ type: 'string',
235
+ typeOptions: { password: true },
236
+ default: '',
237
+ description: 'Optional. If set, the X-Hub-Signature-256 header is validated and requests not signed by Meta are rejected. Use the App Secret of the app that sends the webhooks (Instagram App Secret for Instagram Login, Meta App Secret for Facebook / Unified Login).',
238
+ },
239
+ {
240
+ displayName: 'Messages From',
241
+ name: 'direction',
242
+ type: 'options',
243
+ options: [
244
+ {
245
+ name: 'Contacts Only (Received)',
246
+ value: 'incoming',
247
+ description: 'Only what customers send to your account. Ignores your own messages (echoes).',
248
+ },
249
+ {
250
+ name: 'Me Only (Sent)',
251
+ value: 'outgoing',
252
+ description: 'Only messages sent by your account (echo), from the app, the Instagram app or the API',
253
+ },
254
+ {
255
+ name: 'Everyone',
256
+ value: 'all',
257
+ description: 'Both received and sent messages',
258
+ },
259
+ ],
260
+ default: 'incoming',
261
+ },
262
+ {
263
+ displayName: 'Events',
264
+ name: 'events',
265
+ type: 'multiOptions',
266
+ options: [
267
+ { name: 'Handoff (Admin Text)', value: 'handoff', description: 'Conversation handed off by a Meta app (admin_text / handoff_reason)' },
268
+ { name: 'Message', value: 'message', description: 'Text, media, shares, story replies/mentions, quick replies, deletions…' },
269
+ { name: 'Postback', value: 'postback', description: 'Icebreaker or template button tapped' },
270
+ { name: 'Reaction', value: 'reaction', description: 'Contact reacted / unreacted to a message' },
271
+ { name: 'Referral', value: 'referral', description: 'An ig.me link with a ref parameter was opened' },
272
+ { name: 'Seen', value: 'seen', description: 'Message read by the recipient' },
273
+ ],
274
+ default: ['message'],
275
+ description: 'Which chat events start the workflow. Leave empty to accept all.',
276
+ },
277
+ {
278
+ displayName: 'Message Types',
279
+ name: 'messageTypes',
280
+ type: 'multiOptions',
281
+ options: MESSAGE_TYPE_OPTIONS,
282
+ default: [],
283
+ displayOptions: {
284
+ show: {
285
+ events: ['message'],
286
+ },
287
+ },
288
+ description: 'Only trigger for these message types. Leave empty to accept all types.',
289
+ },
290
+ {
291
+ displayName: 'Options',
292
+ name: 'options',
293
+ type: 'collection',
294
+ placeholder: 'Add option',
295
+ default: {},
296
+ options: [
297
+ {
298
+ displayName: 'Ignore Standby Events',
299
+ name: 'ignoreStandby',
300
+ type: 'boolean',
301
+ default: false,
302
+ description: 'Whether to ignore events received while another app controls the conversation (Handover Protocol)',
303
+ },
304
+ {
305
+ displayName: 'Include Raw Payload',
306
+ name: 'includeRaw',
307
+ type: 'boolean',
308
+ default: false,
309
+ description: 'Whether to add the original Meta event under the "raw" key',
310
+ },
311
+ {
312
+ displayName: 'Only From Contact IDs',
313
+ name: 'contactIds',
314
+ type: 'string',
315
+ default: '',
316
+ placeholder: '1234567890, 9876543210',
317
+ description: 'Comma-separated IGSIDs. If set, only conversations with these contacts trigger the workflow (useful for testing).',
318
+ },
319
+ ],
320
+ },
321
+ ],
322
+ };
323
+ /**
324
+ * The Callback URL is configured once per app in the Meta App Dashboard (it cannot be
325
+ * registered per workflow with the account token), so there is nothing to create or
326
+ * delete here. Meta verifies the URL through the GET handshake handled in webhook().
327
+ */
328
+ this.webhookMethods = {
329
+ default: {
330
+ async checkExists() {
331
+ return true;
332
+ },
333
+ async create() {
334
+ return true;
335
+ },
336
+ async delete() {
337
+ return true;
338
+ },
339
+ },
340
+ };
341
+ }
342
+ async webhook() {
343
+ const webhookName = this.getWebhookName();
344
+ const res = this.getResponseObject();
345
+ // 1. Verification handshake (GET).
346
+ if (webhookName === 'setup') {
347
+ const query = this.getQueryData();
348
+ const verifyToken = this.getNodeParameter('verifyToken');
349
+ if (query['hub.mode'] === 'subscribe' && query['hub.verify_token'] === verifyToken) {
350
+ res.status(200).send(String(query['hub.challenge'] ?? '')).end();
351
+ }
352
+ else {
353
+ res.status(403).send('Verify token mismatch').end();
354
+ }
355
+ return { noWebhookResponse: true };
356
+ }
357
+ // 2. Event notification (POST).
358
+ const req = this.getRequestObject();
359
+ const appSecret = this.getNodeParameter('appSecret', '');
360
+ if (appSecret) {
361
+ const signature = this.getHeaderData()['x-hub-signature-256'];
362
+ if (!isValidSignature(req.rawBody, signature, appSecret)) {
363
+ res.status(403).send('Invalid signature').end();
364
+ return { noWebhookResponse: true };
365
+ }
366
+ }
367
+ const body = this.getBodyData();
368
+ if (body.object !== 'instagram') {
369
+ return { webhookResponse: 'EVENT_RECEIVED' };
370
+ }
371
+ const direction = this.getNodeParameter('direction', 'incoming');
372
+ const events = this.getNodeParameter('events', []);
373
+ const messageTypes = this.getNodeParameter('messageTypes', []);
374
+ const options = this.getNodeParameter('options', {});
375
+ const contactIds = String(options.contactIds ?? '')
376
+ .split(',')
377
+ .map((id) => id.trim())
378
+ .filter(Boolean);
379
+ const items = [];
380
+ for (const { entry, item, standby } of extractMessagingEvents(body)) {
381
+ if (standby && options.ignoreStandby)
382
+ continue;
383
+ const formatted = formatEvent(entry, item, standby);
384
+ if (!formatted)
385
+ continue;
386
+ if (direction === 'incoming' && formatted.fromMe)
387
+ continue;
388
+ if (direction === 'outgoing' && !formatted.fromMe)
389
+ continue;
390
+ if (events.length > 0 && !events.includes(formatted.event))
391
+ continue;
392
+ if (formatted.event === 'message' &&
393
+ messageTypes.length > 0 &&
394
+ !messageTypes.includes(formatted.messageType)) {
395
+ continue;
396
+ }
397
+ if (contactIds.length > 0 && !contactIds.includes(formatted.contactId))
398
+ continue;
399
+ if (options.includeRaw) {
400
+ formatted.raw = item;
401
+ }
402
+ items.push({ json: formatted });
403
+ }
404
+ // Meta only needs a 200. Skip the execution when nothing passed the filters.
405
+ if (items.length === 0) {
406
+ return { webhookResponse: 'EVENT_RECEIVED' };
407
+ }
408
+ return {
409
+ webhookResponse: 'EVENT_RECEIVED',
410
+ workflowData: [items],
411
+ };
412
+ }
413
+ }
414
+ exports.InstagramChatTrigger = InstagramChatTrigger;
415
+ //# sourceMappingURL=InstagramChatTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstagramChatTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Instagram/InstagramChatTrigger.node.ts"],"names":[],"mappings":";;;AAAA,mCAAqD;AAErD,+CASsB;AAqBtB,MAAM,oBAAoB,GAAG;IAC3B,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACjC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,+BAA+B,EAAE;IACnF,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,WAAW,EAAE;IACrD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAC/B,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACjC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,iCAAiC,EAAE;IAC7F,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,oCAAoC,EAAE;IAClF,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE;IAClF,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IACjD,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,uBAAuB,EAAE;IACnF,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;IAC7C,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;CAClC,CAAC;AAEF,SAAS,KAAK,CAAC,SAAkB;IAC/B,MAAM,KAAK,GAAG,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CAAC;QAED,6EAA6E;QAC7E,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC;QAC/C,CAAC;QAED,OAAO;YACL,eAAe,EAAE,gBAAgB;YACjC,YAAY,EAAE,CAAC,KAAK,CAAC;SACtB,CAAC;IACJ,CAAC;CACF;AA7OD,oDA6OC"}
@@ -0,0 +1,16 @@
1
+ {
2
+ "node": "@xnkee/n8n-nodes-instagram.instagramChatTrigger",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": [
6
+ "Social Media",
7
+ "Communication"
8
+ ],
9
+ "resources": {
10
+ "primaryDocumentation": [
11
+ {
12
+ "url": "https://developers.facebook.com/docs/instagram-platform/webhooks"
13
+ }
14
+ ]
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xnkee/n8n-nodes-instagram",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "n8n community node for the Instagram API with Unified Login (Instagram or Facebook), Instagram Login (Business Login for Instagram) & AI Agent Tool",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -41,7 +41,8 @@
41
41
  "dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.js"
42
42
  ],
43
43
  "nodes": [
44
- "dist/nodes/Instagram/Instagram.node.js"
44
+ "dist/nodes/Instagram/Instagram.node.js",
45
+ "dist/nodes/Instagram/InstagramChatTrigger.node.js"
45
46
  ]
46
47
  },
47
48
  "scripts": {