-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substitutions not working #725
Comments
You need to use dynamic_template_data instead of substitutions, this isn't yet documented anywhere! Then use {{var_name}} in email template and dynamic_template_data: { var_name: "var_value" } in API call. |
at template side use {{Var_Name}} and in node side use const msg = { |
Thank you for answering. I found the solution, my question was rather why the documentation is not up to date and why the substitution wrapper can not be of any value. |
Hello @mi-mazouz, It's not updated because the issue is still on our backlog. We thank you for your feedback and comments as they help increase the priority of that issue. With Best Regards, Elmer |
Thanks for helping out @canotech! |
@thinkingserious Just want you to know I spent an hour trying to debug why substitutions wasn't working, and then an hour trying to make dynamic_template_data work with such lackluster documentation. Expected way more from Sendgrid. If you're going to release a new feature without documentation, don't deprecate the other feature it replaces before the new documentation comes out. |
@taykcrane I agree with you!!! |
Hello @taykcrane, Thank you for taking the time to express your feedback, it is greatly appreciated. My apologies for the poor experience. I chose to not try and block the release of this feature due to the SDKs not being completely ready. It is my failure that the SDKs do not have updated documentation and helper functions currently. With any luck, it should not be longer than a few weeks to get this SDK up to speed fully. As for the previous types of templates, they are still available but are now called legacy templates. With Best Regards, Elmer |
Thanks for the update @thinkingserious , appreciate the transparency! |
Hello,
Issue Summary
I tried to send an email with some substitutions inside. Like mentionned in the doccumentation:
This way does not work, I still see in my email -!!firstName!!-
Just after I saw that I tried to change the values of setSubstitutionWrappers's params: Like that:
This time, I see like an empty string instead !!-firstName-!!
So I tried an other way which is mentionned in this issue #676 (comment)
This way does not work as well but the fourth attempt was a sucess!!!
('{{', '}}' && dynamicTemplateData together)
Maybe I did something wrong or there is something that I didn't understood. For me substitutionsWappers can be whatever we want and the substitutions field should work.
Thanks!
The text was updated successfully, but these errors were encountered: