I am running API calls to send data in a JSON format, whenever the data is sent, it triggers an email to notify me when the data is being sent. For some reason, Bubble recently started to trigger duplicate API calls. I am not able to figure out why this is happening, I am having the data be sent twice along with receiving 2 emails now. It is all seconds apart.
Has anyone else had this happen and have a solution? It is causing problems due to high Workload units, duplicate data coming in, etc.
what can work is scheduling another api workflow/custome event rounded down to a minute/second where the api call will be made as a temporary solution or doing it via node.js via server script that works for sure
Guess:
My guess is that bubble wants to prevent socket hangups and sends a second request if an condition like a returned 200 or unformatted success response isn’t recognized or the response is just taking too long
And the time difference would be caused to prevent and avoid to trigger any rate limiters, but just a guess
You can try to schedule the time plus one minute then round down to the minute so that would be: 12:02:33 → 12:03:33 → 12:03:00 (optional +1 second: 12:03:01) ; you can try that but this isn’t a solution for sure, just a possibility that there is some sort of rate limiter you would then fire of every api call at the same time in the first minute
Server script is an action in the toolbox plugin, you have to add this as a plugin and use code to make the api call