Skip to content

Slack

Read channels, threads and direct messages, look up people, and post messages and reactions, as you or as a bot.

A Slack connection gives a playbook's functions the Slack Web API, through a document Auto ships of eleven methods. There are two ways to connect, and a page in Studio shows both. Slack connects as you: you sign in to Slack and allow access, and the connection reads the channels, conversations and people you can see, and a message it sends is from you. Slack Bot connects as the bot of a Slack app installed in your workspace, with that app's bot token, so a message it posts is the bot's and it reads the channels the bot is in. Both offer the same eleven methods.

The connection belongs to your organization. A function in a playbook the connection is for acts in Slack as you, or as the bot, whoever in your organization runs it.

Connecting Slack to a playbook is separate from talking to Auto in Slack, where you ask Auto to build and run playbooks from a Slack conversation. You can use either or both.

Available on Auto Cloud and on self-hosted runtimes.


What a playbook can do with Slack

  • Read messages and other content in public channels, in the private channels you are in, and in your direct and group messages, with threads and their replies.
  • List and look up channels, and see the people in the workspace.
  • See emoji reactions and what they are on.
  • Send messages as you, or as the bot, and update a message it sent.
  • Add reactions.

It does not search messages: Slack grants its search methods to apps listed in the Slack Marketplace, and Auto's app is not listed yet. A function reads a channel's history and threads instead. Nothing is deleted.

The tools of Slack and Slack Bot, as each connection lists them

Tools that read: auth_test, conversations_list, conversations_info, conversations_history, conversations_replies, users_list, users_info and reactions_get.

Tools that act: chat_postMessage, chat_update and reactions_add.


An example workflow

A weekly review of a support channel. A schedule trigger starts the workflow every Monday at 08:00 in your time zone. A lookup function reads the week's messages from #support with conversations_history, following the cursor until it has them all. A reasoning function groups the questions that came up more than once, notes which got no reply, and drafts an answer for each from the team's own guidance in its prompt. An interaction function posts the draft in a thread with chat_postMessage and waits: it reads the replies with conversations_replies until the support lead answers "approve" or asks for changes, or the request expires on Wednesday. Once approved, a last interaction function posts the week's summary to #support. Every step, its input and its result are in the run's history in Studio, with the message Slack answered.


How to connect Slack

Slack

  • Sign in to Slack and allow access as yourself. The consent screen shows the permissions listed below.

Slack Bot

  • Give a Slack bot token. Find the token in your Slack app's settings at api.slack.com/apps: choose the app, then OAuth & Permissions. Under Bot Token Scopes, add channels:read, channels:history, users:read, chat:write, reactions:read and reactions:write, and groups:read and groups:history for private channels. Select Install to Workspace and Allow, then copy the token under OAuth Tokens. It starts with xoxb-.

Then:

  1. Ask your agent to connect Slack to Auto, or open Settings, Agents, Connections in Auto Studio and choose Slack or Slack Bot.
  2. On the Studio page, check the service and its access, choose which playbooks may use the connection, and approve it. Give a key or a client secret there, never in a conversation with your agent.
  3. Have your agent check one small read through the connection before a function depends on it.

Step by step: Connect Slack.


What it needs

  • A Slack account in the workspace, for the sign-in; or a Slack app installed in the workspace and its bot token, which the app's owner copies once.
  • Your agent connected to Auto and signed in as you, with permission to change your organization, if your agent adds the connection. An agent connected with an API key cannot add one.
  • A workspace that takes only approved apps needs an owner or app manager to approve Auto once. Slack then asks you to request Auto when you sign in, and you allow it once they approve.

Permissions Auto asks for

Slack:

  • See basic information about public channels in a Slack workspace.
  • See basic information about private channels the person who connects is in.
  • See basic information about the direct messages of the person who connects.
  • See basic information about the group direct messages of the person who connects.
  • Read messages and other content in Slack public channels.
  • Read messages and other content in private channels the person who connects is in.
  • Read messages and other content in the direct messages of the person who connects.
  • Read messages and other content in the group direct messages of the person who connects.
  • See the people in a Slack workspace.
  • See emoji reactions and the content they are on in Slack channels and conversations.
  • Send Slack messages as the person who connects.
  • Add and change emoji reactions in Slack.

Slack Bot: a key carries the permissions it was made with; the steps above name those Auto needs.


Good to know

Slack limits an app distributed outside the Slack Marketplace, Auto's among them, to one call a minute of conversations_history and of conversations_replies in each workspace, answering at most 15 messages a call. A function reads a long channel in several calls, following cursor while has_more is true, and a workflow that reads a busy channel every few minutes will wait on Slack's limit. A bot of an app your workspace builds for itself has no such limit. A user token lasts 12 hours and Auto renews it; when Slack revokes it, because the app was removed or the person left, the connection shows as needing attention in Studio and asks to be reconnected.


Follow our work on Auto.

Updates on business playbooks and how we use them.