Can We Make API Call Wait for Response?

I am using the simple api here
A user entered their name
The app returns their age
for a long time it did not seem to work.
But it WAS working.
It was simply that the API took a moment or two to respond
So I’ve added a 5 second delay after the API call to make sure the response has arrived.
Is there an option / way we can make the Data Get Record logic not move
forward until it receives a response?

attaching screen so you can see my logic - i have alerts along the way
as a testing mechanism to make sure the variable was assigned correctly.

thank you

Hey, Actually, from what i know, the output, will get triggered, only when the response from the api arrives, so i wouldn’t use that delay at all.

I’m afraid that is not what I am experiencing, friend.

0.0s - API responses are delivered for previous input
2.5s - API responses are delivered for previous input
5.0s - API responses are for user input as intended and expected

Without a manually entered wait less than 5.0 the API has not completed its execution, and the resulting flow operates on previously entered data or default data.

I fully admit I may be doing something wrong here but the test above doesn’t lie. :grinning:
I have included how I set up the base API and Get Record for reference

You are awesome for trying to help me. THANK YOU!

Ok, maybe, thats how it works, but even that way, you can check when the response comes and then trigger the alert
you can use the function is empty

1 Like

YOU ROCK!!! You got me curious on options to trigger only when the API provides a response.
I wasn’t sure what you meant by using the IS EMPTY function but in exploring that
I found the Event to wait for API response. You can see it in the image attached.
I’m going to mark this one solved. Thank you @Dimos_Vamvourellis ! Stay awesome!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.