I already developed applicaton for google app script that can send email messages, but right now there is a need for me to send gtalk chat/xmpp message to user from my script. my question is, is it possible for me to send gtalk chat/xmpp message directly from google app script? if it is not possible then is there any work around about this?
Basically, there are two types of messages you can automate through the App script.
Let's talk about Asynchronous
You can do it by Using incoming webhooks.
function myFunction() {
var WebWhooklink = "PEST_YOUR_WEBHOOK_URL_HERE"
var message = { text: "Hello Chat"};
var payload = JSON.stringify(message);
var options = {
method: 'POST',
contentType: 'application/json',
payload: payload
};
var response = UrlFetchApp.fetch(WebWhooklink, options ).getContentText();
}
There is no built-in support for sending Google Chat messages. You can file a feature request on the issue tracker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With