Last active
December 6, 2018 14:19
-
-
Save yhay81/ac778211fc6b0ecc7e950f76009a9729 to your computer and use it in GitHub Desktop.
Google Apps Script 用 Slack API ライブラリ作った ref: https://qiita.com/yhay81/items/edf74af8efe3d3d1a1b5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var token = 'xoxb-34...みたいなトークン'; | |
var slack = GASlacker.methods(token); | |
function doPost(e){ | |
var event = JSON.parse(e.postData.contents).event; | |
if(event.text.match(/hello/)){ | |
var text = "Hello," + event.message.username; | |
slack.chat.postMessage(event.channel, text); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var token = 'xoxb-34...みたいなトークン'; | |
var slack = GASlacker.methods(token); | |
function doPost(e){ | |
var event = JSON.parse(e.postData.contents).event; | |
if(event.text.match(/hello/)){ | |
var text = "Hello," + event.message.username; | |
slack.chat.postMessage(event.channel, text); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment