Reputation: 15
I'm trying to use a twilio sms as a trigger for a step in my logic app that isn't at the very start. The app is meant to simulate a conversation between the user and the app so i need the app to wait for the user to respond. For example, a conversation might go like
User: Hi
App: Please give me an animal
User: Cat
App: Ok, you said cat
All the tutorials I've found on making a sms a trigger for a logic app just show how to use the "when an https request is received" as the very first step of the logic app. I tried adding another "when an https request is received" as an activity after the "send sms" activity where "please give me an animal" is sent but it says "you cannot use this trigger as an action."
Essentially I'm looking for an activity to make the app wait for the user to respond to "please give me an animal" before the app goes into the "ok you said..." part.
This is my first time using logic apps so I'm hoping that makes sense, please let me know if more info is needed.
Upvotes: 0
Views: 377
Reputation: 10781
You can achieve what you are trying to do with Twilio. Twilio Studio send and wait for reply widget will wait for a reply before moving to the next widget. The example below is outbound but can easily trigger off an incoming message, by attaching the Studio Flow to that Twilio number.
Conduct a Survey with Twilio Studio
Also, Twilio Autopilot could achieve a more flexible response model.
Getting Started with Twilio Autopilot
Upvotes: 0
Reputation: 2351
Sorry you can't. There can be only one trigger. Some actions like something similar to approval flow which could be used but there isn't one for twilio.
Also what you want is really just a chatbot. I think you should look at Azure Bot Service instead. It allows for conversations thought twilio SMS as one of the channels.
Upvotes: 1