This is going to be kind of a long one, so please bear with me.
I’ve defined an API call using the API Connector. When I initialize it, I see that data is returned. However, when I use it as a workflow action, it seems that no data is returned.
This will work if the api match them. You cannot edit the response just to make it look the way you want. You need to fit the possible schema of the API service.
Yes, you can edit the object returned by an API Call initialization, but it’s something you want to do sparingly, only when needed. The reason is if you ever have to reinitialize the API Call, you need to reedit it exactly the way you did the first time, or something in your application will break.
In my case, I provide a variable to the API Call which is an email address, then the returned object within the JSON response uses that email address as the object name, which I consider to be both wrong, and something I can not change.
Changing the name of the key will result in empty data as Bubble is looking for the data inside a key that doesn’t exist in the response.
Having said that, the email being used as the key will cause the same issue as it will be different each time.
You could set the response on the API call as text and use the Toolbox plugin to parse it and extract the data you need but that’s a bit of a hassle for something that should be straightforward.