diff --git a/packages/nodes-base/nodes/Google/Gmail/Gmail.node.ts b/packages/nodes-base/nodes/Google/Gmail/Gmail.node.ts index a02b2d9b530da..9bb2e36fc03fb 100644 --- a/packages/nodes-base/nodes/Google/Gmail/Gmail.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/Gmail.node.ts @@ -336,9 +336,10 @@ export class Gmail implements INodeType { for (const binaryProperty of (property as string).split(',')) { if (items[i].binary![binaryProperty] !== undefined) { const binaryData = items[i].binary![binaryProperty]; + const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty); attachmentsBinary.push({ name: binaryData.fileName || 'unknown', - content: binaryData.data, + content: binaryDataBuffer, type: binaryData.mimeType, }); } @@ -422,9 +423,10 @@ export class Gmail implements INodeType { for (const binaryProperty of (property as string).split(',')) { if (items[i].binary![binaryProperty] !== undefined) { const binaryData = items[i].binary![binaryProperty]; + const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty); attachmentsBinary.push({ name: binaryData.fileName || 'unknown', - content: binaryData.data, + content: binaryDataBuffer, type: binaryData.mimeType, }); } @@ -644,9 +646,10 @@ export class Gmail implements INodeType { for (const binaryProperty of (property as string).split(',')) { if (items[i].binary![binaryProperty] !== undefined) { const binaryData = items[i].binary![binaryProperty]; + const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty); attachmentsBinary.push({ name: binaryData.fileName || 'unknown', - content: binaryData.data, + content: binaryDataBuffer, type: binaryData.mimeType, }); }