Closed thomas-topway-it closed 3 years ago
@thomas-topway-it This is an issue in the Go version as well (trying to override subjects results in "(no subject)"). It must be further up the chain in the SendGrid API.
Hi @thomas-topway-it are you using the sendgrid-nodejs library to make the request?
@JenniferMah
sure, we are using sendgrid-nodejs
You'll need to drop the wrapper characters in the substitutions keys. The library adds the handlebars automatically.
"substitutions": {
"first_name": "Johann"
},
It works removing the brackets from the substitutions keys, thanks
Issue Summary
Hello, we would like to perform personalizations / substitutions using v3 api but without using a template, as described here
https://sendgrid.com/docs/for-developers/sending-email/personalizations/#sending-a-single-email-to-a-single-recipient-with-substitutions
technically it should be straightforward, because you can just allow replacement of the substitutions keys when they are found in the text or html email content, but currently that does not seem to work.
When sending through the v3 api an object like
substitutions don't work when you provide the email content directly without using a template