Forum Academy Marketplace Showcase Pricing Features

Best way to show an element after API call

Hello!

I’m currently using the Whisper API & OpenAI GPT-3.5. While the Whisper API translates the users language I have a screen that shows a loading spinner/transcribing.

Once both calls have returned I want to show the actual transcript and summary to the user.

My problem is I can’t figure out a way to get this to work even 80% of the time.

I’ve tried doing custom states. I’ve tried doing Do a search for Response by current user, Summary is not empty, show transcript/summary.

Is there a way to see if the API call has returned so I can set conditionals based on that?

Please let me know if there is a preferred method to make this happen. Thank you!

1 Like

If you’re calling the API via workflows, you can simply add an action after the API action that references the API action’s result in it’s ONLY WHEN. (Only When Step1’s result’s error is not empty).
This tells bubble to only execute the next action AFTER the previous one is complete. And this next action could be the one setting the states or showing/hiding loading elements.