Skip to main content
Query and analyze your team’s Slack messages, channels, and engagement patterns directly through Ana.
The Slack API Connector covered in this guide is separate from the Slack integration used in Playbooks. For Playbooks setup, see the Slack Integration.

1. Overview

The Slack connector links your workspace to Ana, enabling her to search messages, post to channels, DM users, and surface engagement patterns across your team’s conversations. Ana can answer questions about communication trends, track topic activity over time, and identify patterns across public channels and direct messages based on the permissions granted. Note that Ana’s access is limited to the channels and message history your Slack plan and permission settings allow.
Quick Summary: Create a Slack app in your workspace, configure the required OAuth scopes, and store the bot token as an API Connector in TextQL.

2. Prerequisites

You’ll need:
  • Slack account with access to the channels and data you want Ana to query
  • Admin access in your Slack workspace to create and install a Slack app
  • Enterprise Grid admin access if you are setting up an Org-level OAuth integration
  • A TextQL account with permission to add API connectors

Which type of connection should I use?

TextQL supports three ways to connect to Slack depending on how much access Ana needs: API Token, OAuth Org-Level, and OAuth Per-Member.
API TokenOAuth Org-LevelOAuth Per-Member
Best forSmall teams, quick setupEnterprise Grid orgsTeams needing per-user permissions
Access scopePublic channels + channels bot is invited toAll workspaces across the orgEach user’s personal channels and DMs
Slack plan requiredAnyEnterpriseAny
Admin requiredWorkspace AdminOrg AdminWorkspace Admin + each user must authorize
Ana acts asBot userBot user across orgIndividual members
Access to DMsNoSend, not readSend and read
Access to private channelsOnly if invitedOnly if invitedYes, per user

3. Capabilities

Once configured, Ana can:
  • Find information across channels, threads, and conversations
  • Post messages and send DMs on your behalf
  • React to and comment on messages within channels and threads
  • Analyze engagement patterns, message volume trends, and topic activity over time
  • Identify how team members interact across channels and track participation patterns
  • Access channel lists, membership, and workspace metadata to provide organizational context
The integration uses OAuth 2.0 or bot token authentication based on the connection type you select.

4. Setup Instructions


Step 1. Create your Slack App

  1. Go to api.slack.com/apps and click Create New App
  2. A pop-up will appear — click From Scratch
  3. Choose an app name (e.g. “Ana” or “TextQL Integration”)
  4. Pick the workspace you want Ana installed in
  5. Click Create App
You must have Admin or Owner permissions in the workspace you’re installing the app to. If you don’t have access, contact your Slack workspace admin.

Step 2. Configure OAuth & Permissions

Redirect URLs configuration in Slack OAuth & Permissions
  1. In the left sidebar, go to OAuth & Permissions
  2. If you are creating an OAuth Org-Level or Per-Member connection, scroll down to Redirect URLs and add https://app.textql.com/auth/api-oauth/callback. Click Save.
  3. Scroll down to Scopes and add your desired permissions (see recommended scopes table below — if you are unsure, add all Core scopes)
    • For API Token or OAuth Org-Level, add permissions under Bot Token Scopes
    • For OAuth Per-Member, add permissions under both Bot Token Scopes and User Token Scopes
ScopeDescriptionUse Case
channels:readSee public channelsCore
channels:historyRead messages in public channelsCore
chat:writePost messages as the botCore
reactions:writeAdd emoji reactionsCore
users:readView people in the workspaceCore
team:readView workspace infoCore
files:readView shared filesRead
files:writeUpload and edit filesWrite
groups:readView private channelsPrivate Channel
groups:historyRead private channel messagesPrivate Channel
im:readView DMsPer-Member
im:historyRead DM messagesPer-Member
mpim:readView group DMsPer-Member
mpim:historyRead group DM messagesPer-Member
search:readSearch across the workspacePer-Member

Step 3. Get your Credentials

API Token: On the same OAuth & Permissions page, scroll up to OAuth Tokens and click Install to Workspace. Authorize the app and copy the xoxb- token that is generated. OAuth Org-Level & Per-Member: In the left sidebar, go to Basic Information and copy your Client ID and Client Secret.

Step 4. Connect in TextQL

Slack connector in the TextQL API connectors grid
  1. Click Connectors in the bottom left corner
  2. In the left sidebar, click APIs then select Slack
  3. Fill in a name for your connection
  4. Select your authentication type — API Token, OAuth Org-Level, or OAuth Per-Member
  5. Paste your bot token, or your Client ID and Client Secret for OAuth methods
  6. For OAuth methods, scroll down and click Authenticate
  7. A popup will appear asking for permissions to access your workspace — click Allow
  8. Click Save

Step 5. Add the App to your Slack Channels

  1. In the workspace you installed the app to, open your desired channel and click the channel name at the top → IntegrationsAdd an App
  2. A popup with different app connections should appear — your app should be near the top under In Your Workspace
After adding the app, Slack will say “Invites have been sent!” — this is just a generic message, your app is already connected.

Step 6. Verify the Connection

Once saved, confirm that the connector is active:
  1. In Connectors → APIs, check that Slack appears in your list of active connectors
  2. Open a new Ana chat and ask a simple query, such as: “What was the most recent message sent to #channel?”
  3. If Ana returns results, the connection is working. If you see an error, refer to [Section 6: Troubleshooting]

5. Usage Examples

Once configured, you can ask Ana:
  • “How many messages were sent in #general this week compared to last week?”
  • “Which channels have been the most active in the last 30 days?”
  • “Who are the most engaged members in #product and what topics are they discussing?”
  • “Summarize the key decisions made in #engineering over the past month”
  • “Which team members haven’t been active in any channels in the last two weeks?”
  • “Send a message to Sam saying what are your blockers?“

6. Troubleshooting

SymptomLikely CauseFix
”This app doesn’t have a bot user to install” when clicking AuthenticateNo bot token scopes added, or only user token scopes were configuredGo to OAuth & Permissions → scroll to Bot Token Scopes → add at least one scope
”Missing scope” error when querying AnaRequired scopes weren’t added during setupGo to OAuth & Permissions → add the missing scopes from the recommended list in Step 2
OAuth flow not completing when clicking AuthenticateRedirect URL not added or incorrectGo to OAuth & PermissionsRedirect URLs → confirm https://app.textql.com/auth/api-oauth/callback is saved
”not in channel” error when Ana tries to access a channelThe bot hasn’t been added to that channelGo to the channel in Slack → click the channel name → IntegrationsAdd an App

7. Security Notes

  • Bot tokens don’t expire by default. User tokens are tied to the authorizing user and will lose access if that user is deactivated or removes the app. If you opted into token rotation on Slack, tokens will automatically refresh in your app code
  • Avoid using legacy bot tokens or legacy custom integration tokens — these are deprecated and use an umbrella permission model that grants broader access than necessary. Always use the newer granular bot token scopes
  • Your token, Client ID, and Client Secret are stored encrypted in TextQL and are never exposed in Ana’s responses
  • For more information on token types, scopes, and security best practices, visit Slack Developer Docs
  • To disconnect the bot, go to your Slack workspace → Settings & AdministrationManage Apps → find your app → click Remove. For Per-Member, individual users can revoke their own access at slack.com/account/connected-apps. Then delete the connector in TextQL under Connectors → APIs

Need Help?

For further assistance, please contact support@textql.com.

Privacy Policy

For information about how we handle your data and protect your privacy, please review our Privacy Policy.