0

I've digitize a word document form by creating a chatbot on Azure Bot framework. I'm stuck now.

How do I get it to package all the responses from the user into a document and send the document to my email?

xorion
  • 1
  • A Bot Framework bot is just a web API application. You would write to a file and send an email the same way you would in any similar application. – D4RKCIDE Sep 21 '17 at 20:59
  • Got it, do you have some code reference i can use? – xorion Sep 23 '17 at 16:33
  • https://stackoverflow.com/questions/7569904/easiest-way-to-read-from-and-write-to-files and https://stackoverflow.com/questions/9201239/send-e-mail-via-smtp-using-c-sharp are good places to start. – D4RKCIDE Sep 23 '17 at 18:21

1 Answers1

0

If you're using web as an integration channel then you should be able to do something like this. I have directly taken everything present in conversation-area & sent it as html file in mail. If you're willing to send a file, you should write it in file & email it.

var useremail = JSON.stringify(response.result.parameters.email[0]);
var obj = document.getElementById("conversation-area").innerHTML;
var str = "<html><head></head><body>";
str += obj + "</body></html>";
email(useremail, str);
Tejas Bramhecha
  • 880
  • 5
  • 19