Slack Integration Guide | PagerDuty

Slack + PagerDuty Integration Benefits

  • The new Slack integration, like the V1 integration, allows you to acknowledge and resolve PagerDuty incidents from the Slack user interface.
  • This update includes new incident response capabilities: trigger and escalate incidents and run response plays from Slack. Additionally, users will now be able to create on-demand Slack channels from PagerDuty incidents.
  • The new Slack integration also has improvements such as an updated notification design with more context from monitoring tools, and actions that respect PagerDuty user permissions.

How it Works

  • Users can trigger, acknowledge, resolve, escalate, add notes and run response plays within Slack, which will send events to PagerDuty, resulting in the corresponding incident actions.
  • When a PagerDuty incident is triggered outside of Slack, an event is sent to the mapped Slack workspace, which generates a message with the incident's details in the designated channel. Users can then perform actions (listed above) within Slack, or within PagerDuty, and the actions will be synced bi-directionally.

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.
  • Service-Level Configuration: Once your PagerDuty account has been mapped to your Slack workspace (see above) users with a Manager team role or base role can add the Slack extension to services.
  • If you're not sure what role you have, or if you need your permissions adjusted, visit our sections on Checking Your User Role or Changing User Roles.

In Slack: You need to be a workspace admin or owner.

Looking for Another Version?

The Slack V1 integration guide is also available.

Integration Walkthrough

Initial Configuration

To begin the integration, you will need to map your PagerDuty account to your Slack Workspace. If this has already been performed, please skip ahead to the Add the Slack Extension to a Service section.

Note

  • Multiple Slack workspaces can be mapped to a single PagerDuty account by repeating the below steps for each workspace.
  • At this time, mapping multiple PagerDuty accounts to a single Slack workspace is not supported.
  1. In the Configuration menu, select Extensions.
  2. Select Slack from the upper left corner.
  1. On the Slack Workspace Mapping screen, click the Install App into Workspace button 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.
  1. On the next screen, you will be asked to authorize the PagerDuty for Slack extension to perform the following actions:
  • Confirm your identity on PagerDuty
  • Access and modify information about your channels: In order to send prompts to Slack users to associate their Slack and PagerDuty usernames, the extension needs to obtain user IDs from the associated channel. The modify channels access is only used for the per-incident, on-demand Slack channel feature.
  • Add slash commands and add actions to messages (and view related content)
  • Access information about your workspace: This allows the extension to access your team’s profile information and it is used for Slack user association. The list of members from the channel endpoint only gives PagerDuty your Slack ID and this allows it to obtain necessary usernames.
  • Send messages as [Workspace Name] for Slack: This allows the extension to post to specific channels in your Slack workspace.
  • Access your workspace’s profile information: Similar to the above, this allows the extension to access your team’s profile information and it is used for Slack user association. The list of members from the channel endpoint only gives PagerDuty your Slack ID and this allows it to obtain necessary usernames.
  • Send messages as you: This is used to post notifications into the selected channel when a PagerDuty incident has been triggered, updated or resolved.

Click Allow to authorize. Once this step is complete, you can then begin connecting PagerDuty services to a specific Slack channel. Continue to Add the Slack Extension to a Service to complete the integration.

Add the Slack Extension to a Service

  1. Navigate to Configuration Services click the name of your desired service Integrations tab + New Extension.
  2. Select Slack V2 from the dropdown menu and enter a friendly Name for the integration, such as SlackV2-Service-Name (e.g. If your service name is Shopping Cart, the extension name would be SlackV2-Shopping-Cart). Next, select the Service that you would like to integrate with the Slack extension. In the Details section, you can select which updates you want sent to Slack: Escalate, Resolves, Acknowledgements, Reassign and Notes actions. Click Authorize to continue.
  3. On the authorization screen, ensure that you are in the correct Slack workspace by checking the dropdown in the upper right hand corner. Please note that if you plan to use Slack V1 and V2 at the same time, you will need to integrate Slack V2 into the same workspace. Next, in the Choose a channel... dropdown, search and select the channel where you would like PagerDuty to send messages. This authorization screen has many of the same permissions listed above in step 4, with the following differences:
  • Access information about your direct messages: In order to send prompts to Slack users to associate their Slack and PagerDuty usernames, the extension needs to obtain user IDs from multi-party direct messages (i.e., private messages to a specific group of users).
  • View email addresses of people on your workspace: This allows the extension to access your team’s profile information and it is used for Slack user association.

Once you have reviewed these permissions, click Authorize. You may add the Slack extension to multiple services by repeating steps 5-7.

  1. The Slack integration is now complete. You should see a message in your designated Slack channel that the PagerDuty integration has been added. If you set up the integration on a private channel, add @pagerduty to your channel.
  2. When an incident is triggered, the trigger message in Slack will show Acknowledge and Resolve buttons, and under the More actions… menu, you will see the options View Details, Add a Note, Escalate or Run a Play.

Available Slash Commands

Once the updated integration has been installed, new slash commands will be available. These slash commands can be run from Slack channels that are configured with PagerDuty:

  • /pd help: Displays a help message with a list of these available slash commands.
  • /pd trigger: Trigger a new PagerDuty incident within the Slack interface.
  • /pd oncall: View who is on call for a PagerDuty service.
  • /pd unlink: Unlink your current Slack user from your PagerDuty user.
  • /pd invite @[Slack User Name]: Invites the specified Slack user as a responder to your PagerDuty account.

Creating On-Demand Slack Channels

With the updated Slack integration, PagerDuty users can create on-demand Slack channels within PagerDuty. These can be created on the Incident Details screen in the web application by clicking Set Channel. You will have the ability to create new public or private channels or associate an existing channel to an incident.

User Permission Notes

  • When you click Set Channel you may be prompted to authorize the connection between your PagerDuty and Slack accounts again, as PagerDuty will now be creating a channel behalf of your individual Slack user account.
  • You will only be able to view channels that you have permission in Slack to access.
  • If you do not have permission in Slack to create channels, you will not be able to create them from the Set Channel link in a PagerDuty incident.
  • If your PagerDuty account has multiple Slack workspaces connected, you will have the option to pick which workspace to use.

If you would like to use this feature and don’t see it in your PagerDuty account, please reach out to our Support team.

FAQ

If I already have the Slack V1 extension installed, can I update to V2?

You will need to add Slack V2 as a new extension, and once you're finished testing, delete the Slack V1 extension. You'll then need to complete the Workspace mapping step (Step 3 of Initial Configuration, above) to connect your Slack Workspace to PagerDuty.

How do I know if I’m using V1 or V2 integration when looking at the Slack notification?

If the notification in Slack contains "More Actions" menu, you are using the updated V2 integration.

If I don’t connect my PagerDuty and Slack accounts, can I still action notifications in Slack?

No. The Slack V2 integration, unlike V1, requires you to connect so that it can respect PagerDuty user permissions.

I changed my channel from public to private, and now my incidents aren't posting to Slack.

You'll need to invite the PagerDuty bot into your Slack channel after you set it to private.

Do I need to install anything separate to use the slash command?

No. In the V2 integration, this is no longer a separate app. You do need to ensure that you map the Slack extension and your Slack workspace to PagerDuty (step 4 of the Integration Walkthrough), and then the /pd trigger command will function. Note: At the moment in V2, only PagerDuty users can use /pd trigger. If you to want to allow anyone to use the slash command, you should keep the legacy slash command integration in place.

How do I provide feedback, suggestions and/or bugs?

Please contact our Support team.

How do I view on-call information in Slack?

You can do this by running the /pd oncall command.

What do I do if I’m seeing a 403_client_error when running the /pd trigger command?

You are likely attempting to trigger an incident from a Slack channel that is not connected to PagerDuty. Ensure that you have connected Slack to PagerDuty as shown in step 3 above.


Learn more

Please visit our Slack V1 FAQ for more information.

Slack V1 Integration Guide

Slack Integration Guide | PagerDuty


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.