Slack Configuration#
Authentication#
Create an app at Slack API Apps.
Add the required bot scopes under OAuth & Permissions.
Install the app in the Slack workspace.
Copy the Bot User OAuth Token into an environment variable.
Required Permissions#
Add these bot scopes:
channels:readgroups:readteam.preferences:readteam:readusergroups:readusers.profile:readusers:readusers:read.email
Configure Cartography#
Use --slack-token-env-var to provide the name of the environment variable containing the bot token.
Run Cartography#
export SLACK_BOT_TOKEN='<bot-user-oauth-token>'
cartography \
--selected-modules slack \
--slack-token-env-var SLACK_BOT_TOKEN
Advanced Configuration#
By default, Cartography ingests every Slack workspace associated with the token. To limit ingestion, use --slack-teams with a comma-separated list of team IDs.
To find a team ID, open https://<your-team>.slack.com in a browser. Slack redirects to a URL in the form https://app.slack.com/client/<your-team-id>.