An overview of app interactivity

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.

In this overview we'll explain the general flow of interactivity between Slack apps and users. You'll learn about the different ways that interactions can be invoked, and the multitude of options for responding.

The flow of app interactivity

Every interaction between a user and an app exists as part of a flow, a continuum of events that gets something done.

This interactive flow can be simplified to two basic steps:

Something happens that triggers the interaction.

The app generates a response to the interaction.

Read on for a more detailed study of this action and reaction process.

How interactions begin

Any interaction has to start somewhere, with a knock on the door to request entry.

There are several potential ways that app interactions are triggered.

Interactions that happen on a schedule

The timed or scheduled interaction is one of the simplest triggers, one that doesn't necessarily need the input of a user to occur. Some examples include:

  • An app that posts a reminder every Friday at 3pm;
  • A dashboard-style app that updates every hour;
  • A lunch ordering app that prompts a menu choice every weekday at 12pm.

Interactions initiated by external services

Connections you've built with external services can trigger app interactions at any time. This provides seamless integration from those services into Slack. Some examples include:

  • A task list being refreshed due to a change in an external task-tracker service;
  • A notification posted in Slack because an account was updated on a CRM platform.

Events API pushes

The Events API sends a push to Slack apps whenever one of possible events occurs in Slack. The receipt of one of these event pushes could 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 to continue the workflow in the same conversation.

Read more about enabling and reacting to Events API notifications.

User invocation

Give the control to trigger interaction to your users by enabling one of these entry points:

Responses to interaction

Reaction follows action β€” if a door is knocked, someone on the other side decides what to do. Maybe they'll hide behind the sofa, run to collect the delivery they were waiting on, or tentatively open the door for an unexpected visitor.

An app's reaction to an interaction can take on many forms too, ranging from doing nothing at all, to performing one of the many API functions available to Slack apps. There are countless possibilities.

Read our guide to planning your Slack app for some interactivity inspiration and learn our recommendations for building great interactions.

Some features have their own specific interactive behaviors to accommodate β€” most user invocations will send data payloads to an app containing contextual information about the interaction, for example.

Read the relevant docs linked above for more information on specific interactive flows for different features.

Infinite interaction invocations

The interactive flow we've described above might seem simple on the surface, a binary back-and-forth. Consider, however, that the responses to interactions can themselves be invocations of further interaction.

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 contains interactive components that trigger other interactions.

When that modal is submitted and closed, that could be the trigger for an update of the app's Home tab.

Chaining interactions together creates workflows that can accomplish complex tasks. It's important to have a good sense of the flow of your app before you start building these interactions.

Was this page helpful?