How to send text message through DialogFlow? - dialogflow-es

I tried looking all over the internet on how to setup and send text message(sms) through Dialogflow.
I am building an app where the Bot asks the user for their number and sends them a text message. Is there a tutorial? or anyone guide me I appreciate it?

As suggested by Nikhil, you need to use twillio APIs to send the SMS.
Here is how it will work:
Dialogflow will ask user for phone number and store it in a parameter
Dialogflow will pass the phone number to the Webhook
The Webhook will make an API call to the Twillio API with above phone number
Twillio will send the sms
Webhook can return some success message to the Dialogflow
Dialogflow will return the message to the user.
Here is a link to the tutorial I have created for understanding dialogflow webhooks: https://www.youtube.com/watch?v=1cD9vU7Ubyg
You can refer to this link for sending sms in PHP via Twillio: sending sms via twilio in php

Related

How to receive a SMS on phone with a ticket number through Dialogflow?

I have created an agent on Dialogflow like a help desk, While making a service request the user enters his phone number.At the end of the conversation the bot says "you'll receive your ticket number via SMS on your entered mobile number".
How do I make it so that I received a text on my mobile number through Twilio with a random ticket number ?
Twilio developer evangelist here.
I believe that in Dialogflow if you want to run some code in response to an intent then you need to setup fulfillment using a webhook. That way you can build a webhook that uses the Twilio API to send the SMS and then responds with the message "you'll receive your ticket number via SMS...".
The Dialogflow docs on fulfillment via webhook has a tutorial on how to build this out. I would recommend reading through that and implementing your own fulfillment webhook.

is it possible to send broadcast messages using Twilio whatsapp API

I am trying to integrate Twilio WhatsApp API with my application, is it possible to send broadcast messages using Twilio.
Twilio developer evangelist here.
You can send outbound messages over WhatsApp using Twilio. There are some constraints though.
You need to get your users to explicitly opt in to receive WhatsApp messages
When you send a notification to a user, if it is more than 24 hours since the user sent you a message you can only send approved template messages.
Twilio Notify does not support WhatsApp, so to broadcast messages to a group of users you will need to make one API request per message using the regular Twilio messaging API.
Let me know if that helps at all.

Not Receiving SMS in Twilio

I need to fetch SMS Response sent from Twilio using web hook using Twilio trial account credentials. In that, generated number is from US. And sms is sending from India number. And when message is sent back to Twilio that is not shows in incoming messages and not call the webhook url also.
I created app in twiml. And set webhook url in that also. But doesn't work.
For web hook I am using ngrok so in my local server so I can get data.
Any one have idea what is wrong I am doing.
EDITED
I have created testing twilio account. Generated number and the generated number is from US. I have set up webhook url in manage numbers.
URL is generated from ngrok so It can be used outside my network.
I have setup Twiml App also. And webhook url is also set there.
I am sending one programmable message from my node api. And that was working fine. User is getting programmable message but when user reply to that message it should call my webhook url. But it not calling my webhook url and also it not showing in my incoming message.
Thanks for any help.
For those who are struggling with this,
As of now Twilio not supports 2-way messaging in India.
Please refer this for more details.
Twilio Guidelines for India

Twilio API for WhatsApp

I'm testing the Twilio API for WhatsApp, responding to incoming messages with TwiML.
In the request I can retrieve the sender's phone number, but is it also possible to retrieve the sender Whatsapp nick name?
It is also possible activate the typing indicators?
Twilio developer evangelist here.
The inbound Twilio webhook for WhatsApp does not support the sender nickname and you can't set or receive typing indicators at the moment.

how to use email channel in microsoft bot builder

Currently i am using slack channel with bot builder.
I want to use email channel, is there any sample code for this.
What is effective way to send email from bot to avoid spam
I am using node js
There's no extra code needed for the email channel. Your bot will reply to the body of an email it receives. You can add things like channel specific code if you like. Right now only office 365 emails will work, please read the documentation here
The bot will reply to an email sent to the registered email address with an email where the body is the same message that you would see as a response in other channels like slack, emulator, etc

Resources