Skip to main content
Corgtex Slack authorization depends on the Slack app configuration and the deployed environment variables referring to the same Slack app. If these drift, Slack will reject installation before Corgtex receives the OAuth callback. Corgtex also stores a durable Slack team binding per workspace. The first successful install records the returned Slack team.id for that Corgtex workspace when no binding or conflicting install exists. Reconnects include Slack’s team OAuth hint when a binding is known, and the callback rejects mismatched teams before saving tokens. A Slack team cannot be moved to another Corgtex workspace through normal OAuth.

Production OAuth URLs

For the hosted Corgtex app, configure these URLs in Slack App Management: Customer-specific deployments must use the deployed origin for that customer, not a different customer tenant. For example, a Chirone runtime with APP_URL=https://chirone.corgtex.com must have its Slack app redirect URL configured as https://chirone.corgtex.com/api/integrations/slack/callback, plus matching slash command, Events API, and interactivity request URLs on the same origin. Keep the Slack app manifest in the Slack App Management dashboard or another private operational store, not in this public repository. Apply changes to the same Slack app whose Client ID is deployed as SLACK_CLIENT_ID.

Deployment Checks

Before testing an install, verify in the deployment platform that the runtime has APP_URL=https://app.corgtex.com and has non-empty values for SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_APP_ID, SLACK_SIGNING_SECRET, and ENCRYPTION_KEY. Do not print or paste secret values into logs, tickets, PRs, or chat. The Slack Client ID in production must match the Slack app where the redirect URL and request URLs were configured. A common failure mode is updating a development Slack app while production still points at a different Client ID.

Install Flow

Start the install from Corgtex workspace settings with Connect Slack. Do not start from Slack App Management directly, because Corgtex generates a short-lived workspace-bound OAuth state cookie before sending the browser to Slack. If Slack shows the wrong workspace in the OAuth consent screen, stop the install and switch Slack workspaces before approving. If the wrong workspace is approved anyway, Corgtex redirects back with a generic Slack wrong-team status and does not save the token. Operators should confirm the target Corgtex workspace and Slack team before retrying rather than deleting or replacing bindings manually. After installation, verify the workspace settings page shows Slack as connected, then test /corgtex Jan should follow up tomorrow, /corgtex brief, an app mention such as @Corgtex turn this into a tension, and a message shortcut capture in Slack. Direct messages are not part of the v1 Slack surface, so do not add DM scopes or DM event subscriptions for this setup. For hosted workspaces that use Slack as long-term context, include channels:history and channels:join in the bot scopes, and subscribe the bot to message.channels events in addition to app_mention and app_home_opened. Corgtex uses those scopes and events to join public channels, capture accessible public-channel messages, index those messages into Brain retrieval, and maintain thread/channel summaries for the Slack agent. Private channels and DMs remain out of scope. The worker schedules communication.slack.public-archive daily for active Slack installations with channels:history. For first-time customer onboarding or a recovery import, run node /app/scripts/sync-slack-public-archive.mjs inside the customer runtime with WORKSPACE_SLUG or WORKSPACE_ID set. The command reports counts only and must not print Slack message content, channel names, or token values. Raw Slack message text is retained according to the installation retention setting and is redacted by the communication retention worker when it expires. When raw text is redacted or a Slack delete event arrives, Corgtex removes the corresponding raw Slack knowledge chunks. Durable context summaries may remain as derived organizational memory unless the workspace disables Slack ingestion or asks for a broader deletion. Slack’s Real-time Search API can be considered for future private-channel or DM context, but do not store data returned by that API in Corgtex. Use it only as ephemeral request-time context with the required Slack user consent and permission checks.