Skip to main content
Version: 0.2 (next)

Slack

Connect Slack and your team hears about finished work where it already talks. When a Change finishes, its summary video arrives in the channels you choose, playing inline, with what shipped, where it runs and a link to the Change. Nobody has to open Infrared to find out what landed today, and nobody has to write the update by hand.

Infrared has one Slack app for the whole install. Each org connects its own Slack workspaces to it, usually its own and perhaps a community Slack too, and then chooses destinations: the channels Infrared posts to, and what goes to each.

What Infrared postsWhen
Summary videosEach new summary video of a Change that finished or stopped
Product owner announcementsEach new product owner announcement, the video someone in the org makes for a bigger feature

Each post goes to every destination that takes it. A product owner announcement can go to #announcements in your own Slack and to #releases in a community Slack at once. A Product can add destinations of its own, or use only its own.

Set up the Slack app​

A platform admin does this once for the install.

  1. In Infrared, open Settings → Slack. As a platform admin you see the steps and a ready-made app manifest, with this install's addresses filled in. Copy the manifest.
  2. At api.slack.com/apps, choose Create New App → From an app manifest, pick a workspace to own the app (any workspace you administer), paste the manifest and create the app.
  3. Under Manage Distribution, turn on public distribution, so other orgs' workspaces can connect. Slack doesn't list the app anywhere: only people who start from Infrared's Connect Slack can install it.
  4. From Basic Information → App Credentials, copy the Client ID, Client Secret and Signing Secret into Settings → Slack, and choose Save the Slack app. Infrared keeps them in the Secret slack-app in its namespace.
  5. If Slack says the app's Events URL didn't respond, choose Retry on the app's Event Subscriptions page now that Infrared holds the signing secret.

Once the app is saved, the panel shows its OAuth redirect URL, Events URL and Interactivity URL, each with a copy button, and the bot scopes it asks for:

ScopeWhy
chat:write, chat:write.publicPost to the chosen channels, including public channels the app hasn't joined
files:write, files:readUpload videos so they play in Slack, and read each post's link
channels:read, groups:readList channels for the picker. Private ones appear only once the app is in them
team:readShow the workspace's name
users:read, users:read.emailRead the workspace's members, so people can be imported into Workforce and matched to their Slack accounts
im:history, im:writeSend a person their own messages and read their replies in the app's direct messages

With the API, GET /api/v1/slack/app returns the manifest and the addresses, and PUT /api/v1/slack/app with {"clientID", "clientSecret", "signingSecret"} stores the credentials. Both are for platform admins.

Connect a workspace​

An org admin does this for each org.

  1. Open Settings → Slack and choose Connect Slack. Slack asks which workspace to add Infrared to and shows the permissions above. Approve.
  2. Back in Infrared, under Destinations, choose Add a destination. Pick the Workspace and Channel, tick what goes there, and choose Save destinations. Infrared posts a short hello in each new destination saying what it will post there, so the channel knows what to expect.
    • Public channels are listed by name. A private channel appears once the app is in it: in Slack, type /invite @Infrared in the channel, then open the picker again.
    • Label (optional) is a name for your own reference, such as community.

Infrared keeps each workspace's bot token in a Secret of its own in the org's namespace, never in its database or its logs.

Add a second workspace, such as a community Slack​

  1. Choose Connect another workspace in Settings → Slack, and approve in the community workspace. You need permission to install apps there; if you don't have it, Slack sends the request to one of its admins.
  2. Add a destination in the community workspace, pick its channel, such as #releases, and tick only Product owner announcements, so summary videos stay in your own Slack.
  3. Choose Save destinations. Infrared says hello in the new channel.

Disconnect beside a workspace removes its token and its destinations, Products' destinations there included. Your other workspaces keep working, and posts already in Slack stay.

When a video is posted​

Each video is posted once, when it's made, to every destination that takes it. A video made again is a new post. If some destinations fail, for example because the app was removed from one channel, the others still get the post, and the Change shows which ones didn't and why.

Share to Slack​

Share to Slack on a Change lists every destination that takes the video you're watching, all ticked. Untick any you want to skip and choose Post. The Change then lists each post with a link, or why it didn't go.

Destinations per Product​

A Product can have its own say in where its videos go. In the Product's settings, Slack destinations offers three choices:

  1. Use the org's destinations, the default.
  2. Add its own to the org's: for example, the checkout Product also posts to #checkout.
  3. Use only its own: the Product posts nowhere else.

You edit a Product's own destinations the same way, in any of the org's workspaces. Its summary videos and product owner announcements follow them, both the automatic posts and Share to Slack. The Product's page says where it posts, such as Announces in #announcements · #releases (community).

# Add #checkout to the org's destinations for this Product.
curl -X PUT https://<host>/api/v1/orgs/<org>/products/<product>/slack -H "Authorization: Bearer $INFRARED_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"mode": "add", "destinations": [{"teamID": "T0123456", "channelID": "C0123456", "channelName": "checkout"}]}'
# Back to the org's destinations.
curl -X PUT https://<host>/api/v1/orgs/<org>/products/<product>/slack -H "Authorization: Bearer $INFRARED_TOKEN" \
-H 'Content-Type: application/json' -d '{}'

They are the Product's spec.slack: mode, add or replace, and destinations.

With the API​

# The org's workspaces and destinations, then the URL that starts connecting a workspace.
curl https://<host>/api/v1/orgs/<org>/slack -H "Authorization: Bearer $INFRARED_TOKEN"
curl -X POST https://<host>/api/v1/orgs/<org>/slack/connect -H "Authorization: Bearer $INFRARED_TOKEN"
# A workspace's channels, then the destinations. kinds: summary, announcement.
curl "https://<host>/api/v1/orgs/<org>/slack/channels?team=T0123456" -H "Authorization: Bearer $INFRARED_TOKEN"
curl -X PUT https://<host>/api/v1/orgs/<org>/slack/destinations -H "Authorization: Bearer $INFRARED_TOKEN" \
-H 'Content-Type: application/json' -d '{"destinations": [
{"teamID": "T0123456", "channelID": "C0123456", "channelName": "announcements", "kinds": ["summary", "announcement"]},
{"teamID": "T0999999", "channelID": "C0999999", "channelName": "releases", "name": "community", "kinds": ["announcement"]}]}'
# Share a Change's video now, to every destination that takes it, or only some ("team/channel").
curl -X POST "https://<host>/api/v1/orgs/<org>/agentworkflowruns/<run>/summary-video/slack?kind=announcement&destination=T0999999/C0999999" \
-H "Authorization: Bearer $INFRARED_TOKEN"
# Disconnect one workspace. Leave out team to disconnect them all.
curl -X DELETE "https://<host>/api/v1/orgs/<org>/slack?team=T0999999" -H "Authorization: Bearer $INFRARED_TOKEN"

When it doesn't post​

What you seeWhat to do
The Infrared app isn't in that private channelIn Slack, type /invite @Infrared in the channel
The workspace's connection no longer works, or was revokedConnect that workspace again: Connect another workspace, and choose it in Slack. Its destinations are kept
Reconnect <workspace> to allow replies and import, or the Slack app lacks a permissionThe app asks for more than the workspace granted when it was connected. An org admin chooses Reconnect <workspace> and approves in Slack; Slack grants the new scopes, and the destinations are kept
Infrared's Slack app isn't set up yetA platform admin sets it up first