From 2b008815cad82619a66d4b30d1f79630c82be978 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Thu, 28 Apr 2022 11:39:38 -0400 Subject: [PATCH] fix(Sendgrid Node): Fix issue sending attachments (#3213) --- packages/nodes-base/nodes/SendGrid/SendGrid.node.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts index ca640e89de..2a45e20137 100644 --- a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts +++ b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts @@ -456,8 +456,10 @@ export class SendGrid implements INodeType { const binaryProperty = items[i].binary![property]; + const dataBuffer = await this.helpers.getBinaryDataBuffer(i, property); + attachmentsToSend.push({ - content: binaryProperty.data, + content: dataBuffer.toString('base64'), filename: binaryProperty.fileName || 'unknown', type: binaryProperty.mimeType, });