🔀 Merge pull request #407 from RicardoE105/feature/mailjet-fix

🐛 fix template id type #405
This commit is contained in:
Jan 2020-03-26 23:47:29 +01:00 committed by GitHub
commit 3b074ef87d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -299,7 +299,7 @@ export const emailFields = [
},
},
{
displayName: 'Template',
displayName: 'Template ID',
name: 'templateId',
type: 'string',
required: true,

View file

@ -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;