api sends results without waiting for processing to finish

I have a problem like this, I have prepared an endpoint on the bubble.io platform. The api incoming requests are correct, it works correctly in the system and collects data in the database. But in this process, I am making a query with a different API and I need some time for this, but before the process is completed, the api sends a response and the response appears empty. How can I do this, the api should wait for the process to finish before sending a response?

Please, share your workflow and detail the process :+1:

Are tou using return data action, if so it must wait for at least 60s before ending.

I hope you know this already: to get data in api connect we use ‘Return data’ action.

And once we use this action we cannot cuse the API inside Normal workflow, but only in api connect.