slack

Updated: CLI Tool - gislack

gislack is a CLI tool to submit files to both Gist and Slack. v1.0.4 (February 27, 2021) I noticed that this application uses the duplicated methods of Slack API. Ref By this, the duplicated methods were updated to the new methods as follows. From “channels.list” to “conversations.list”. From “channels.history” to “conversations.history”. Please check it out. https://github.com/tanaikech/gislack

Uploading Image Files to Slack Using Incoming Webhooks by Google Apps Script

Gist This sample script is for uploading image files to Slack using Incoming Webhooks by Google Apps Script. When users try to upload image files to Slack using Incoming Webhooks, it has been known that although the access token is required to directly upload them, Incoming Webhooks can upload them by using the tag of image_url. In this sample script, it uploads image files (BMP, GIF, JPEG and PNG) on Google Drive to Slack using Incoming Webhooks.

Multipart-POST Request Using Node.js

Gists Here, I introduce 2 scripts for uploading files to Slack using Node.js as samples. These 2 sample scripts are for uploading files to Slack. Sample script 1: You can upload the zip file by converting byte array as follows. At first, it builds form-data. Adds the zip file converted to byte array and boundary using Buffer.concat(). This is used as body in request. Basically, this is almost the same to the method using GAS.

Sublime Text Plugin - gislacks

Overview This is a plugin of Sublime Text 3 for submitting files to both Gist and Slack. Description I like to use Sublime Text for developing scripts. And when I discuss about developing scripts, I often use Slack. When I submitted a script to Slack, I had saved the script to Gist as a backup. I had done manually this on my browser. Namely, I wanted to be saving the revision of script while I’m discussing about the script at Slack.

CLI Tool - gislack

Overview This is a CLI tool to submit files to both Gist and Slack. Description When I discuss about developing scripts, I often use Slack. When I submitted a script to Slack, I had saved the script to Gist as a backup. I had done manually this on my browser. Namely, I wanted to be saving the revision of script while I’m discussing about the script at Slack. Recently, I wished this process had been able to be automatically run.

Changing Slack Status using Google Apps Script

This script changes slack status using GAS. If you want to change it on time you decided, it can be achieved by installing this method as a trigger. In order to use this, the required scope is users.profile:write. function setSlackStatus(token, user, status_text, status_emoji) { return UrlFetchApp.fetch( 'https://slack.com/api/users.profile.set', { method: 'post', payload: { token: token, user: user, profile: JSON.stringify({status_text: status_text, status_emoji: status_emoji}) }, muteHttpExceptions: true } ).