[Easy] [With images] How to send automatic notifications to chatwork with GAS
Hello! My name is Yuki from the System Solutions Department.
This time, I will explain how to easily send automatic notifications to chatwork using GAS.
▼Background of setting automatic notification (You can do it without reading, so if you are in a hurry, please skip it.LOL)
The reason I set up automatic notifications was before the team evening meeting (a meeting in the evening where each team confirms the progress of tasks, etc.).
We decided to automatically send a message to all team members to remind them to take stock of their tasks.
I wanted to set it up without any effort (in a good way), so I tried setting up automatic notifications using GAS, which seemed easy.
Automatic notification was much easier than I expected, so I decided to blog about it.
Now, on to the main topic, you can easily send automatic notifications to chatwork by simply following the steps ① to ⑩ below.
Practice! !
①Open google drive
② Select “+New” > Other > “Google App Script”
③Use the old editor if the new editor is available
⇒ "Use previous editor" > Answer the questionnaire and "Send"
⇒It is OK if the screen looks like the image below.
④ Select “File” > “Rename” and give it an easy-to-understand name.
⑤ "Resource" > "Library" > Enter "M6TcEyniCs1xb3sdXFF_FhI-MNonZQ_sT" > "Add"
⑥ Select the latest version > “Save” > If text surrounded by a yellow frame appears on the screen, it is successful.
⑦Copy and paste the text below and enter it.
function chatNotify() {
var client = ChatWorkClient.factory({token: "Enter your Chatwork API token here (belongs to the user you want to send automatic notifications to)"});
client.sendMessage({
room_id: This is where you want to receive chat notifications Enter the group chat ID,
body:
"Enter the content you want to be automatically notified here"});
}
※How to get a Chatwork API token
⑧Save
⑨ Select “Current project trigger” with the clock mark
⑩ Set the date and time to send automatic notifications from “+Add trigger”
*Multiple triggers can be added, so more detailed notification settings can be made by combining several triggers.
That's it.
(This is a simple article because I only wrote what I wanted to convey.LOL)