Currently my bot is on Facebook messenger, used by employees. I'd like my bot to send one SMS to a person to welcome him / her to our team and with its credentials.
I know Microsoft Bot Framework integrates Twilio, so I integrated Twilio channel following this: https://docs.microsoft.com/en-us/bot-framework/channel-connect-twilio, so I have a phone, and everything is well configured because I can send manually SMS (from the Twilio's dashboard), it works.
Problem is that I don't know how to use it right now, in the bot.
const confirmPerson = (session, results) => {
try {
if (results.response && session.userData.required) {
// Here I want to send SMS
session.endDialog('SMS sent ! (TODO)');
} else {
session.endDialog('SMS cancelled !');
}
} catch (e) {
console.error(e);
session.endDialog('I had a problem while sending SMS :/');
}
};
How to achieve this ?
EDIT: Precision, the person welcoming employee is a coach, just sending SMS from bot with the credentials to use in the webapp the bot connects after first usage by the user welcomed