sendgrid / docs

Repository of Twilio SendGrid's product documentation.
https://sendgrid.com/docs
MIT License
235 stars 967 forks source link

Personalizations #3287

Closed sshadmand closed 7 years ago

sshadmand commented 7 years ago

https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/personalizations.html

You docs around using templates is pretty bad. Like, I am about to find another service bad. This guys seems to agree https://ashokfernandez.wordpress.com/2016/05/27/using-sendgrid-templates-with-node-js/, but unfortunatlty the Mono Repo use case has changes how the sendgred import works and neither your, nor his, docs work. Please, add a complete example of implementing a template based send, using the mono repo import strategy. Thanks!

sshadmand commented 7 years ago

In addition, your error asks for params to be added that are not in your documentation :-/

error: (node:13481) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Bad Request (400)
  The from object must be provided for every email send. It is an object that requires the email parameter, but may also contain a name parameter.  e.g. {"email" : "example@example.com"}  or {"email" : "example@example.com", "name" : "Example Recipient"}.
    from.email
    http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.from
  Unless a valid template_id is provided, the content parameter is required. There must be at least one defined content block. We typically suggest both text/plain and text/html blocks are included, but only one block is required.
    content
    http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content
sshadmand commented 7 years ago

I am going through so many varieties of how to do personalization and substitutions here is yet another that is not the same as the doc link above and nothing works completely. Either the wrong dictionary params, or the email sends but substitutions to work. This is super frustrating 👎

apigirl commented 7 years ago

Hi @sshadmand,

Thanks so much for your feedback! You are definitely correct that the documentation and the user experience in general for templates is pretty frustrating. I am going to close this issue because we are currently in the process of improving all of this internally and we hope to push updates soon. However, if you haven't already, I'd encourage you to reach out to our support team. They can help you troubleshoot your specific goals and requirements. You can access support contact options by logging into https://support.sendgrid.com.

SendGrid Docs Team

sshadmand commented 7 years ago

K. Thanks @ksigler7. I opened this request https://support.sendgrid.com/hc/en-us/requests/1284177, hopefully it will get me where I'd like to be. Will be happy to post back to your wiki and/or Stackoverflow once I get it working.