Стать бот-провайдера с ботом бот Либре облачной платформы
Bot Libre Forum

Sending message via email

по webdesigncornwall опубликовано Dec 29 2016, 15:23

i am trying to use the escalate email script but am having no luck modifying it.

so basically the escalate email is triggered by typing escalate it then asks if you want to escalate then asks for an email address.

I instead want it to be triggered by leave a message and i want it to ask for the message. Then simply send an email to my email, with subject message left, and a body containing the message.

the problem with the email escalate template is it will only accept an email address i do not wish to collect the customers email though.

also is there anyway for a facebook bot to apply labels to a facebook conversation. when using the messenger on facebook business page you can tag a message follow up etc. can i do this through my bot? or is there a way i can capture the facebook message url to include in my email so i can click on it to reply through facebook?


by admin posted Dec 29 2016, 16:49
You could use something like,

pattern "leave a message" template "What is your message?";
pattern "*" that "What is your message?" answer sendEmail();

function sendEmail() {
 Email.email("me@myplace.com", "Message", sentence);
 return "Email sent";
}


For Facebook, I don't think this information is available from the Facebook API.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 618, today: 1, week: 2, month: 2

by webdesigncornwall posted Dec 29 2016, 18:15
I am going to try this later tonight. i am analytical though so i have to ask where does sentence variable come from? and also would it be possible for me to collect multiple "messages" and concat them into one message var to pass to email.Email?

Thumbs up: 1, thumbs down: 0, stars: 5.0
Views: 520, today: 0, week: 1, month: 1

by admin posted Dec 29 2016, 20:57
There are a few global variables available in scripts.
  • input - the input object
  • sentence - the input sentence
  • speaker - the input speaker/user
  • conversation - the current conversation

Updated: Dec 29 2016, 20:57
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 464, today: 0, week: 0, month: 0

Идентификатор: 15043088
Опубликовано: Dec 29 2016, 15:23
Ответы: 1
Вид: 586, сегодня: 1, неделю: 5, месяц: 5
Я уверен, что
Вывесить флаг как оскорбительное, или в нарушение правил сайта