Skip to main content

Slack

Slack is a cloud-based team collaboration and workplace communication platform that enables organizations to communicate through channels, direct messages, and group conversations. This integration provides comprehensive access to Slack workspace data, allowing you to query and analyze team communications, user activity, workspace configuration, and security-related information.

CategoryCollaboration
DirectionQuery source
Sign-inSlack App Token
Query languagesSQLite
Tables8
Query templates33
Websiteslack.com

Before you start​

Huntbase signs in to Slack with Slack App Token. Create the credential in Slack first, then keep it to hand for the Connect step.

  1. Sign in to Slack, go to https://api.slack.com/apps, and select Create New App › From scratch.
  2. Enter an app name and select your workspace.
  3. Under Add features & functionality, select Permissions, scroll to Scopes › User Token Scopes, and add the read scopes listed below.
  4. Scroll up to OAuth Tokens for Your Workspace and install the app to your workspace.
  5. Copy the user OAuth token. It starts with xoxp-.

Permissions:

  • team:read
  • channels:read, groups:read, im:read and mpim:read for conversations and members
  • users:read and users:read.email for users
  • usergroups:read, emoji:read and search:read
  • admin for access logs, which requires a paid Slack plan
Watch out for
  • If you add scopes later, reinstall the app to the workspace for them to take effect.
  • The scopes above are user token scopes, so copy the user token (xoxp-), not a bot token.

For the vendor's own instructions, see Slack token documentation.

tip

Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.

Connect Slack​

  1. Go to Connections and click New connection, or click New connection on the Slack product page.
  2. On Product, pick Slack and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Credentials​

The only Method is Slack App Token. Enter a Credential label (for example Production), then fill in:

FieldRequiredNotes
Slack App TokenYesSecret — not shown again after you save it.

Query it​

Once connected, Slack can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 8 tables listed below, alongside every other connected source.

Example: SQLite​

List all users (includes deleted) — Explore all user profiles, including those that have been deleted, to gain a comprehensive view of a Slack workspace's user history.

select
*
from
slack_user;

Slack ships with 33 query templates. Find them in Library › Queries — see Query templates.

What syncs automatically​

Slack comes with a content pack. These queries run on a schedule on each new connection so the entities they find appear in the Activity Feed without you asking. You can turn syncing off from the connection's Synchronisation Settings card.

QueryFinds
Sync usersuser, account
Sync channelsgroup, account, user

Tables​

Slack adds 8 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 8 tables
TableContains
slack_access_logLogins to Slack, grouped by User, IP and User Agent.
slack_connectionInformation about the connection to the Slack workspace.
slack_conversationUnified interface to all conversation like things including public channels, private channels, direct messages, group direct messages and shared channels.
slack_conversation_memberRetrieve members of a conversation.
slack_emojiSlack emoji installed in the workspace.
slack_groupSlack workspace user groups.
slack_searchSearch slack for anything using a query.
slack_userSlack workspace users.

Next steps​