Xano and SendGrid: How to send a simple dynamic template
I'm struggling to find out how to send a simple "non-dynamic" dynamic template.
Basic sends work so Xano is hooked up to sendgrid, but I can't figure out the required syntax to pull a specific dynamic template.
I have dynamic templates already setup in SendGrid. From the documentation, it seems like this is all I need to do.
I always get this error, even though the Sendgrid documentation states that I should be providing a string for the template_id.
What am I doing wrong here?
Thanks
Comments
-
Hi, Can you show your call to Sendgrid?
-
I'm using the default "sendgrid_dynamic_send" configuration:
-
where of course, the "from" email and "template_id" are updated. I'm getting the template_id by copy and pasting directly from sendgrid.
-
What that what you were asking for?
-
This example from sendgrid shows [], but that seems to not change the error message.
-
The sendgrid template expects that the template data is a JSON object, which is wrapped in curly braces, not a string wrapped in quotation marks. Try replacing
data: ""
with
data: {}
-
well hell. That changed the error message! I thought that the problem was the template_id the entire time.
Its now "Cannot use dynamic template data with a legacy template ID"
-
Removing the "data: {} " entirely returns "The template_id must be a valid GUID, you provided "
The template_id was copy and pasted from sendgrid from the "dynamic template" page.
-
And….. with your help and some guessing….. I was able to get it.
Here is the solution for anyone else who had the same problem.
template_id: only quotation marks ""
data: {} curly braces (I am not yet customizing the output)
-
Thank you all.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback