Event Subscriptions

Your app can subscribe to and handle Slack events based on the Events API.

The app_uninstalled and tokens_revoked events are required if you expect to disconnect your Slack app from an org and reconnect to a different org. See Org Connections.

note: message_metadata_* and workflow_* events are not supported.

Slack Events

The Slack events correspond to the following Apex classes.

tip: To ensure that your app handles Slack events correctly, include the required scopes listed on the Slack event documentation in your app manifest and MySlackAppName.slackapp-meta.xml file.

Slack Event Name Description Apex Class
app_home_opened User clicked into your App Home Slack.AppHomeOpenedEvent
app_mention Subscribe to only the message events that mention your app or bot Slack.AppMentionEvent
app_rate_limited Your app's event subscriptions are being rate limited Slack.AppRateLimitedEvent
app_requested User requested an app Slack.AppRequestedEvent
app_uninstalled Your Slack app was uninstalled Slack.AppUninstalledEvent
call_rejected A call was rejected Slack.CallRejectedEvent
channel_archive A channel was archived Slack.ChannelArchiveEvent
channel_created A channel was created Slack.ChannelCreatedEvent
channel_deleted A channel was deleted Slack.ChannelDeletedEvent
channel_history_changed Bulk updates were made to a channel's history Slack.ChannelHistoryChangedEvent
channel_id_changed A channel ID was changed Slack.ChannelIdChangedEvent
channel_left You left a channel Slack.ChannelLeftEvent
channel_rename A channel was renamed Slack.ChannelRenameEvent
channel_shared A channel has been shared with an external workspace Slack.ChannelSharedEvent
channel_unarchive A channel was unarchived Slack.ChannelUnarchiveEvent
channel_unshared A channel has been unshared with an external workspace Slack.ChannelUnsharedEvent
dnd_updated Do not Disturb settings changed for the current user Slack.DndUpdatedEvent
dnd_updated_user Do not Disturb settings changed for a member Slack.DndUpdatedUserEvent
email_domain_changed The workspace email domain has changed Slack.EmailDomainChangedEvent
ekm_access_denied A piece of content was redacted by an admin Slack.MessageEkmAccessDeniedEvent
emoji_changed A custom emoji has been added or changed Slack.EmojiChangedEvent
file_change A file was changed Slack.FileChangeEvent
file_created A file was created Slack.FileCreatedEvent
file_deleted A file was deleted Slack.FileDeletedEvent
file_public A file was made public Slack.FilePublicEvent
file_shared A file was shared Slack.FileSharedEvent
file_unshared A file was unshared Slack.FileUnsharedEvent
grid_migration_finished An enterprise grid migration has finished on this workspace. Slack.GridMigrationFinishedEvent
grid_migration_started An enterprise grid migration has started on this workspace. Slack.GridMigrationStartedEvent
group_archive A private channel was archived Slack.GroupArchiveEvent
group_close You closed a private channel Slack.GroupCloseEvent
group_deleted A private channel was deleted Slack.GroupDeletedEvent
group_history_changed Bulk updates were made to a private channel's history Slack.GroupHistoryChangedEvent
group_left You left a private channel Slack.GroupLeftEvent
group_open You created a group DM Slack.GroupOpenEvent
group_rename A private channel was renamed Slack.GroupRenameEvent
group_unarchive A private channel was unarchived Slack.GroupUnarchiveEvent
im_close You closed a DM Slack.ImCloseEvent
im_created A DM was created Slack.ImCreatedEvent
im_history_changed Bulk updates were made to a DM's history Slack.ImHistoryChangedEvent
im_open You opened a DM Slack.ImOpenEvent
invite_requested User requested an invite Slack.InviteRequestedEvent
link_shared A message was posted containing one or more links relevant to your application Slack.LinkSharedEvent
member_joined_channel A user joined a public or private channel Slack.MemberJoinedChannelEvent
member_left_channel A user left a public or private channel Slack.MemberLeftChannelEvent
message A message was sent to a channel Slack.MessageEvent, Slack.MessageBotEvent, Slack.MessageChangedEvent, Slack.MessageChannelJoinEvent, Slack.MessageChannelPostingPermissionsEvent, Slack.MessageChannelTopicEvent, Slack.MessageDeletedEvent, Slack.MessageFileShareEvent, Slack.MessageGroupTopicEvent, Slack.MessageMeEvent, Slack.MessageRepliedEvent, Slack.MessageThreadBroadcastEvent
message.channels A message was posted to a channel Slack.MessageEvent
message.groups A message was posted to a private channel Slack.MessageEvent
message.im A message was posted in a direct message channel Slack.MessageEvent
message.mpim A message was posted in a multiparty direct message channel Slack.MessageEvent
pin_added A pin was added to a channel Slack.PinAddedEvent
pin_removed A pin was removed from a channel Slack.PinRemovedEvent
reaction_added A member added an emoji reaction to an item Slack.ReactionAddedEvent
reaction_removed A member removed an emoji reaction Slack.ReactionRemovedEvent
scope_denied Deprecated. OAuth scopes were denied to your app Slack.ScopeDeniedEvent
scope_granted Deprecated. OAuth scopes were granted to your app Slack.ScopeGrantedEvent
star_added A member has starred an item Slack.StarAddedEvent
star_removed A member removed a star Slack.StarRemovedEvent
subteam_created A User Group has been added to the workspace Slack.SubteamCreatedEvent
subteam_members_changed The membership of an existing User Group has changed Slack.SubteamMembersChangedEvent
subteam_self_added You have been added to a User Group Slack.SubteamSelfAddedEvent
subteam_self_removed You have been removed from a User Group Slack.SubteamSelfRemovedEvent
subteam_updated An existing User Group has been updated or its members changed Slack.SubteamUpdatedEvent
team_access_granted Access to a set of teams was granted to your app Slack.TeamAccessGrantedEvent
team_access_revoked Access to a set of teams was revoked from your app Slack.TeamAccessRevokedEvent
team_domain_change The workspace domain has changed Slack.TeamDomainChangeEvent
team_join A new member has joined Slack.TeamJoinEvent
team_rename The workspace name has changed Slack.TeamRenameEvent
tokens_revoked API tokens for your app were revoked Slack.TokensRevokedEvent
user_change A member's data has changed Slack.UserChangeEvent
user_resource_denied User resource was denied to your app Slack.UserResourceDeniedEvent
user_resource_granted User resource was granted to your app Slack.UserResourceGrantedEvent
user_resource_removed User resource was removed from your app Slack.UserResourceRemovedEvent

Synthetic Events

Synthetic events are specific to the Apex SDK and don't have a Slack equivalent. The following synthetic event is available.

Event Name Description
UisfUserAuthedEvent A user successfully authenticated and connected the app to a Salesforce org

important: Persisting app home views based on a user's authentication status is currently not supported.

Deprecated Events

Slack retired legacy workspace apps, which also deprecated the following events.

  • resources_added
  • resources_removed
  • scope_denied
  • scope_granted

scope_denied and scope_granted map to corresponding Apex classes (Slack.ScopeDeniedEvent and Slack.ScopeGrantedEvent) but these Apex classes are no longer supported.