View difference between Paste ID: kxnTvbd2 and QCdybqAM
SHOW: | | - or go back to the newest paste.
1
var botId = "5ec0435908007b6b8cd85190b1";
2
function sendText(text){
3
  UrlFetchApp.fetch("https://api.groupme.com/v3/bots/post", {"method":"post", "payload":'{"bot_id":"' + botId + '","text":"' + text + '"}'})
4
}
5
6
function doPost(e){
7
  var post = JSON.parse(e.postData.getDataAsString());
8
  var text = post.text;
9
  var user_id = post.user_id;
10
  var name = post.name
11
  
12-
  if (text.contains("changed name to")&& user_id == 0)
12+
  if (text.contains("changed name to"))
13
     sendText("Welcome to Groupme");
14
}
15
16
function doGet(){}