To get PagerDuty to work with Zapier, the first thing to do is to add your PagerDuty account to Zapier. We'll prompt you to add these details when you're adding your first PagerDuty Zap.
You will now need to enter some details to connect Zapier to your PagerDuty account.
The account name and API key fields are a lot more particular. Your Account Name in PagerDuty is the same as your subdomain on PagerDuty. If you go to https://mycompany.pagerduty.com/ to log in, your account name is "mycompany."
You must generate the API key in PagerDuty, but it's really easy to do. After logging in to PagerDuty, click on the "Configuration" on the top navigation menu and then choose "API Access".
Type a description in the appropriate field ("Zapier" or anything you'll recognize later), and choose "V2 (Current)" as the API version. Then click Create Key. Leave "Read-only API Key" unchecked.
Your key will appear on the left side and you can then paste it into the Zapier window and click Continue.
Zapier will automatically test your settings. If they're good, you're in the clear to continue setting up your Zap.
If you get an error at this point, some piece of data was entered incorrectly.
- If you get "authorization failed: Account Not Found", your subdomain was entered incorrectly.
- If you get "authorization failed: (401) Unauthorized", your API key is incorrect.
The final bit is to set up the webhook.
Make sure to enter your Webhook URL into your PagerDuty service(s) that you would like to tie into Zapier. Copy the "Webhook URL" and paste it into your PagerDuty settings.
After this step, you are finished connecting PagerDuty to Zapier.
The incident key field is how PagerDuty de-duplicates so you don't get multiple alerts for the same thing.
You should provide an incident key that will be unique per alert session, such as an email subject line or an ID number of an exception.
If you want to only use part of the incident key field, you can use a regular expression to parse it. If you use a regular expression, only the first matching group will be used as the incident key.
Examples of Regular Expressions you might use:
"Web Server (\S+) is UP" would turn "Web Server WWW41 is UP" into "WWW41"
"Recovery on (.*) port (.*)" would turn "Recovery on WWW41 port 443" into "WWW41"