Forum Academy Marketplace Showcase Pricing Features

Using API Connector in backend workflow

Hello,

Can you tell me if there is a possibility o use the endpoints from the API Connector plugin in backend API Workflow? I can’t find anything that will match to my needs. I notice that I can use the “Server script” from the Toolbox plugin (Javascript) and in this plugin put the API Connector endpoint execution. But I don’t think that it will be best practice.

Thanks for any tips!

Best Regards,
Mateusz

You can use API Connector in Backend WF. Can you explain your needs?

Yes, I want to run the specific API connector endpoint (with data that come from the frontend) and then return the result to the frontend but also save it to the database.

Which element do I need to use to achieve this? In the plugins section (on backend workflow), I don’t see the possibility to execute the API Connector endpoints.

Thanks!

In API Connector you have two options: DATA or ACTION.
Data can only be accessed by Get Data From API. This can be done in any element in front end but also in action in Backend WF (example: Make change to a thing, select a field, and you will have the option to Get data From API).

When you use Get data from API, this also create a new thing type (like a new DB in Bubble) that can be use to set a field of that type. This is not available in Action. But in action you have access to the fields of the API Call using Result of step X

In some case, you may need to use both type of call (so you need to duplicate this call one set to DATA and one set to Type).

2 Likes

I think that I understood :sweat_smile:

Thanks!

1 Like

Actually, I am also curious how I can convert JSON data that I am retrieving from the backend workflow to the object model?

I am executing the API Connector endpoint on the backend workflow side.

obraz

In this “Return data from API” action, I am returning the data from the API Connector call as a specific object. In the frontend workflow, I am getting the text (it’s probably a JSON that contains my response from the API Connector endpoint) from the “Schedule API Workflow” action (Result of step 3 (Schedule API Workflow)). It’s possible to convert it to a specific object on the frontend?

Thanks!

Nevermind. I was trying to do the bad practice - returning data from backend to the frontend and then do save to the database (on frontend) which I should do on the backend.