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.

message_metadata_* and workflow_* events are not supported.

The Slack events correspond to the following Apex classes.

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 NameDescriptionApex Class
app_home_openedUser clicked into your App HomeSlack.AppHomeOpenedEvent
app_mentionSubscribe to only the message events that mention your app or botSlack.AppMentionEvent
app_rate_limitedYour app's event subscriptions are being rate limitedSlack.AppRateLimitedEvent
app_requestedUser requested an appSlack.AppRequestedEvent
app_uninstalledYour Slack app was uninstalledSlack.AppUninstalledEvent
call_rejectedA call was rejectedSlack.CallRejectedEvent
channel_archiveA channel was archivedSlack.ChannelArchiveEvent
channel_createdA channel was createdSlack.ChannelCreatedEvent
channel_deletedA channel was deletedSlack.ChannelDeletedEvent
channel_history_changedBulk updates were made to a channel's historySlack.ChannelHistoryChangedEvent
channel_id_changedA channel ID was changedSlack.ChannelIdChangedEvent
channel_leftYou left a channelSlack.ChannelLeftEvent
channel_renameA channel was renamedSlack.ChannelRenameEvent
channel_sharedA channel has been shared with an external workspaceSlack.ChannelSharedEvent
channel_unarchiveA channel was unarchivedSlack.ChannelUnarchiveEvent
channel_unsharedA channel has been unshared with an external workspaceSlack.ChannelUnsharedEvent
dnd_updatedDo not Disturb settings changed for the current userSlack.DndUpdatedEvent
dnd_updated_userDo not Disturb settings changed for a memberSlack.DndUpdatedUserEvent
email_domain_changedThe workspace email domain has changedSlack.EmailDomainChangedEvent
ekm_access_deniedA piece of content was redacted by an adminSlack.MessageEkmAccessDeniedEvent
emoji_changedA custom emoji has been added or changedSlack.EmojiChangedEvent
file_changeA file was changedSlack.FileChangeEvent
file_createdA file was createdSlack.FileCreatedEvent
file_deletedA file was deletedSlack.FileDeletedEvent
file_publicA file was made publicSlack.FilePublicEvent
file_sharedA file was sharedSlack.FileSharedEvent
file_unsharedA file was unsharedSlack.FileUnsharedEvent
grid_migration_finishedAn enterprise grid migration has finished on this workspace.Slack.GridMigrationFinishedEvent
grid_migration_startedAn enterprise grid migration has started on this workspace.Slack.GridMigrationStartedEvent
group_archiveA private channel was archivedSlack.GroupArchiveEvent
group_closeYou closed a private channelSlack.GroupCloseEvent
group_deletedA private channel was deletedSlack.GroupDeletedEvent
group_history_changedBulk updates were made to a private channel's historySlack.GroupHistoryChangedEvent
group_leftYou left a private channelSlack.GroupLeftEvent
group_openYou created a group DMSlack.GroupOpenEvent
group_renameA private channel was renamedSlack.GroupRenameEvent
group_unarchiveA private channel was unarchivedSlack.GroupUnarchiveEvent
im_closeYou closed a DMSlack.ImCloseEvent
im_createdA DM was createdSlack.ImCreatedEvent
im_history_changedBulk updates were made to a DM's historySlack.ImHistoryChangedEvent
im_openYou opened a DMSlack.ImOpenEvent
invite_requestedUser requested an inviteSlack.InviteRequestedEvent
link_sharedA message was posted containing one or more links relevant to your applicationSlack.LinkSharedEvent
member_joined_channelA user joined a public or private channelSlack.MemberJoinedChannelEvent
member_left_channelA user left a public or private channelSlack.MemberLeftChannelEvent
messageA message was sent to a channelSlack.MessageEvent, Slack.MessageBotEvent, Slack.MessageChangedEvent, Slack.MessageChannelJoinEvent, Slack.MessageChannelPostingPermissionsEvent, Slack.MessageChannelTopicEvent, Slack.MessageDeletedEvent, Slack.MessageFileShareEvent, Slack.MessageGroupTopicEvent, Slack.MessageMeEvent, Slack.MessageRepliedEvent, Slack.MessageThreadBroadcastEvent
message.channelsA message was posted to a channelSlack.MessageEvent
message.groupsA message was posted to a private channelSlack.MessageEvent
message.imA message was posted in a direct message channelSlack.MessageEvent
message.mpimA message was posted in a multiparty direct message channelSlack.MessageEvent
pin_addedA pin was added to a channelSlack.PinAddedEvent
pin_removedA pin was removed from a channelSlack.PinRemovedEvent
reaction_addedA member added an emoji reaction to an itemSlack.ReactionAddedEvent
reaction_removedA member removed an emoji reactionSlack.ReactionRemovedEvent
scope_deniedDeprecated. OAuth scopes were denied to your appSlack.ScopeDeniedEvent
scope_grantedDeprecated. OAuth scopes were granted to your appSlack.ScopeGrantedEvent
star_addedA member has starred an itemSlack.StarAddedEvent
star_removedA member removed a starSlack.StarRemovedEvent
subteam_createdA User Group has been added to the workspaceSlack.SubteamCreatedEvent
subteam_members_changedThe membership of an existing User Group has changedSlack.SubteamMembersChangedEvent
subteam_self_addedYou have been added to a User GroupSlack.SubteamSelfAddedEvent
subteam_self_removedYou have been removed from a User GroupSlack.SubteamSelfRemovedEvent
subteam_updatedAn existing User Group has been updated or its members changedSlack.SubteamUpdatedEvent
team_access_grantedAccess to a set of teams was granted to your appSlack.TeamAccessGrantedEvent
team_access_revokedAccess to a set of teams was revoked from your appSlack.TeamAccessRevokedEvent
team_domain_changeThe workspace domain has changedSlack.TeamDomainChangeEvent
team_joinA new member has joinedSlack.TeamJoinEvent
team_renameThe workspace name has changedSlack.TeamRenameEvent
tokens_revokedAPI tokens for your app were revokedSlack.TokensRevokedEvent
user_changeA member's data has changedSlack.UserChangeEvent
user_resource_deniedUser resource was denied to your appSlack.UserResourceDeniedEvent
user_resource_grantedUser resource was granted to your appSlack.UserResourceGrantedEvent
user_resource_removedUser resource was removed from your appSlack.UserResourceRemovedEvent

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

Event NameDescription
UisfUserAuthedEventA user successfully authenticated and connected the app to a Salesforce org

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

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.