AnswerLoopsAnswerLoops Docs
Self-Hosting

Slack App Setup

Set up Slack for AnswerLoops — 1-click OAuth or polling mode (no webhook, no admin required).

AnswerLoops offers two Slack connection paths. Both feed into the same AI pipeline. Pick based on your security posture.

1. Create a Slack App

  1. Go to api.slack.com/appsCreate New AppFrom scratch
  2. Name it (e.g. "AnswerLoops") and select your workspace

2. Configure OAuth scopes

Go to OAuth & PermissionsBot Token Scopes and add:

  • channels:history
  • channels:read
  • channels:join
  • chat:write
  • reactions:write
  • users:read

channels:join lets AnswerLoops add the bot to a public channel automatically the moment you select it in the channel picker — without it, Slack never adds the bot to a channel on its own, so conversations.history fails with not_in_channel and messages silently never ingest. Private channels are a hard Slack platform limit either way: a bot can never join one on its own, so those still need a human to add the app via the channel's Integrations → Add apps. users:read resolves a message's raw user ID to a display name — without it, tickets show an opaque ID (e.g. U0BMB9H6SFQ) instead of a name.

Already connected before August 2026? Slack scopes aren't retroactive — your existing bot token keeps its old scopes until you reauthorize. Go to Settings → Integrations → Slack, click Disconnect, then Add to Slack again to pick up users:read and start showing real names. Until then, tickets keep showing the raw user ID exactly as they do today — nothing breaks either way.

3. Add redirect URL

Go to OAuth & PermissionsRedirect URLs and add:

https://your-domain.com/api/slack/callback

Replace your-domain.com with your AUTH_URL value.

4. Get credentials

Go to Basic InformationApp Credentials and copy:

SLACK_CLIENT_ID=<your-app-id>.<your-workspace-id>
SLACK_CLIENT_SECRET=<your-client-secret>
SLACK_SIGNING_SECRET=<your-signing-secret>
AUTH_URL=https://your-domain.com

5. Connect in AnswerLoops

Go to Settings → Integrations → SlackAdd to Slack. Authorize the workspace. The channel picker loads automatically.

6. (Optional) Enable real-time Events API

By default AnswerLoops polls for new messages. For instant delivery:

  1. Event Subscriptions → Enable Events → Request URL: https://your-domain.com/api/slack/events
  2. Subscribe to bot events: message.channels, reaction_added

Events API requires a public HTTPS URL. If your deployment is behind a firewall or VPN, use polling mode — same pipeline, no inbound connections needed.


Option B: Polling mode (no admin, no webhook)

Designed for teams that cannot expose a public webhook URL, cannot get security approval for inbound HTTP from Slack, or simply prefer outbound-only connections.

What you don't need:

  • No public-facing URL
  • No inbound firewall rules
  • No admin approval
  • No signing secret

The bot reaches out to Slack's API on a schedule — Slack never calls back.

1. Create a Slack App (minimal scopes)

  1. Go to api.slack.com/appsCreate New AppFrom scratch
  2. Name it and select your workspace
  3. OAuth & PermissionsBot Token Scopes — add only:
    • channels:history
    • channels:read
    • channels:join
    • chat:write
    • reactions:write
    • users:read

2. Install and copy token

Click Install to WorkspaceAllow. Copy the Bot User OAuth Token (xoxb-...).

3. Get Team ID and Channel IDs

  • Team ID: your workspace URL — https://app.slack.com/client/T0123ABCDE — the T… part
  • Channel IDs: right-click a channel → Copy link — last segment (e.g. C01234ABCDE)

4. Connect in AnswerLoops

Go to Settings → Integrations → Slack → click Set up manually instead. Enter the bot token, team ID, and channel IDs.

5. (Optional) Adjust poll interval

SLACK_POLL_INTERVAL_SECONDS=60  # default. Minimum recommended: 30.

Polling uses conversations.history with cursor-based deduplication — messages are never processed twice even if polls overlap.


Invite the bot to channels

For public channels, selecting them in Settings → Integrations → Slack's channel picker joins the bot automatically — no manual step needed, as long as the channels:join scope above is granted.

Private channels can't be auto-joined by any bot — that's a Slack platform limit, not an AnswerLoops one. Add the app manually: open the channel → Integrations tab → Add apps → select your Slack app (more reliable than /invite @YourBotName, which doesn't always work for bot users depending on workspace settings).

On this page