Slack Integration Guide | PagerDuty
Slack + PagerDuty Integration Benefits
- Collaborate seamlessly while managing PagerDuty incidents end-to-end from incident dedicated channels.
- Increase awareness of active incidents by receiving notifications in Slack, either by pre-configured service/team channel connections, or incident notification channels.
- Look up who is on-call, create Insights reports and manage the integration.
- Take action on your incident, all without leaving Slack
- Trigger, acknowledge, escalate and resolve PagerDuty incidents.
- Run Incident Workflows, send status updates, assign roles and delegate tasks.
Requirements
In PagerDuty:
- Initial Configuration: This integration requires an Admin, Global Admin or Account Owner base role to perform the initial configuration. This includes mapping your PagerDuty account to your Slack workspace.
- Slack Connection Management: Once your PagerDuty account has been mapped to your Slack workspace (see above) Team Managers, Admins and Account Owners can add a Slack channel connection to a PagerDuty service.
- Using the Integration: In order to use the Slack slash command
/pd trigger
to trigger a PagerDuty incident, you must have a PagerDuty user license. In other words, all Slack users who have mapped their Slack and PagerDuty accounts can trigger incidents from the Slack interface. Other actions, such as acknowledging, resolving, viewing incident details, adding a note, escalating or running an Incident Workflow follow the PagerDuty user permissions for each action.- If some employees in your organization do not have PagerDuty licenses, but you would like them to be able to trigger PagerDuty incidents, you can create an incident trigger Slack workflow to enable this action.
- The Slack integration is supported for both US and EU service regions.
In Slack:
- To install the PagerDuty application, you need to be a workspace admin or owner.
How it Works
- You can create dedicated channels to centralize incident coordination in Slack, and link notification channels for awareness of incidents in progress.
- You can trigger, acknowledge, resolve, and perform other actions within Slack.
- If you configure a service/team channel connection, upon incident trigger, an incident card will automatically send to the designated channel for all incidents for the configured service or team. Users can then perform actions (listed above) within Slack, or within PagerDuty, and the actions will be synced bi-directionally.
Please see the PagerDuty Privacy Policy to read more about how we collect, use and disclose your information.
Version
This guide details the configuration of the latest Slack V2 Next Generation integration.
Migrate to Slack V2 Next Generation
Our Legacy Slack V2 integration has reached end of life. Use our migration tool to migrate from Slack V2 to Slack V2 Next Generation.
Integration Walkthrough
Initial Configuration
- First, you will map your PagerDuty account to your Slack Workspace. In PagerDuty, navigate to Integrations Extensions. Select the Slack tile at the top.
- If prompted, click Authorize Integration.
- On the Slack Workspaces mapping screen, click Connect a new Workspace to connect your PagerDuty account to your Slack workspace. Connecting your PagerDuty account to your Slack workspace ensures that the PagerDuty bot is present and that PagerDuty slash commands can be executed from any Slack channel.
- On the next screen, you will be asked to authorize the PagerDuty for Slack integration.
- Click Allow to authorize.
- On the next screen, you have the option to enable or disable the following settings by toggling them to the on or off position:
- Stop incident updates and actions upon team reassignment:
- On: When an incident is reassigned to another team, updates and actions for that incident will be disabled in your channel and enabled in the other team's channel.
- Off: When an incident is reassigned to another team, updates and actions for that incident will continue to be available in your channel, and they will also be enabled in the other team's channel.
- Create a Slack thread for all incidents:
- On: After the initial trigger notification, all further incident notifications will be posted in a thread under the trigger notification.
- Off: All incident notifications will be posted in the main Slack channel.
- Stop incident updates and actions upon team reassignment:
Once this step is complete, you can then begin connecting PagerDuty services or teams to a specific Slack channel, and using PagerDuty to manage incidents in Slack.
Add a Slack Channel Connection
Required User Permissions
You will only be able to add connections to channels that you have Slack permissions for. If you do not have the appropriate Slack permissions for a channel, it will not appear in search results. If you need permissions to access a Slack channel, please contact your Slack administrator.
Private Slack Channels
If you add a connection to a private Slack channel, the PagerDuty app (@pagerduty) will be automatically added to the channel. If the PagerDuty app is thereafter manually removed from that channel, it will cause the automatic deletion of the connection between the PagerDuty service or team and that Slack channel, and no subsequent incident notifications will be received in the channel.
Finally, you will add Slack channel connection(s). There are two ways to add channel connections:
Via Slack Connection Management Page
On the Slack Connection Management page (Integrations Slack Integration click View next to your preferred Workspace), click Add Connection. Make selections in the following fields based on your preference:
Field | Value |
---|---|
PagerDuty Source | Select your preferred PagerDuty source: - Service: Slack notifications will come from an individual service. - Team: Slack notifications will come from all services associated with the selected Team.Note: If you add a connection to a service and then add a connection to a Team associated with the same service, you will receive double notifications for that service. We recommend checking for duplicates when adding Team connections. |
Slack channel | Search and select your preferred channel or paste your preferred channel's ID. You must enter at least 3 characters in order to return search results. |
Notification type | Select the radio button for your preferred notification type: - Responder: Notifications include buttons for users to acknowledge, resolve, and take other actions on incidents. - Stakeholder: Notifications do not include any buttons to take action on incidents. |
Notify the channel of these updates: | You may check or uncheck the following update types: - Acknowledged - Unacknowledged - Escalated - Resolved - Reassigned - Note added - Delegated - Priority changed - Reopened - Responder requested - Responder joined / declined - Status update added |
When the incident matches these criteria: | - Urgency: Select your preferred urgency. - Priority: Select your preferred priority. |
Click Add Connection to connect your PagerDuty source to your Slack channel. To add multiple channel connections, repeat steps 4-5 as many times as needed. Once you have finished adding your connections, the Slack integration is now complete.
Via Slack Command
Navigate to your preferred Slack channel, enter the /pd connect
command and make selections in the following fields based on your preferences:
Field | Value |
---|---|
Choose a PagerDuty account | Select your PagerDuty account from the dropdown. |
Connect service or team to [CHANNEL-NAME] | Search and select the service or team that you would like to connect to the channel. |
How do you want to be notified? | Select the radio button for your preferred notification type: - Responder: Notifications include buttons for users to acknowledge, resolve, and take other actions on incidents. - Stakeholder: Notifications do not include any buttons to take action on incidents. |
Click Connect to connect your PagerDuty source to your Slack channel. To add multiple channel connections, repeat steps 4-5 as many times as needed. Once you have finished adding your connections, the Slack integration is now complete.
Slack User Guide
Once initial configuration is complete, please read our Slack User Guide for instructions on how to use the integration.
Granular Bot Permissions
The Slack integration uses granular bot permissions, as detailed in the Bot Token Scopes table. All channel connections will be affected by granular bot permissions, but new connections will closely follow Slack workspace security settings. Creating channel connections may require users to have additional Slack permissions or admin authorization, as detailed in the Approve App Update section below.
Approve App Update
There are two Slack settings that may impact the app update:
- App Updates require a Slack Admin approval.
- Only Slack Admins or Slack app Managers can create PagerDuty service to Slack channel connections.
If a user does not have the correct Slack user permissions, then a notification will be sent to a Slack admin to approve the connection. If a Slack admin does not approve the new changes, users will not be able to create new Slack channels and PagerDuty service connections. If your Slack account has not restricted these settings, no action is required.
To approve the app update as a Slack Admin:
- Navigate to the Slack admin portal and search for the PagerDuty app.
- At the top right of the page, click Approve next to Manage app for entire workspace? and approve PagerDuty app changes.
Bot Token Scopes
OAuth Scope | Slack Description | PagerDuty Request Reason |
---|---|---|
app_mentions:read | View messages that directly mention @pagerduty in conversations that the app is in. | Used for interactions with PagerDuty bot and responding to commands. |
bookmarks:write | Create, edit, and remove bookmarks | Used to automate the creation of bookmarks within an incident dedicated channel. |
channels:join | Join public channels in a workspace. | After a public channel has been created, we will use this scope to join the channel. |
channels:manage | Manage public channels that PagerDuty has been added to and create new ones. | This will allow us to create public channels. |
channels:read | View basic information about public channels in a workspace. | Getting user IDs from a channel in order to prompt those users about associating their PagerDuty user to their Slack username. |
chat:write | Send messages as @pagerduty . | Used to post incident notifications to channels in Slack. |
chat:write.public | Send messages to channels @pagerduty isn't a member of. | Used to post incident notifications to channels in Slack. |
commands | Add shortcuts and/or slash commands that people can use. | Used for interactions with the PagerDuty bot and responding to commands. |
groups:read | View basic information about private channels that PagerDuty has been added to. | Access information about a user’s private channels: Getting user IDs from a private channel in order to prompt those users about associating their PagerDuty user to their slack username. |
groups:write | Manage private channels that PagerDuty has been added to and create new ones. | This will allow us to create a private channel for PagerDuty incident. |
im:read | View basic information about direct messages that PagerDuty has been added to. | Getting user IDs from a multi-party direct message (private messages to a specific group users) in order to prompt those users about associating their PagerDuty user to their Slack username. |
im:write | Start direct messages with people. | Replying to a multi-party direct message about associating their PagerDuty user to their Slack username. |
incoming-webhook | Post messages to specific channels in Slack. | PagerDuty communicates with Slack via webhooks to notify users of a new incident in PagerDuty. Used to post to channels in slack. |
Reauthorization
You may need to reauthorize your Slack scopes in order to gain access to new features.
To reauthorize, PagerDuty admins should visit Integrations Extensions Slack Integration. If reauthorization is required, you will see Reauthorize next to the name of your Slack workspace.
After clicking Reauthorize you will be asked to approve the additional scopes and permissions needed for new functionality. Reauthorization will not impact your current functionality or integration configuration.
Migrate to Slack V2 Next Generation
Legacy Slack V2 End of Life
Our Legacy Slack V2 integration has reached end of life. You may migrate to Slack V2 Next Generation by using the instructions below.
The migration tool makes migrating to Slack V2 Next Generation easy, and only needs to be completed once. There are a few things to note prior to migrating from Slack V1 and V2 to Slack V2 Next Generation:
- During migration, incident notifications, updates, and actions will continue to occur in Slack. You may receive duplicate incident notifications during migration.
- After migrating, the ability to create Slack V1 and V2 connections (which use V2 webhooks) will be disabled. This means Terraform and older extension APIs may stop working, you will only be able to use Slack V2 Next Generation connections (which uses V3 webhook subscriptions) going forward.
- After migration, you will be able to manage Slack channel connections on the Slack Connection Management page; you will no longer be able to manage them at the service level.
- Once the migration has started, it cannot be canceled.
Requirements
- A PagerDuty Account Owner or Admin base role is required to perform the migration. The PagerDuty user performing migration does not require Slack admin access to all Slack workspaces. Each workspace must be authorized separately and each can be connected by a different PagerDuty/Workspace admin as needed. In order for the Start Migration button to appear, the PagerDuty user performing the migration must be linked to a Slack user on one workspace, but does not need to be linked to a user in every workspace that will be migrated.
- All Slack workspaces using existing Slack V1 and V2 extensions must be connected to PagerDuty (steps 1-4 of Initial Configuration) prior to completing migration.
- If your workspaces are already connected, before performing the migration you must also ensure all of your workspaces have been reauthorized. Check to see if any of your workspaces have a Reauthorize button to the right and click the button to perform reauthorization.
- In PagerDuty, navigate to Integrations Extensions and select the Slack Integration tile at the top of the page.
- In the first yellow banner at the top of the page, click Start Migration.
-
Follow the migration widget’s steps:
a. Click Continue to Authorization.
b. In the Authorization tab, you will see your current Slack connections and webhooks. If you need to add or update your connections, a PagerDuty user with an Admin role or higher and Slack Workspace Admin or higher can perform these actions.
c. Click Run Migration. The migration will continue automatically, and it will run in the background if the page is left. When the migration is complete, you will receive a notification on this page.
d. Once migration is complete, you will be able to see how many webhooks successfully migrated under Webhook Migration Status. If any webhooks failed to migrate, you have the option to Re-run Migration. If all webhooks migrated successfully, then the update is complete. If migration continues to fail, and you have double checked that you satisfied all requirements, please contact our Support team for further assistance.
Add Multiple Slack Workspace to PagerDuty Connections
In this version of the integration, you may add multiple workspace connections to multiple PagerDuty accounts.
Follow the Integration Walkthrough instructions for as many workspaces as you need to add to each PagerDuty account.
Slack Connection Management
With Slack V2 Next Generation, users with a Manager, Admin or Account Owner role can manage connections in PagerDuty on the Slack Connection Management page under Integrations Extensions Slack Integration . Note: This version of the Slack integration is no longer managed at the service level.
Required User Permissions
- PagerDuty Team Managers (see restrictions below), Admins and Account Owners can view, edit and delete Slack channel connections.
- Team managers with a Restricted Access base role will not be able to manage connections for their team. If a Manager doesn't have access to a service or team, they will be view-only and unable to to edit changes.
- Responders will be able to see a view-only state of all the connections.
Add a New Slack Channel Connection
After configuring the integration for the first time, you may wish to connect additional PagerDuty services with Slack channels; you can repeat the steps in the section Add a Slack Channel Connection.
Edit or Remove a Slack Channel Connection
- Navigate to Integrations Extensions select the Slack Integration tile. Click View to the right of your desired workspace.
- To edit the connection, click the icon to the right, make any edits necessary and then click Save Connection. To remove the connection, click the to the right, select Remove Connection and confirm by clicking Remove Connection one more time.
Disconnect Workspace
- Navigate to Integrations Extensions select the Slack Integration tile. Click View to the right of your desired workspace.
- Under Authorized Workspace, click Disconnect to the right of your workspace’s name. Enter
disconnect
in the modal and Disconnect.
Note: This action cannot be undone. If you’d like to reconnect your workspace to PagerDuty, please follow the instructions in the section Integration Walkthrough again.
PagerDuty Slack Integration API
Please view our developer documentation for more information about the PagerDuty Slack Integration API.
Slack User Guide
Please read our Slack User Guide for more information about using the integration after it has been configured.
Add a Slack Contact Method
Once the Slack integration has been configured, you can add Slack as an incident contact method. Please see our User Profile article for more information.
FAQ
If I am currently using the Slack V1 or V2 integration, can I update to Slack V2 Next Generation?
Yes, please use the migration tool to update to Slack V2 Next Generation.
Will Slack V1 and Slack V2 extensions stop working during the migration?
No, incident notifications, updates, and actions will appear in Slack during migration. You may receive duplicate incident notifications during migration.
In order to migrate to Slack V2 Next Generation, does the PagerDuty Admin have to have Slack Admin access to all Slack workspaces currently connected to PagerDuty?
No, this is not required.
Why is workspace mapping required for Slack V2 Next Generation?
Workspace mapping connects a PagerDuty account to a Slack workspace. This provides authorization and access to all channels in a workspace and removes the need to authorize connections on a channel by channel, service by service basis.
Can Managers perform the initial setup of a channel/service connection, or access and edit the settings for a connection?
- Users with a Manager role or higher can create and manage their teams’ connections.
- A PagerDuty users with an Admin role or higher will still need to connect the PagerDuty account to the Slack Workspace first.
Slack V2 Next Generation requires that the user be a responder in PagerDuty. Is there a way to allow non-PagerDuty users to trigger incidents in Slack?
Customers can trigger an incident without a PagerDuty license. Please see the section Create an Incident Trigger Slack Workflow for more information.
After migrating, we can no longer make a Slack channel connection from the service page. Is this expected behavior?
Yes, after migrating to Slack V2 Next Generation, you will not be able to create Slack connections at the service level. Please use the Slack Connection Management page to administer the Slack integration.
I changed my channel from public to private, and now my incidents aren't posting to Slack.
Please invite the PagerDuty bot (@PagerDuty
) to your Slack channel after you set it to private.
Do I need to install anything else to use slash commands?
No, slash commands are available out-of-the-box with the Slack V2 Next Generation integration. In order use the /pd trigger
command, please make sure that you’ve mapped Slack workspace PagerDuty (step 4 of the Integration Walkthrough). Note: Users must have a PagerDuty license and be signed in to use /pd trigger
.
Can I add multiple Slack workspaces to a single PagerDuty account?
Yes, you can map multiple workspaces to a single PagerDuty account by repeating the Initial Configuration.
Can I connect a workspace to both a PagerDuty account in the US service region and a PagerDuty account in the EU service region?
Yes, you can map a single workspace to PagerDuty accounts in different regions. You'll just need to make sure to run slash commands with the appropriate prefix (/pd
for US and /pdeu
for EU).
How do I view on-call information in Slack?
Use the command /pd oncall
to see who is on call.
Updated 27 days ago