Skip to content

Slack connects with OAuth 2.0 through Truto's Slack app or your own. Truto's app covers the User Directory API; channels, messages, files and Slack events need your own app.

Install the Slack integration

Install Slack from Available integrations in each environment you connect accounts from.

Use your own Slack OAuth app (needed for messaging)

Truto connects Slack accounts through its own OAuth app. To show your own app on the consent screen, or to reach more than users:

  1. Create an OAuth app in Slack and add https://api.truto.one/connect/slack/callback as its redirect URL. If you use a redirect URL on your own domain, add that URL instead.
  2. Enter the app's Client ID and Client Secret on the installed Slack integration. See Overriding OAuth credentials.

By default, Truto asks Slack for these bot scopes. The Connect UI lists them under Permissions required, and you can change them when you override the OAuth credentials.

  • users:read
  • team:read
  • users:read.email

That covers users and roles in the User Directory API. Channels, messages and files (Unified Instant Messaging API or Proxy API) need more scopes, so use your own Slack app: add the bot scopes you need, for example channels:read, channels:history, channels:join, chat:write and files:read, and set the same list as Scopes when you override the OAuth credentials. User Directory activities (Slack access logs) and the Unified Search API need user-token scopes (admin, search:read) that Truto doesn't request.

Enable the same scopes on your app. If your app allows fewer, change the list under Use your own OAuth settings → Scopes on the installed integration's Configuration tab to match.

Connect a Slack account

  1. In Integrated Accounts, click Connect Account. Click Connect Account
  2. Enter a Tenant ID (your customer's ID; Truto creates the tenant if it is new), or pick one under Existing tenant (optional). Check the Environment and the Region (where Truto places the account; Western North America by default). To open the link straight on Slack, pick it under Advanced settings → Integration (optional). Click Get connection link. Get connection link
  3. Click the open-in-new-tab button, or click Copy and send the link to your customer so they connect their own Slack account. The link works for 7 days, until an account is connected with it. Share connection link
  4. Click Get Started if it shows, then select Slack. Select Slack
  5. Sign in to Slack and allow access.
  6. Close the tab when you see Connection successful. The new account appears under Integrated Accounts. Click its Account ID to see its details and make API calls.

Receive Slack events

Slack sends every workspace's events to one Request URL on your own Slack app, and Truto turns them into record:* events for your webhooks. Messages (posted, changed, deleted), members joining a channel, and channels created or deleted are mapped.

  1. Install the Instant Messaging Unified API in the same environment. Truto maps Slack events only through it; without it, Truto accepts Slack's requests and sends you nothing.

  2. On the installed Slack integration's Configuration tab, under Environment variables, add signing_secret with your app's Signing Secret (in Slack: Basic Information → App Credentials). Truto checks each request's X-Slack-Signature with it and matches the event to an integrated account by its workspace (team) ID.

  3. Copy the ID from the installed Slack integration's Overview tab.

  4. In your Slack app, open Event Subscriptions, turn events on, and set the Request URL to the URL below. Truto answers Slack's url_verification challenge for you.

    https://api.truto.one/environment-integration-webhook/<environment_integration_id>
  5. Subscribe to the bot events you need, such as message.channels, member_joined_channel, channel_created and channel_deleted, and add the matching scopes to your app.

  6. Create a Truto webhook subscribed to record:created, record:updated and record:deleted (or all). See Receiving vendor webhooks.