Skip to content
/ sasm Public

Send A Slack Message (SASM).

License

Notifications You must be signed in to change notification settings

030/sasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SASM

Send A Slack Message (SASM).

Create an App, Channel and Slack token

  • Navigate to Your Apps
  • Click on Create New App
  • From scratch
  • Choose an App Name
  • Pick a workspace to develop your app in
  • Create App
  • Add features and functionality: Permissions
  • Add an OAuth Scope in the Bot Token Scopes: chat:write
  • Install to Workspace
  • Create a channel and invite the bot
  • Navigate to Your Apps again
  • Click on app that you created
  • Click on OAuth & Permissions
  • Copy Bot User OAuth Token

Configure sasm

Create a directory:

mkdir ~/.sasm

Create a config file:

vim ~/.sasm/config.yml

Add a Slack token:

---
slack_channel: someSlackChannelID-clickOnChannelAndCopyTheID
slack_token: someSlackToken

Save the file. Update the permissions to ensure that you are the only one that is able to read and write to the config file:

chmod 0600 ~/.sasm/config.yml

Troubleshooting

FATA[0000] channel_not_found

Add the created bot to the channel by inviting it.