Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var botId = "5ec0435908007b6b8cd85190b1";
- function sendText(text){
- UrlFetchApp.fetch("https://api.groupme.com/v3/bots/post", {"method":"post", "payload":'{"bot_id":"' + botId + '","text":"' + text + '"}'})
- }
- function doPost(e){
- var post = JSON.parse(e.postData.getDataAsString());
- var text = post.text;
- var user_id = post.user_id;
- var name = post.name
- if (text.indexOf("changed name to") > -1 && user_id == 0)
- sendText("Welcome to Groupme");
- }
- function doGet(){}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement