function myFunction() {
var WK_ROOM_ID = "(ROOMID)";
var WK_TOKEN = "(TOKEN)";
var WK_TEXT = "Chatworkにメッセージを送るGASスクリプト";
// 送信データ
var params = {
headers : {"X-ChatWorkToken" : WK_TOKEN},
method : "post",
payload : {
body : WK_TEXT
}
};
var url = `https://api.chatwork.com/v2/rooms/${WK_ROOM_ID}/messages`;
UrlFetchApp.fetch(url, params);
}
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme