Skip to content

Every 5 minutes

Get an email when an incident is declared

Within a few minutes of a new incident in incident.io, you get an email with its name and severity.

Runs
Every 5 minutes
Apps
incident.io
AI
Not needed
Access
view incidents

Send this to your assistant

Create a ClickRuntime automation: check incident.io every 5 minutes and email me at oncall@acme.com whenever a new incident is declared, with its name, severity and link.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A customer-facing API starts returning errors at 2:10 in the afternoon, and an on-call engineer declares an incident in incident.io. The people who need to know, such as the support lead, the account managers for affected customers and the product owner, are not in the incident channel. They find out forty minutes later when a customer emails to ask whether something is wrong, and now they are answering questions with no information.

Every 5 minutes, ClickRuntime lists incidents in incident.io, picks out the ones it has not announced yet, and emails you about each. The message names the incident, shows its severity and status, and links to it. The IDs of announced incidents are remembered so nobody gets the same alert twice.

It is especially useful for managers and customer-facing staff who need to hear about outages but should not have to sit in every incident channel.

What you get out of it

  • Customer teams hear before customers do

    When support and account managers get an email within minutes of an incident being declared, they can prepare a holding statement. Customers receive a calm, informed reply instead of confusion.

  • Leaders are not surprised in meetings

    An executive who learns about an outage from a customer on a call loses confidence in the team. A prompt alert gives leadership time to ask the right questions and stay ahead of the story.

  • Fewer people in noisy incident channels

    Incident rooms work best with responders only. An email alert lets observers stay informed from a distance, which keeps the channel quiet and the responders focused on diagnosis. That keeps the incident room usable for the people fixing the problem, while everyone else follows along by email.

  • Severity tells recipients how to react

    Seeing the severity in the message separates a minor degradation from a full outage. Recipients can decide whether to drop everything or simply be aware, instead of treating every alert as an emergency.

  • A timestamped record of who was told

    Each alert email shows when notification went out. If a customer asks how long it took you to acknowledge a problem, the mailbox provides a clear answer. That timeline also helps when you review how quickly the wider company learned about a problem, separate from how quickly engineers fixed it.

How it works

What happens, step by step

  1. Every five minutes ClickRuntime checks incident.io for incidents.

  2. It skips the ones it has already told you about.

  3. For each new incident you get an email with its severity, name and a link.

Before it runs live

  • Connect incident.io

What you get

RunsEvery 5 minutes
Get an email when an incident is declaredtoday, 9:00Succeeded
Email · New incident[SEV2] Checkout payments failing for EU customers https://app.incident.io/acme/incidents/214

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other incident.io steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
get_alerted_on_new_incidents.pyexample
from clickruntime import on_trigger, credentials, http, notify, state, report_fetched

IO = "https://api.incident.io"

def io(path, **params):
    resp = http.get(f"{IO}{path}", params=params, headers={"Authorization": f"Bearer {credentials.secret('INCIDENT_IO_API_KEY')}"})
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    incidents = io("/v2/incidents", page_size=50)["incidents"]
    seen = state.get("seen")
    new = [i for i in incidents if seen is not None and i["id"] not in seen]
    report_fetched(len(new))
    if seen is not None and not new:
        return {"new": 0}
    for i in new:
        severity = (i.get("severity") or {}).get("name", "unset")
        notify.email_me(f"[{severity}] {i['name']}", i["permalink"])
    state.set("seen", list(set(seen or []) | {i["id"] for i in incidents})[-500:])
    return {"new": len(new)}

FAQ

Common questions

Does it alert on incidents created from a test or a drill?
It announces any incident that incident.io lists, which can include drills if your team declares them in the same account. If you flag drills with a mode or naming convention, you can ask for those to be skipped.
Can I be alerted only for critical incidents?
Yes. You can add a severity condition, such as only SEV1 and SEV2, so minor incidents never reach your inbox. Because severity is part of each incident, the filter applies before any email is sent.
How quickly will I know after an incident is declared?
The check runs every 5 minutes, so you are normally told within about 5 minutes of the incident appearing in incident.io. It is a polling check rather than an instant push, which is fine for awareness but not a replacement for paging the on-call team.
What permissions does it need?
view incidents. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get an email when an incident is declared” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.