Slack apps can use interactive features to achieve much more than just one-way communication.
An injection of interactivity can invite and inspire action (and reaction). Best of all, users never have to depart from the comfort of Slack to get things done.
The interactive flow between Slack apps and users is a two-step process:
There are multiple ways to invoke the interaction, and apps have multiple ways to respond.
There are several potential ways that app interactions are triggered. They can be divided into two categories:
Your app can be invoked without any direct user input. Let users focus while your app handles what it needs to on its own.
The interaction is invoked at a specific time with a specific cadence.
For example, on every Friday at 3pm an app could post a reminder.
Connections you've built with external services can trigger app interactions at any time. This provides seamless integration from those services into Slack.
For example, an account update on a CRM platform could cause a Slack app to post a Slack message.
The Events API can send a push to Slack apps whenever a specific event occur in Slack. The receipt of one of these event pushes can trigger some interaction response by an app.
For example, the app_mention
event sends a push when an app is mentioned by someone in a conversation. The app could then respond with a message.
Users can directly invoke your app via entry points - a set of app features that serve as launching points for interactions. Most user invocations will send data payloads to an app containing contextual information about the interaction.
Enable these configurable features to provide users a way to invoke apps from the comfort of familiar Slack client elements.
Shortcuts let users quickly trigger workflows from various prominent UI locations in Slack.
Refer to Shortcuts for more info.
Let users trigger an interaction with your app by typing a command into the message composer box in any Slack conversation.
Refer to Slash Commands for more info.
Interactive components are a subset of Block Kit, our UI framework of visual components for Slack apps. They can be placed into app surfaces like messages, modals, or App Home. Each component provides its own trigger for a possible interaction.
Refer to Building with Block Kit for more info.
An app's reaction to an interaction can take on many forms, ranging from doing nothing at all, to performing one of the many API functions available to Slack apps.
Some possibilities:
Read our guide to designing your Slack app for some interactivity inspiration.
Responses to interactions can themselves be invocations of further interaction.
Some examples:
An interactive message could be published in response to a schedule, and a button within that message could be clicked to continue a workflow.
A shortcut could trigger a modal that, once completed, could trigger an update of the app's Home tab.
Chaining interactions together creates workflows that can accomplish complex tasks.
Ready to add interactivity to your app? Next stop is Handling user interaction in your Slack apps