From 87eda6619ff24eb150f4203b506ff8f2a91bf70e Mon Sep 17 00:00:00 2001 From: ricardo Date: Wed, 25 Mar 2020 14:52:12 -0400 Subject: [PATCH] :bug: fix template id type #405 --- packages/nodes-base/nodes/Mailjet/EmailDescription.ts | 2 +- packages/nodes-base/nodes/Mailjet/Mailjet.node.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Mailjet/EmailDescription.ts b/packages/nodes-base/nodes/Mailjet/EmailDescription.ts index 117e5e1ed2..34102fd934 100644 --- a/packages/nodes-base/nodes/Mailjet/EmailDescription.ts +++ b/packages/nodes-base/nodes/Mailjet/EmailDescription.ts @@ -299,7 +299,7 @@ export const emailFields = [ }, }, { - displayName: 'Template', + displayName: 'Template ID', name: 'templateId', type: 'string', required: true, diff --git a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts index 5a6bf3b05d..789b1c41c8 100644 --- a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts +++ b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts @@ -185,7 +185,7 @@ export class Mailjet implements INodeType { //https://dev.mailjet.com/email/guides/send-api-v31/#use-a-template if (operation === 'sendTemplate') { const fromEmail = this.getNodeParameter('fromEmail', i) as string; - const templateId = this.getNodeParameter('templateId', i) as string; + const templateId = parseInt(this.getNodeParameter('templateId', i) as string, 10); const subject = this.getNodeParameter('subject', i) as string; const variables = (this.getNodeParameter('variablesUi', i) as IDataObject).variablesValues as IDataObject[]; const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;