Schedule Twilio SMS with Zapier at user defined times

Hi, I have a 2 part issue.

I want to schedule text messages to users at times that they define.

I managed to set up the Twilio API and that works (messages are sent at user defined times) when I have my page open. - because I had originally created a regular API workflow to send the Twilio text.

But I need the messages to be sent regardless of if the page is open, so I am trying to use Zapier to schedule the Twilio API at those times. I found some posts in here that helped with that, however, I am having difficulty because…

  1. the time will be set by the user, so I can’t enter a specific time. I originally set the trigger time in Zapier to midnight and I know it checks every 5 min, so I thought it would work once the current time is the user’s defined time. It hasn’t, though it may also be because of issue #2

  2. The Twilio API text has From=(mytwilio#)&To=(the bubble field ‘Current User’s Phone#’) instead of a typed out number. Again, this works fine when I have the site open, But in Zapier, it gives me an error saying that the To= needs a number.

Error: xxxxxxxx returned (400) Bad Request and said “Error connecting to Twilio API - Text: {“code”: 21604, “message”: “A ‘To’ phone number is required.”, “more_info”: “https://www.twilio.com/docs/errors/21604”, “status”: 400}”

I used this post as a reference Create a thing at regular intervals (eg daily)?

Can anyone help me get this fixed?

Have you tried using a scheduled API workflow in Bubble without having to go through Zapier?

No, because I read that it was better to go outside of Bubble for scheduling things daily, plus the service seems to be less expensive.

Really its just a means of doing notifications. So if there are any other means of doing so besides a text message - I’m open to those too.

Notifications seem to be a hot topic 'round these parts. Back in my day, we used email and we liked it!

In all seriousness, I haven’t experimented much with Zapier or notifications in general. Sorry for my lack of help!

lol thats ok… thanks for replying anyway

Does anyone have any suggestions or any help??

You can use the Zapier delay function ?

I think I need to look into that a little more - I’m not sure how that would work for this.

Basically the user is setting their notification time, so I want that time to be the time Zapier gets to automate the API workflow.

You should be able to send it through on the API to Zapier.

But it is worth looking again at scheduling the Bubble API to do it directly I think. In the past there was a lot less functionality around scheduled events, but now that has been in use for a while and expanded to allow cancelation … it should be a lot more stable.

Thanks, Yeah I’m still playing with it. I can’t seem to get the Zapier one to work. Its trying to go through because it sends me emails at midnight saying that it attempted but the workflow won’t run because the conditions are not met. I don’t know if I have it set up properly. I don’t know how you would set it to delay until the conditions are met.

For Zapier:
For the API endpoint - I have the following condition. ‘Only when: Current Date/time, extract hour is current user’s message hour and current date/time, extract minute is current user’s message minute’. Then for the action, I have the Twilio API text message.

For Bubble Recurring Event:
I also tried testing Bubble’s scheduling. But I can’t seem to get that to work either.
I created a recurring event (RE), I set it to a type of thing, say User…
I also put in the same condition as above, ‘Only when: Current date/time…’
Then for the action, again, I put in the Twilio API text (TW). First I had put the ‘Set recurring event’ (SRE) action, before the Twilio API action in the workflow…but then I thought maybe that’s what’s wrong, so I switched it to after the Twilio API text. Neither way is working.

So, (RE = TW —> SRE) or (RE = SRE ----> TW)
But neither work. When I check the Scheduling tab under ‘Logs’ nothing shows up at all.
I had also set the start date to the either the current day or the next day (depending on what time I set for the test)

I also noticed that when I set the type of thing in the Recurring Event to User, the ‘Set recurring event action’ type of thing shows up as ‘Current User’ and if I choose a different type of thing say ‘AAAAA’, then the ‘Set Recurring event action’ gives me ‘Current Workflow AAAAA’ as the option for the type of thing. I don’t know if that’s correct.

I used this post as a reference - [New Feature] Recurring workflows - it has pictures if anyone needs the visual