Forum Documentation Showcase Pricing Learn more

Add contacts to segmented list in Sendgrid

Hi all,

Was wondering if anyone has used the Sendgrid Contacts plugin to add contacts to Sendgrid? Specifically, I would like to be able to add them to a specific list/segment. Does anyone know if this is possible?

Thanks!

@romanmg Hey Gaby, I think you maybe built this plugin? Do you know if it’s possible to add contacts to segments/lists using the plugin? Thanks

Hi @josh7, you should be able to use the “Add Recipient to List” plugin action. I’ve just pushed a small update with a new call to “Retrieve All Lists” so it’s easier to find a specific list (or segment list) ID.

Hey @romanmg, is there problem with the plugin or am I the only one getting error when creating contacts?

This is the error:

Hi @ferhatg, make sure your API key has the word “Bearer” in front of it in the plugin settings. If my key was ABC, then it would look like this:

Bearer ABC

Note the space between “Bearer” and the key itself. That should resolve your issue.


Cheers,
Gaby

Coaching No Code Apps
Join our Facebook group for insider access to no-code development
Get professional development services
Enroll in expert-led courses and products

1 Like

Hi again, thank you so much for your help, unfortunately I tried again with "Bearer " in front of the key, it still gives me same error.


I am having same problem with the plugin zeroqode offers. I tried creating the API call myself but I am getting similar error.

Do you know anything about this issue, or I am the only one having trouble to create contacts on Sendgrid?

Hm, I ran this on my end and didn’t have an issue. Make sure to double-check the very end of your key(s) for any extra spaces (there shouldn’t be any).

If those are good, try creating a new API key from your SendGrid account and replacing them.

Also, see if you can re-create the call in Postman to help isolate the issue.

Thank you for your help, I figured out the problem, here is one of the related discussion on Stackoverflow

With a different endpoint and method, I am able to create contact through API calls.
image

Also there was another discussion on Stackoverflow about free accounts not being able to create contact/recipient and getting the error code 403 which indicated the access forbidden. I am not sure on this though, because as you say, it works in your end.

Anyway, thank you for your help. If anyone wonders how to create contact on Sendgrid through API calls,

This is the JSON body

{
“contacts”: [
{
“email”: “”,
“first_name”: “<first_name>”
“last_name”: “<last_name>”
}
]
}

1 Like