Mailjet send template, is variables working?

Hi guys, I’m not yet experienced in n8n, so maybe I’m missing something obvious:
I’m trying to use mailjet node for sending email template and it’s working. But variables aren’t set, I’m receiving email without them. Here is screenshot where I’m trying to set it


I also tried to use plain http node and for that I was able to set it properly and use variables, but I would prefer to use dedicated mailjet node.
It would help if I can check actual payload that is generated and sent by n8n, is it available to check in local installation? (I’m using npx n8n, since I only testing now)

@Yuriy_Klyuch welcome to the community.

Will have a look today and report back.

Ok It seems like when you sent variables the property TemplateLanguage has to be set to true. Can you confirm that you added that to the HTTP Request when it worked? Thanks

ah, you right it was set in http case! I didn’t read their docs thoroughly and thought this parameter related to spoken language.
BUT
when I set it in mailjet node, nothing changed in recevied email it still looks as if I didn’t set variable.
That’s why I can only repeat
“It would help if I can check actual payload that is generated and sent by n8n, is it available to check in local installation? (I’m using npx n8n, since I only testing now)”

I created a PR that includes that parameter. Can you test it locally and let me know if it fixes that issue?

Sure, how can I do it?

Assuming you have the Github CLI installed.

git clone https://github.com/n8n-io/n8n.git
cd n8n
gh pr checkout fix/mailjet-node
lerna bootstrap --hoist
npm run build
npm run dev

After that, it should be available in localhost.

In case you do not have installed lerna, npm, etc, you can learn how to do with the link below:

Let me know if that works.

Ok just realized that the parameter Template Language is available in the node :expressionless:. It’s under additional fields. Run it with it set to true, and it should solve the issue.

Ok kept investigating and for some reason the variables do not work for me. Not sure what I’m doing wrong as the request that is sending it’s correct according to their docs. I think there is an issue with my account. The PR below includes some small changes. So if you are gonna be able to test it, please do in this one.

yes, as I wrote previously

I’ve tested “feature/mailjet-extended”
and it did worked for me, variables was used in recevied email! (when TemplateLanguage was set to true)
I also tried to use your latest “ReplyTo”, but then it breaks, instead of provided email it used “m” in that field:
{
“name”: “StatusCodeError”,
“statusCode”: 400,
“message”: “400 - {“Messages”:[{“Status”:“error”,“Errors”:[{“ErrorIdentifier”:“f200ca72-8d98-4e9f-947d-817cd9a6c06c”,“ErrorCode”:“mj-0013”,“StatusCode”:400,“ErrorMessage”:”\“m\” is an invalid email address.",“ErrorRelatedTo”:[“ReplyTo.Email”]}]}]}",
“error”: {
“Messages”: [{
“Status”: “error”,
“Errors”: [{
“ErrorIdentifier”: “f200ca72-8d98-4e9f-947d-817cd9a6c06c”,
“ErrorCode”: “mj-0013”,
“StatusCode”: 400,
“ErrorMessage”: ““m” is an invalid email address.”,
“ErrorRelatedTo”: [“ReplyTo.Email”]
}
]
}
]
},
“options”: {
“timeout”: 300000,
“headers”: {
“Accept”: “application/json”,
“Content-Type”: “application/json”,
“Authorization”: REMOVED
},
“method”: “POST”,
“qs”: {},
“body”: {
“Messages”: [{
“From”: {
“email”: “[email protected]
},
“Subject”: “test subj”,
“To”: [{
“Email”: “[email protected]
}
],
“Cc”: [],
“Bcc”: [],
“Variables”: {
“testvar1”: “yupyupyup”
},
“TemplateID”: 2849217,
“ReplyTo”: {
“Email”: “m”
},
“TemplateLanguage”: true
}
]
},
“uri”: “https://api.mailjet.com/v3.1/send”,
“json”: true,
“simple”: true,
“resolveWithFullResponse”: false,
“transform2xxOnly”: false
},
“response”: {
“statusCode”: 400,
“body”: {
“Messages”: [{
“Status”: “error”,
“Errors”: [{
“ErrorIdentifier”: “f200ca72-8d98-4e9f-947d-817cd9a6c06c”,
“ErrorCode”: “mj-0013”,
“StatusCode”: 400,
“ErrorMessage”: ““m” is an invalid email address.”,
“ErrorRelatedTo”: [“ReplyTo.Email”]
}
]
}
]
},
“headers”: {
“content-length”: “229”,
“content-type”: “application/json; charset=UTF-8”,
“x-mj-request-guid”: “4a4180c5-c5c8-491f-8dc2-2a457f7d6c16”,
“date”: “Tue, 04 May 2021 11:16:46 GMT”,
“connection”: “close”
},
“request”: {
“uri”: {
“protocol”: “https:”,
“slashes”: true,
“auth”: null,
“host”: “api.mailjet.com”,
“port”: 443,
“hostname”: “api.mailjet.com”,
“hash”: null,
“search”: null,
“query”: null,
“pathname”: “/v3.1/send”,
“path”: “/v3.1/send”,
“href”: “https://api.mailjet.com/v3.1/send
},
“method”: “POST”,
“headers”: {
“Accept”: “application/json”,
“Content-Type”: “application/json”,
“Authorization”: REMOVED
“content-length”: 246
}
}
}
}

Got fixed. Thanks for helping me debugging. It will be available in the next release.

Got released with [email protected]

Hey Ricardo,
Could you please guide me to clone and run this node locally. I believe i have upgraded my github to github cli as you mentioned. but i am not able to figure the process out or able to enter the comands.