<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nightshift Labs</title>
    <description>The latest articles on DEV Community by Nightshift Labs (@nightshiftlabs).</description>
    <link>https://dev.to/nightshiftlabs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4036864%2F615cee28-94bd-40ee-8fbe-73814ab005a1.png</url>
      <title>DEV Community: Nightshift Labs</title>
      <link>https://dev.to/nightshiftlabs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nightshiftlabs"/>
    <language>en</language>
    <item>
      <title>How to Automate PagerDuty Incident Triage with n8n and Claude (Step by Step)</title>
      <dc:creator>Nightshift Labs</dc:creator>
      <pubDate>Sun, 19 Jul 2026 18:05:49 +0000</pubDate>
      <link>https://dev.to/nightshiftlabs/how-to-automate-pagerduty-incident-triage-with-n8n-and-claude-step-by-step-2ck8</link>
      <guid>https://dev.to/nightshiftlabs/how-to-automate-pagerduty-incident-triage-with-n8n-and-claude-step-by-step-2ck8</guid>
      <description>&lt;p&gt;If you're on call, you know the worst part isn't the hard incidents — it's the first five minutes of every page, half-awake, trying to figure out what's even on fire from a wall of raw metrics.&lt;/p&gt;

&lt;p&gt;In this guide I'll show you how to wire up an AI triage assistant that, the moment a PagerDuty alert fires, posts a clear, structured summary to your Slack incident channel — using n8n (a free automation tool) and Claude (Anthropic's LLM). It runs on your own infrastructure, costs a couple cents per incident, and needs no server or database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What we're building&lt;/strong&gt;&lt;br&gt;
PagerDuty alert  →  n8n webhook  →  Claude  →  structured triage in Slack&lt;/p&gt;

&lt;p&gt;The triage message answers, in seconds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What's on fire, in plain English&lt;/li&gt;
&lt;li&gt;Likely blast radius&lt;/li&gt;
&lt;li&gt;What changed recently (deploys, config)&lt;/li&gt;
&lt;li&gt;A severity sanity-check&lt;/li&gt;
&lt;li&gt;Suggested first moves (reversible-first)&lt;/li&gt;
&lt;li&gt;A confidence level and the biggest unknown&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites (all free to start)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An &lt;strong&gt;n8n&lt;/strong&gt; account (free self-hosted, or a Cloud trial)&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;Anthropic API key&lt;/strong&gt; (pay-as-you-go, ~1–2¢ per incident)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Slack incoming webhook&lt;/strong&gt; for your incident channel&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PagerDuty&lt;/strong&gt; (a free developer account works for testing)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — Receive the alert&lt;/strong&gt;&lt;br&gt;
Add a Webhook node in n8n. This gives you a URL you'll point PagerDuty's v3 webhooks at. It fires every time an incident triggers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Normalize the payload&lt;/strong&gt;&lt;br&gt;
A Code node pulls the useful fields out of PagerDuty's payload — title, service, urgency, the alert body, and any recent-deploy info — into a clean object. Real triage quality depends on how much context your alerts carry, so it's worth enriching your Alertmanager annotations with deploy + metric details.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 — Call Claude&lt;/strong&gt;&lt;br&gt;
An HTTP Request node calls &lt;a href="https://api.anthropic.com/v1/messages" rel="noopener noreferrer"&gt;https://api.anthropic.com/v1/messages&lt;/a&gt;. The system prompt is where the magic (and the discipline) lives. The key instructions that make an SRE trust the output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write for experienced engineers who punish confident nonsense.&lt;/li&gt;
&lt;li&gt;Say &lt;strong&gt;"insufficient signal"&lt;/strong&gt; instead of guessing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never fabricate&lt;/strong&gt; a runbook URL, metric, or root cause. Root cause is a hypothesis to check, never a conclusion.&lt;/li&gt;
&lt;li&gt;Mark inferences as inferences.
That "don't bluff" framing is the single biggest difference between a genuinely useful triage bot and a generic AI-wrapper that hallucinates diagnoses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4 — Post to Slack&lt;/strong&gt;&lt;br&gt;
A final &lt;strong&gt;HTTP Request&lt;/strong&gt; node posts the formatted message to your Slack incoming webhook. Add a fail-safe: if the Claude call errors, post the raw alert instead, so an incident is never silently dropped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The result&lt;/strong&gt;&lt;br&gt;
A P1 fires. Within seconds your channel shows: "Postgres connection pool near exhaustion (198/200), causing POST /charge latency and error spikes," the likely blast radius, the suspicious recent deploy, and three reversible-first actions — with the AI honestly flagging what it isn't sure about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Going further: auto-drafted postmortems&lt;/strong&gt;&lt;br&gt;
The same pattern extends to the end of an incident: feed Claude the incident + timeline when it resolves, and have it draft a blameless postmortem — contributing factors written as questions for the team, hypotheses labelled not confirmed, an action-items table. You edit and publish; the blank page is gone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the workflows&lt;/strong&gt;&lt;br&gt;
I've packaged both of these — production-ready triage and postmortem workflows, the tuned prompts, and a setup guide with screenshots — as the &lt;strong&gt;Incident-Ops Kit&lt;/strong&gt;. There's a &lt;strong&gt;free single-workflow version&lt;/strong&gt; to try first: &lt;a href="https://nightshiftlabs.gumroad.com/l/pvynan" rel="noopener noreferrer"&gt;https://nightshiftlabs.gumroad.com/l/pvynan&lt;/a&gt; — and the full kit is linked inside the download.&lt;/p&gt;

&lt;p&gt;If you build your own version from this guide, I'd love to hear how it goes.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ai</category>
      <category>automation</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
