Automate Incident Management with n8n, PagerDuty, Jira & Mattermost

This workflow automates incident management by integrating PagerDuty, Jira, and Mattermost using n8n. It streamlines incident creation, acknowledgment, resolution, and team communication, saving valuable time and reducing manual errors.
webhook
jira
pagerDuty
+1
Workflow Identifier: 1030
NODES in Use: Webhook, Jira, PagerDuty, Mattermost

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

1. What This Automation Does

This n8n workflow connects PagerDuty incidents with Jira and Mattermost. It solves the problem of manual work to track and update incidents across tools. The result is automatic Jira issue creation, Mattermost channel setup, and live status updates via buttons.

When PagerDuty sends an incident alert, the workflow creates a Jira ticket for it. It also makes a new Mattermost channel named after the incident. Teams get instant notifications with links to PagerDuty and Jira.

Users in Mattermost can then acknowledge or resolve the incident by clicking buttons. These buttons update PagerDuty and Jira statuses instantly. The workflow also posts status updates in the Mattermost channel so everyone stays in sync.

This reduces manual copying and errors. It speeds up the incident lifecycle from alert to resolution. Teams save time and avoid confusion during incidents.


2. Tools and Services Used

  • PagerDuty API: Sends incident webhook events, status updates.
  • Jira Software Cloud API: Creates and manages Jira issues.
  • Mattermost API: Creates channels, sends messages, interactive buttons.
  • n8n Workflow Automation: Orchestrates the process and API calls.

3. Inputs, Processing, and Outputs

Inputs

  • PagerDuty incident webhook event with incident details.
  • User actions in Mattermost clicking acknowledge or resolve buttons.

Processing Steps

  • Receive PagerDuty webhook via Webhook node.
  • Create a Mattermost incident channel with Mattermost1 node.
  • Add on-call user to the channel using Mattermost2 node.
  • Create Jira issue linked to incident with Jira1 node.
  • Send notification messages to Mattermost with Mattermost3 and Mattermost4 nodes, including buttons.
  • Listen to acknowledgments or resolve button clicks with webhook nodes Ack and Resolve.
  • Update PagerDuty incident status via PagerDuty1 and PagerDuty2 nodes.
  • Update Jira issue status via Jira2 node.
  • Post status updates back to Mattermost with Mattermost5, Mattermost6, and Mattermost7 nodes.

Outputs

  • New Jira issue created per PagerDuty incident.
  • Mattermost channel created and users added.
  • Issue and incident status updated in PagerDuty and Jira automatically via Mattermost button interactions.
  • Real-time status messages posted to Mattermost channels.

4. Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Download and Import

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you want to run the automation.
  3. Use the Import from File option to add the downloaded workflow.

Step 2: Configure Credentials

  1. Add your PagerDuty API Key in n8n credentials.
  2. Add your Jira Software Cloud API credentials.
  3. Add your Mattermost API credentials.

Step 3: Update Configuration Items

  1. Check the Webhook node path and ensure it matches PagerDuty webhook setup.
  2. Update team ID and user IDs in Mattermost1 and Mattermost2 nodes to match your Mattermost environment.
  3. Change Jira project ID and hardcoded assignee user to your project and user in Jira1 node.
  4. Ensure all URLs in button payloads point to correct n8n webhook endpoints.

Step 4: Test the Workflow

  1. Create a test incident in PagerDuty to trigger the workflow.
  2. Watch for new Jira issues, Mattermost channels, and messages.

Step 5: Activate for Production

  1. Activate the workflow toggle to turn live.
  2. Monitor webhook logs for successful executions.

Using self-host n8n can improve control and security when running this workflow.


5. Step-by-Step Mini Breakdown of Workflow Nodes

Receiving the Incident

  1. Webhook node receives POST request from PagerDuty for new incidents.

Creating Mattermost Channel

  1. Mattermost1 node creates a channel named after the PagerDuty incident key.
  2. Mattermost2 node adds the on-call user to the new channel.

Creating Jira Issue

  1. Jira1 node creates a new issue with title from incident.
  2. The summary uses this expression for the title:
    = {{$node["Webhook"].json["body"]["event"]["data"]["title"]}}

Notifying Mattermost

  1. Mattermost3 sends a notification message with links to PagerDuty and Jira.
  2. Mattermost4 sends a message with buttons “Acknowledge” and “Resolve” that connect to webhook URLs.

Handling Button Clicks

  1. Ack webhook node receives acknowledge button clicks, updates PagerDuty incident status via PagerDuty1 node, and posts update to Mattermost5.
  2. Resolve webhook node receives resolve button clicks, updates PagerDuty via PagerDuty2 node, Jira issue via Jira2 node, and posts closure updates via Mattermost6 and Mattermost7 nodes.

6. Common Troubleshooting

  • Webhook does not receive events: Check PagerDuty webhook URL matches the Webhook node URL exactly and HTTP method is POST.
  • Jira issue creation fails: Verify Jira API Key permissions and that the project ID is correct in Jira1 node.
  • Mattermost buttons do not work: Confirm interactive button webhook URLs are correct and match Ack and Resolve webhook node URLs in n8n.

7. Customizations

  • Change the Jira project ID in Jira1 node to your project.
  • Modify Mattermost messages in Mattermost3 and Mattermost4 nodes for custom text or extra fields.
  • Add more buttons in Mattermost4 node for other incident actions using webhook URLs.
  • Make the Jira assignee dynamic by extracting it from the PagerDuty payload instead of hardcoding.
  • Notify multiple Mattermost channels by adding extra Mattermost nodes triggered on incident tags or priorities.

8. Pre-Production Checklist

  • Trigger test incidents in PagerDuty to verify webhook receipt.
  • Ensure Mattermost channels are created and correct users added.
  • Confirm Jira issues get created with correct projects and assignees.
  • Test interactive buttons to see if ack and resolve flows run properly.
  • Have a rollback plan to disable PagerDuty webhook if things go wrong.

9. Deployment Guide

Turn on the workflow toggle in n8n to make the automation live.

Monitor the webhook logs for calls from PagerDuty and button interactions.

Keep logs of all incident updates for review.

Set alerts in n8n for failures if desired.

Using self-host n8n is recommended for stability and control in production.


10. Summary

✓ Saves time by creating Jira tickets automatically from PagerDuty alerts.

✓ Sends instant Mattermost notifications and creates incident channels.

✓ Lets teams update incident status using Mattermost buttons that sync with PagerDuty and Jira.

✓ Reduces manual errors and speeds up incident resolution.

→ Links your incident tools into one smooth automated process.

→ Gives clear, real-time updates to everyone on the team.

Frequently Asked Questions

Set PagerDuty webhook URL to the n8n Webhook node URL and ensure the HTTP method is POST.
Check that Jira API credentials have create and assign permissions and the project ID is correct in the Jira1 node.
Verify the button webhook URLs point to the correct Ack and Resolve webhook node URLs configured in n8n.
Yes, the workflow works well with self-host n8n installations for better control and reliability.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free