Best answer

How do I set up a Yes/No text that will respond according to response

  • 18 July 2022
  • 8 replies

Userlevel 1

So I am trying to use Twilio to send a mass text message to everyone who has a number in our SQL database informing them of how much time they have worked that day so that way they can confirm or decline that time. I want to try setting it up where they can confirm their time and it will update our SQL server or if they decline their time they can state what time they clocked in and out so that way it can be sent to their supervisor. I am not sure if it’s possible to set it up where all that happens and if it gets declined the supervisor could confirm or deny on their end if that employee declines their time.


We have our own SQL server that is hosted by a outside source but I already have that connected to my Zapier account as well as my Twilio. I have my SQL server as my first step so that that it can find new or updated rows, and then I have it set to find the needed data and then have Twilio send the text with that data.


To simplify what I am asking:

  • After the text is sent, if they agree with the time texted to them and confirm it, then it will update the SQL server.
  • If they decline, they put in their clock in/out times and it will send it to the supervisor for them to review.

I can answer any questions if needed.


Best answer by GetUWired 19 July 2022, 15:18

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

8 replies

Userlevel 7
Badge +12

Hi @Alanis P. 

I think the best way to handle the logic would be to use Twilio Studio Flow as it has the ability to reply & wait for responses. Where as triggering a zap from a new SMS in Twilio alone would be a broken up when a user declines. Here is a possible solution..


in Twilio: 
Set up a studio flow (you can search for Flow in twilio and it should take you to the right spot). A crude example is included below. 

Trigger: Catch Hook in Zapier
Action: Find Row in SQL (you will need to search for the person by the phone number)
Action: Update Row in SQL


You may need to add some additional logic to the zap (or create a second zap) to parse out the updated times when the user declines. 



Userlevel 7
Badge +12

Hi @Alanis P.!

Yes, you can definitely do this using Zapier. There are a couple of ways that you can add logic to a Zap, Filters and Paths. Filters are simple yes/no switches. You set them up with a condition (eg if the text says ‘Yes’) and the Zap will only continue if that condition is met. Paths allow you to add more complex logic to a Zap, adding different ‘paths’ of actions based on information from a previous step. For example you could set up one path for if the person replies yes and one for if they reply no. 


In your case you can achieve what you need to with either Filters or Paths; Paths would be easier because you only need one Zap but Paths aren’t available on a Zapier Starter Plan, so which you pick will depend on the type of plan you have. 

To use filters, you would need two Zaps:

  • One set up to continue if the text says yes and has actions to Update the relevant Row. 
  • The second set up to continue if the person texted ‘no’ and would then send them a second text asking for more information before sending that on to their supervisor. 


This help guide has more details on using multiple Zaps with filters to and this guide has more information on Paths. 


I hope that gets you pointed in the right direction!

Userlevel 7
Badge +12

I see that @GetUWired beat me to the punch with a more efficient answer, awesome work @GetUWired!

Userlevel 1

I appreciate both of your guy’s help!


My biggest thing is that I am trying to have Zapier pull the needed data from our SQL server to send texts to the right people to update them on their time as I don’t see how Twilio could possibly pull the needed data, especially as they are in multiple different tables and views. How @GetUWired did it seems like it could work but I am not sure I could possibly use the Webhooks as well as pull from a SQL view table as well.


My initial zap that I was using had SQL Server as the trigger with it’s event as ‘new or updated row’ looking for the the total time the employee worked as they need to get a text stating that everyday after their shift. I would then have the first action be another SQL server but it’s action was to ‘find row’ as I needed it to look at the employee ID to find the phone number as that is a similar column. After that I would have Twilio send a text message from within Zapier itself stating all the info needed for the employee to know.


I want to incorporate something along those lines as well since I am not sure if Twilio could pull the SQL data itself.

Userlevel 2
Badge +3

Hi @Alanis P. !

Thank you for clarifying that. Is there a specific reason the Zap you described isn’t working for this? I’m thinking that if you are updating the rows in your SQL server to daily to add the time, this should trigger the Zap. Then you’d have a find row action to return the phone number, and send the SMS in Twilio. Is any of the steps not returning the data you need?

In regards to the Yes/No replies, you’ll want to use a different Zap for this. You should be able to set it up with the webhook or Twilio trigger and then using Paths/ filters.

Userlevel 1

@Daniela_Paulo, I am not sure, I have that specific Zap published, and when I was initially setting it up and testing out each step it seemed to have worked like needed. The only thing I am thinking could be preventing it from actually testing the necessary people is possibly the ‘To Number’ section as I have it set in the screenshot since we have all the phone #’s needed in our SQL tables, so it possibly could be that.



Thanks for the help with the yes/no, I will start setting up a different Zap to help process that part of the texts.

Userlevel 2
Badge +3

Hi @Alanis P. , thank you for sending those details! Everything looks good, except maybe the country code. If we look at the field description it appears that the ‘+’ will be added automatically, so I’d remove that (leave only the 1) and give it a try. 
Other than this, do you see any specific error, or is the Zap not triggering?

Userlevel 1

I was able to figure out what was going on when it came to triggering the zap, it’s sending like it should be now. Come to realize it was my trigger step that was the issue due to what I had selected with the Order By. Thank you all for your help!