Forum Academy Marketplace Showcase Pricing Features

Returning success before API workflow terminates

Does anyone know if it’s possible to somehow return success from API endpoint before it actually terminates? We have a quite complex workflow associated with an endpoint which runs about 10-15 seconds and that triggers time outs on the initiating part.
I tried return data from API but that trick doesn’t work.
@emmanuel any suggestions?

Levon Terteryan
Founder @ Zeroqode & Bubblewits

let’s stay in touch on twitter!


Bubble Templates
Bubble Plugins
Bubble Courses
Convert Web to iOS & Android
No-code Development Services

1 Like

If you purely just need a success response check the return 200 checkbox in the endpoint properties.

there is only this
the condition is always met, the problem is in the waiting time to get it :slight_smile:

are you writing the calls to the endpoint or using the connector/ 3rd party?

Telegram sends webhooks to that endpoint, and when you click a button in the telegram bot it shows as pending and in Telegram X is even giving a “bot not responding” error. Even though user already received a reply, but the workflow still processes some important actions

I have not played with telegram before, I just had a look at it. how are you implementing the bot? ie. are you writing the script or using api calls to push data and defining the web hooks elsewhere? If the user has already received a reply is this suggesting that the error is not that the call doesn’t finish in time but more that the call runs and perhaps the sign/verify web hook or a needed peram is not returning correctly?

it all works fine, except that it takes too much time, and until the workflow runs till the end Telegram shows a rotating circle on the button as if the message was not yet received, although it was, and the user received the reply, but the endpoint contains other actions which are processed after sending the reply.
the bot is simply API calls made to Telegram to send message, photo etc, and then Telegram sends back a webhook with users inputs…

I know you said you tried returning some data but have you tried returning the default success response in JSON format as the first action?

So as JSON by default,

    'status': 'success',
    'response': {
        'response': 200


yes, i tried that but still same

so what does the bot look for as a success response or value?

not sure what Bubble sends, when i insert terminate this workflow, then it’s fine. there’s clearly some difference between what Bubble sends at the end of the workflow, and what Bubble sends with “return data from API”

ok, this is a terminate response,

    'status': 'success',
    'response': {}

tried that too :slight_smile: same

have you got somewhere to write code on the telegram side of things?

nope, it’s all preconfigured

what im looking through, if its configured right, including the certificate/signing side of things then a return of,

  "status": "success"

Have you got something setup that i can fire some responses at it manually?

Maybe try responding with 201 instead of 200?

A way to work around this is by scheduling an API workflow to do the long operation. The the response is very fast

yes, we thought about this, it’ll just make things a bit more complex, but probably we’ll have to go down that way. Thanks

Hi, I’ve had a similar issue while using Slack API, as I need to respond to user input from Slack immediately.

Since I’m just learning how all this works I’m a little lost with how to do this last part. Are you referring to creating a new API call in the API connector that uses a specific POST method, which I then use when I schedule API workflow?

I currently need to return a application/json format that looks a little like this when the user puts in an email that doesnt exist in my bubble app, or a name;

“errors”: [
“name”: “email_address”,
“error”: “Sorry, this email domain is not authorized!”
“name”: “username”,
“error”: “Uh-oh. This username has been taken!”