slackteams
is a part of slackverse
slackcalls |
||
slackthreads |
slackteams ⬅️➡️ |
slackblocks ⬇️ |
slackreprex |
slackteams
is an R
package that allows the user to manage multiple
Slack teams during a session.
The package queries the slackr-app database to set the environment variables needed by slackr.
remotes::install_github("yonicd/slackteams")
The following button will create a Slack incoming webhook with the correct scope to your Slack team.
- Click the button
- Select the team to install the application
- Select the default channel to post to (this can be changed later)
- If successful a
SLACK_KEY_ID
will be returned. 👈 🚨 Keep this Key 🚨 - If not successful an error message will be returned.
- To keep the data safe you need your team
MEMBERID
to authenticate theSLACK_KEY_ID
. How to locate your Member ID - Paste the output into a json file. Default path that
slackteams
looks for the file is~/.slackteams
.
This is an example of the json file. Here we have 2 teams: slackr
and
r4ds
. Each one contains a key
(from
slackr-app) and the paired user
memberid
.
{
"slackr": {
"key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"memberid": "UABC123"
},
"r4ds": {
"key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"memberid": "UXYZ456"
}
}
library(slackteams)
slackteams::load_teams()
slackteams::activate_team('r4ds')
slackr::slackr('My Spiffy Message')
slackteams::activate_team('slackr')
slackr::slackr('My Other Spiffy Message')