Twilio WhatsApp Autopilot - How to Start The Conversation - twilio

Is there any way to make the Autopilot start the conversation. What i need is, I have Customer Mobile Numbers and i need to send to them a automated WhatsApp Message. and based on there inputs, Autopilot response to them.
Thanks,

you should be able to initiate a conversation using one of your WhatsApp approved templates using the Twilio Messages resources. Once the user responds (and the 24 hour free form text opens), you can configure the Webhook for WhatsApp to execute your Autopilot assistant.
Twilio WhatsApp production sender and template creation
Twilio API for WhatsApp *(Send an outbound freeform WhatsApp Message)
WhatsApp - Autopilot Channel

Twilio developer evangelist here.
Welcome to StackOverflow!
You can initiate a session with the user without the user greeting the bot by connecting the trigger widget's Rest API trigger event to either a make outgoing call or, in your case, the send message widget, as shown below.
Then, if the call is answered or the message is sent, you can connect those actions to the Send to Autopilot widget, below.
.
Lastly, under the config section of your Send to Autopilot widget, put in the Collection task you want to run when the outbound call or message is initiated by your Twilio client and not the user.
Let me know if this helps :D

Related

Get Whatsapp Number of user in Twilio autopilot

I am trying to create a chatbot using Twilio Autopilot which integrated with WhatsApp. So my flow is like, if user messages on registerd number, Twilio WhatsApp senders webhook will get trigger and it will call Autopilot chatbot task. Task will process the data and it will send reply.
In all above flow I want to capture the WhatsApp number of the user who is asking the question. that number I want in autopilot, so Autopilot will send that number to Twilio function and I want to save that number in my Database using external API's call from Twilio function.
How I will get WhatsApp number inside Twilio Autopilot chatbot for user who is asking questions?
Thanks in Advance
Autopilot can respond using static actions defined within the task, but it can also send a webhook request to fetch Actions JSON from your server. That webhook request contains details about the user you are talking with, including the parameter UserIdentifier which, in a WhatsApp chat, will be the user's WhatsApp number.
If you are currently responding to tasks from Actions JSON defined in the Twilio console, you can add a webhook by using a "redirect" action at the end of a set of actions to a URL you control and then responding to that with a "listen" action to wait for the next task. Alternatively, you could just set a URL for the webhook and respond with your Actions JSON from your own app.

Integrating FlowXO with twilio

How can one create a bot in Flow.xo that listens to twilio messages? In other words can I write a bot in FlowXO to send and receive SMS messages from my twilio account?
Flow.XO allows one to send SMS messages via their twilio integration function, but it only has two functions:
1> Twilio calls
2> Twilio SMS messages
Both these are outward bound, and we can only send messages (calls, or SMS) via twilio from Flow.xo. Can I receive messages in FlowspellingXO from Twilio too? How is this accomplished?
Thanks in anticipation.
Twilio developer evangelist here.
I haven't used Flow.XO before, but a quick look through the documentation suggests that this is the guide for you: https://support.flowxo.com/article/152-creating-a-twilio-sms-bot
Going through that process will create a URL that you will apply to your Twilio number or messaging service. That URL is the webhook URL that Twilio will use to send details about incoming messages so that your bot can respond to replies from your user.
Let me know if that helps!

How do I start an Twilio Autopilot chat session without the user needing to greet the bot?

How can Twilio Autopilot chatbot initiate a session with a user without the user greeting the bot?
I've tried exploring using Twilio Studio to kick off the conversation, but our application requires that the first interaction in the sequence must be a Collection Action. I can't seem to kick off that Collection Action without the user having greeted the bot.
An example would be that every day we would message the user with a question: "How many bananas did you eat today?". The user would then respond and Autopilot would parse the data and send to our system. The question can't be hardcoded in Studio because it will be dynamically generated on a daily basis. The question must be a Collection Action.
Twilio developer evangelist here.
Welcome to StackOverflow!
You can initiate a session with the user without the user greeting the bot by connecting the trigger widget's Rest API trigger event to either a make outgoing call or send message widget, as shown below.
Then, if the call is answered or the message is sent, you can connect those actions to the Send to Autopilot widget.
Lastly, under the config section of your Send to Autopilot widget, put in the Collection task you want to run when the outbound call or message is initiated by your Twilio client and not the user.
Let me know if this helps :D

twilio stop receiving messages

We are using twilio service to send messages to our customers. We want to provide STOP receiving messages option to our customers.
So when a customer replies STOP, he/she should stop receiving messages. I think twilio has a blacklist to stop sending messages to a customer if the customers chooses to.
However, as an organization, we also want to know if a customer opted out of receiving messages.
How will twilio tell us that a customer opted out of receiving messages? How can we add a web hook such as a rest endpoint in twilio? Is this usecase possible in twilio?
Twilio evangelist here.
This article explains our default keyword handling: https://support.twilio.com/hc/en-us/articles/223134027-Twilio-support-for-opt-out-keywords-SMS-STOP-filtering-
tl;dr If someone texts STOP to your Twilio number we add them to our blacklist then pass the message on to you via the normal webhook process.
Hope that helps.

When connecting Twillio to my Bot, the Twilio device gets 404 when trying to post received sms

I connected Twilio connector to my registered Bot.
Whenever I send a sms to my Twilio number, I can see in the logs that Twilio service gets 404 when trying to post a message to
https://sms.botframework.com/api/sms
The bot itself works well. I can test it with the webchat iframe or through the test console. But it seems that the Twilio integration to the bot framework is broken
Twilio developer evangelist here. I've just been through the process and was able to get my messages sent to & from my bot.
The fact that your unable to do that suggests you missed a step in the configuration, so I will try and describe what I did here to see if it helps you out.
Created a TwiML application here and set its messaging url to https://sms.botframework.com/api/sms
Purchased a phone number and changed the messaging section to use my TwiML app.
Added my twilio credentials and twilio phone number to the SMS config section as follows:
One thing I noticed is that when Twilio makes a request to this URL to send an SMS, the url returns a 502.
But according to a Microsoft employee this is "harmless".
Let me know if this helps you at all, or if you still need any help.

Resources