Skip to content

On a schedule

Open Jira issues and ping Telegram for provider incidents

When a service you depend on reports a new incident on its status page, a Jira issue is opened and your team gets a Telegram message.

Runs
On a schedule
Apps
Jira, Telegram
AI
Optional
Access
Jira write; bot token

Send this to your assistant

Create a ClickRuntime automation: every 10 minutes, check the status pages of Cloudflare and our payment provider; for each new incident, open a Jira issue in OPS and ping our team on Telegram.

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 small e-commerce company depends on a CDN, a payment provider and an email service. When one of them has an incident, customers see errors and the team spends an hour debugging their own code before someone thinks to check the provider's status page.

Picking up provider incidents as they are announced, opening a ticket and pinging the team, saves that wasted hour. The team knows the cause at once and can tell customers what is happening.

What you get out of it

  • Know the cause straight away

    A ping as soon as a provider reports an incident stops the team chasing problems in their own code.

  • Incidents are tracked

    Each provider incident gets a Jira issue. Its impact and your response are recorded.

  • One alert per incident

    Incidents already reported are remembered. Updates to the same incident do not cause new alerts.

  • A plain summary if you want it

    With AI turned on, the message explains what the incident means for your service in a sentence.

How it works

What happens, step by step

  1. Every 10 minutes, ClickRuntime reads the list of current incidents from your providers' status pages.

  2. It skips incidents it has already reported.

  3. If you turn on AI, it writes a one-line summary of what the incident means for you.

  4. For each new incident, it opens a Jira issue in your operations project.

  5. Your Telegram bot sends the team a message with the incident and the issue key.

Before it runs live

  • Connect Jira
  • Connect Telegram

What you get

RunsOn a schedule
Open Jira issues and ping Telegram for provider incidentstoday, 9:00Succeeded
Telegram · Ops bot⚠️ Cloudflare: Elevated errors in Europe (minor) Some shoppers in Europe may see slow pages. Tracking in OPS-733

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

  • Run it at a different time, more or less often, or only on weekdays
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Jira and Telegram 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.
incident_alerts_create_jira_issues_and_telegram_pings.pyexample
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched

JIRA, SITE = "https://api.atlassian.com/ex/jira/your-cloud-id", "https://acme.atlassian.net/browse/"
adf = lambda text: {"type": "doc", "version": 1, "content": [{"type": "paragraph", "content": [{"type": "text", "text": text}]}]}

def jira(method, path, **kw):
    resp = http.request(method, JIRA + path, headers={"Authorization": f"Bearer {credentials.connection('jira', 'work')}", "Accept": "application/json"}, **kw)
    return resp.raise_for_status() or (resp.json() if resp.content else None)
CHAT_ID = "123456789"

def telegram(text, chat_id=CHAT_ID):
    http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage", json={"chat_id": chat_id, "text": text}).raise_for_status()

PAGES = {"Cloudflare": "https://www.cloudflarestatus.com/api/v2/incidents/unresolved.json",
         "Payments": "https://status.payments-provider.example/api/v2/incidents/unresolved.json"}

@on_trigger
def run(event):
    seen = set(state.get("seen") or [])
    new = [(name, i) for name, url in PAGES.items() for i in http.get(url).json()["incidents"] if i["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"new": 0}
    for name, inc in new:
        note = inc["name"]
        try:
            note = ai.generate(f"{name}: {inc['name']}\n{(inc.get('incident_updates') or [{}])[0].get('body', '')}", max_output_tokens=60,
                               system="In one sentence, say what this provider incident may mean for an online shop.").text
        except (ai.AINotIncluded, ai.AILimitReached):
            pass
        key = jira("POST", "/rest/api/3/issue", json={"fields": {"project": {"key": "OPS"}, "issuetype": {"name": "Task"},
                   "summary": f"{name} incident: {inc['name']}"[:250], "description": adf(f"{note}\n{inc['shortlink']}")}})["key"]
        telegram(f"⚠️ {name}: {inc['name']} ({inc['impact']})\n{note}\nTracking in {key}")
        seen.add(inc["id"])
    state.set("seen", sorted(seen)[-500:])
    return {"new": len(new)}

FAQ

Common questions

Which status pages does it work with?
Any that publish incidents in the common status page format, which most large providers use, including Cloudflare. Give it the status page address.
Can it close the Jira issue when the incident is resolved?
Not in this version. You can add a step that comments or resolves the issue when the provider marks the incident resolved.
How quickly will we hear?
Within the check interval, such as 10 minutes, of the provider posting the incident.
What permissions does it need?
Jira write; bot token. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). Checks that find nothing to do 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 “Open Jira issues and ping Telegram for provider incidents” from your assistant

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