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.
| Category | Collaboration |
| Direction | Query source |
| Sign-in | Slack App Token |
| Query languages | SQLite |
| Tables | 8 |
| Query templates | 33 |
| Website | slack.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.
- Sign in to Slack, go to https://api.slack.com/apps, and select Create New App › From scratch.
- Enter an app name and select your workspace.
- Under Add features & functionality, select Permissions, scroll to Scopes › User Token Scopes, and add the read scopes listed below.
- Scroll up to OAuth Tokens for Your Workspace and install the app to your workspace.
- Copy the user OAuth token. It starts with
xoxp-.
Permissions:
team:readchannels:read,groups:read,im:readandmpim:readfor conversations and membersusers:readandusers:read.emailfor usersusergroups:read,emoji:readandsearch:readadminfor access logs, which requires a paid Slack plan
- 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.
Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.
Connect Slack
- Go to Connections and click New connection, or click New connection on the Slack product page.
- On Product, pick Slack and choose the Owner.
- On Details, give the connection a Name and, optionally, a Description.
- On Connect, fill in the settings and credentials described below.
- 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:
| Field | Required | Notes |
|---|---|---|
| Slack App Token | Yes | Secret — 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:
| Language | Use it for |
|---|---|
| SQLite | SQL 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.
| Query | Finds |
|---|---|
| Sync users | user, account |
| Sync channels | group, account, user |
Tables
Slack adds 8 tables. Browse their columns from Schema in the query bar's ⋯ menu.
All 8 tables
| Table | Contains |
|---|---|
slack_access_log | Logins to Slack, grouped by User, IP and User Agent. |
slack_connection | Information about the connection to the Slack workspace. |
slack_conversation | Unified interface to all conversation like things including public channels, private channels, direct messages, group direct messages and shared channels. |
slack_conversation_member | Retrieve members of a conversation. |
slack_emoji | Slack emoji installed in the workspace. |
slack_group | Slack workspace user groups. |
slack_search | Search slack for anything using a query. |
slack_user | Slack workspace users. |
Next steps
- Connections — health, credentials and settings after you connect
- Query languages — syntax, parameters and time ranges
- Chatting with Scout — ask questions without writing a query
- All integrations — the rest of the catalog