Returning more than one phone number to twilio

I’ve been trying for a while to have the twilio plugin send a text to a list of numbers that is collected using dynamic data. I am creating a calendar where users can list their appointments, and a text is sent automatically to the clients the day before as an appointment reminder. I currently have this:

When I structure it like this however, if there is more than one number that meets the criteria, it sends all the numbers at once to twilio, which twilio can’t accept. I need to find a way of sending these numbers individually, bearing in mind there could be quite a lot to send at once. Twilio has this to say about it:

Does anyone have any idea how to solve this?

Hey @cha_james,

You could get around almost any service that limits actions to one execution per instance using API Workflows. In Twilio’s case, you should create an API Workflow that accepts the parameters you’d like to send along and then schedule it on a list. For example, your ‘sendsms’ API Workflow could have a ‘destination’ parameter that is used in the ‘Twilio API - Send SMS’ step; when you schedule the API Workflow on a list, it can iterate over that list of phone numbers you’d like to use. Whenever you see yourself needing to do things with a list, it’s a good chance you’ll be headed towards API Workflows sooner or later.

1 Like


I’m trying what you said but can’t seem to get it to work as I’m not receiving the texts still. I don’t think I’ve done it right, would it be possible for you to check what I’ve done and see if you can see anything wrong? I’ve never used scheduling API workflows on a list before. Here is what my screen looks like:

When I try to run a zapier zap to trigger the trigger endpoint, which I’m using as I want to do that every day at noon, I’m getting an error saying unexpected server error.

Thanks again

Hey @cha_james,

The API Workflow you use to make the API request to Twilio should be done in the singular otherwise you’re still feeding Twilio a list of numbers. Your ‘autosendaction’ API Workflow’s ‘destination’ parameter should be singular so the proceeding API Workflow is scheduling actions over your intended list. :wink:

1 Like

does that mean unticking the box that says ‘is a list/array’?

That’s correct, as well as making sure you’re feeding one ‘destination’ at a time with the ‘This’ context. :+1:

1 Like

Ah ok I’ll do that now, and sorry what’s the ‘this’ context?

Also sorry to take up your time, but I’ve tried to untick that box and now its saying this is wrong:

I feel like I’m being an idiot but its really getting me stuck haha

It’s a context variable you should be using for your ‘destination’ parameter in the proceeding API Workflow.

1 Like

Finally got it! You’ve just solved what’s taken me about 4 days of stress haha.

Thanks so much

1 Like

I’ve run into a further problem demonstrated here, if you’re not too busy to help me out again:

As you can see I have tried to insert dynamic data to put the event start time and company name in

I need to say in my twilio text body, what time the appointment is (as inputted by the user) and with who. I have succeeded now in sending the texts to multiple numbers, but how do I tie the correct times and users to those numbers? Any thoughts are again really appreciated

It’s just like any other API Workflow, so add as many parameters as you need and refer to them within. :slight_smile: