So, I’m struggling to use SendGrid to send Welcome emails to users who sign up on my site. I’ve created the welcome emails in their Marketing → Automations section (and not in the email API where you create Template IDs) which is totally fine. SendGrid say that in order for new users to receive the emails, I need to add them as contacts in my SendGrid account. This is done either manually or via the Contacts API. I am trying the latter.
Anyways, I’ve tested it and it doesn’t work. I’ve probably written the wrong code (I’ve also written the code below), so was wondering if someone could take a quick look and let me know where I may have gone wrong? Huge thanks in advance!
Finally if you want to see the API code to implement it yourself, you can view the plugin here and see how the API is defined: Bubble Plugin Editor - SendGrid Pro (click the API Calls tab)
Of course I’d want to collect the user’s email so I’ve added the dynamic data ‘Current User’s email’ into the (body) Email Address. And in the (body) Custom Fields, I’ve added the rest of the data I’d like collected (dynamic). Sadly, it still does not work and I’ve tried without the quotation marks.
Am I going about this in the right way? Do I need to complete another step before, like letting my SendGrid account know about the custom fields?
Hey! No probs, thanks for getting back to me. I’m still struggling here. I created two custom fields and finally managed to find the id’s via postman and added them to the workflow. FYI one of the fields, location/country, is a reserved field, I’ve included this in the custom fields box (don’t think it should pose a problem?).
Just for completeness sake, if for some reason you wanted to store the contact data in SendGrid and wanted to add/update contacts with reserved fields and custom fields, there is another action on the plugin that will let you do just that:
It worked(!) perfect, thank you… But now I’m worried about the costs @csakon mentioned… Having read through their pricing plans, it seems nice and cheap up to a few thousand but once you’re in the hundreds of thousands it starts to add up.