Setup voice response on twilio with appscript

150 views
Skip to first unread message

Le pirate noir

unread,
Jul 3, 2022, 9:09:17 PM7/3/22
to Google Apps Script Community
I bought a twilio phone number and i would like to setup a voice response with appscript when someone call that number. 

Here what i tried, but doesn't work

function doGet() {
var t = HtmlService.createHtmlOutputFromFile("twiml")
 var content = t.evaluate().getContent();
  return ContentService.createTextOutput(content).setMimeType(ContentService.MimeType.XML)
}

html
<Response> 
  
  <Gather timeout="3" >
    
  <Say voice="man" language="en-us"> Welcome to John auto parts. 
To leave us a message click on 1
To cancel an appointment, press 2.
  </Say>
        
     </Gather>

  <Say voice="man" language="en-us">We didn't receive any anwers from you. Bye !</Say>
  
</Response>

Reply all
Reply to author
Forward
0 new messages