toby2
August 8, 2024, 6:42pm
1
So this is super weird.
I have an API call to sendgrid:
POST https://api.sendgrid.com/v3/marketing/contacts/search/emails
Body is this:
{
"emails": ["<email1>"]
}
when I trigger it via the API, I get the correct detection of fields:
However, when I call this from within bubble as a normal workflow step, all the parameter remain empty and not accessible.
If I look at the response, the data is correct at the start as normal JSON but also shows up as an error…
This is super weird no?
Jici
August 8, 2024, 6:48pm
2
Seem API return a dictionnaries of data, something that Bubble doesn’t handle actually. This is not a bug.
You can already search some topics on the forum about that. Option you have is to use another tools or create your own plugins (with server side action) to fetch and transform data.
Or you use detect header + continue if error and you use regex with raw body. (or you just detect as text instead of JSON)
toby2
August 8, 2024, 7:05pm
3
Not sure how that makes sense when Bubble detects the response entries.
Like this…
{
"result": {
"toby@tobyallen.com": {
"contact": {
"address_line_1": "",
"address_line_2": "",
"alternate_emails": [],
"city": "toby@xxx.com",
"country": "Afghanistan",
"email": "toby@xxx.com",
"first_name": "Toby",
"id": "0f31d1aa-d11a-xxx-868a-e0b1f5dbb3c8",
"last_name": "Allen",
"list_ids":...
So the data returns correctly… just not available in the call…
That’s the bit that’s odd
Jici
August 8, 2024, 7:09pm
4
The problem is the “key” for “toby@tobyallen.com ” that will be different if you fetch another email.
This type of API payload cannot be used in Bubble.
I forget another option, this plugin: