API Workflow on a list is repeating

Hi Bubble users. I made some good progress on my app, i’m just using it to schedule and send SMS with Twilio.

I got it working:

  • Users pulled from Airtable
  • Users added into Bubble DB
  • Twilio API call runs on the list of users

My issue is that 5 to 8 SMS are being sent out per number on the list, rather than 1 SMS per number.

I guess the Twilio API call is repeating itself? I’m not sure where the issue is and i’m having trouble identifying it.

Anybody willing to help me figure it out?

Here’s screenshots and a breakdown of the API Workflows:

Step 1: Airtable API GET call to pull in users, Step 2: Schedule API Workflow to add them as Free Trials in the Bubble DB:

Next, Step 1: Create the free trials in the DB. Step 2: Getting ready for Twilio API Call:

Queue Twilio Call:

The Twilio Call:

1 Like

I checked the server logs and have been able to get a better idea of what’s happening. What I think is happening:

The Twilio API call is being triggered each time a new free trial is added (every 5 seconds) and it’s going through the whole list from the beginning each time.

I’m really new to Bubble, does anybody know a viable solution for this?

I guess I can unlink the calls and have them run separately, but there’s still a chance for them to overlap if there’s a lot of users to add.

Would a viable solution be to set up another field on the Free Trial DB with a value like: “1st SMS sent” or something like that, and then set up a constraint on the Twilio call to skip those?

As a new Bubble user i’m not sure if that’s very streamlined or not.

@jackwabbit It looks like your problem is with the ‘queue-twilio-call’ endpoint. You are triggering that with every new trial being added and it is in turn creating a full list of free trials and scheduling a twilio call for all of them.

This is essentially scheduling a call on the entire list for each new trial being added.

Try setting Step 2 in the add-free-trials workflow to ‘Schedule API Workflow twilio-call’ and skip over the ‘queue-twilio-call’ endpoint entirely.

That should resolve your issue.

1 Like

Ooo that worked! Thanks so much :grin: :+1:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.