n8n-nodes-gmail-custom 0.1.5 → 0.1.6

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.
@@ -393,14 +393,22 @@ class GmailCustom {
393
393
  let attachments = [];
394
394
  if (options.attachmentsUi && options.attachmentsUi.attachmentsBinary) {
395
395
  for (const { property } of options.attachmentsUi.attachmentsBinary) {
396
+ if (!property) continue;
396
397
  for (const name of property.split(',')) {
397
- const binaryData = this.helpers.assertBinaryData(i, name.trim());
398
- const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, name.trim());
399
- attachments.push({
400
- fileName: binaryData.fileName || 'attachment',
401
- mimeType: binaryData.mimeType || 'application/octet-stream',
402
- content: binaryDataBuffer,
403
- });
398
+ const trimmedName = name.trim();
399
+ if (!trimmedName) continue;
400
+ const binaryMeta = item.binary && item.binary[trimmedName];
401
+ if (!binaryMeta) continue;
402
+ try {
403
+ const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, trimmedName);
404
+ attachments.push({
405
+ fileName: binaryMeta.fileName || 'attachment',
406
+ mimeType: binaryMeta.mimeType || 'application/octet-stream',
407
+ content: binaryDataBuffer,
408
+ });
409
+ } catch (e) {
410
+ continue;
411
+ }
404
412
  }
405
413
  }
406
414
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-gmail-custom",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Custom Gmail node for n8n with token caching and 429 retry",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",