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.
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
Every 10 minutes, ClickRuntime reads the list of current incidents from your providers' status pages.
It skips incidents it has already reported.
If you turn on AI, it writes a one-line summary of what the incident means for you.
For each new incident, it opens a Jira issue in your operations project.
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
Build your own
Need it to work differently?
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
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?
Can it close the Jira issue when the incident is resolved?
How quickly will we hear?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Escalate overdue Jira tasks with a Telegram alert
Each morning overdue Jira tasks are raised to high priority and the manager gets one Telegram message listing them.
See how it worksCreate Jira tickets from Telegram messages
Staff message an IT problem to your Telegram bot, a structured Jira ticket is created, and the bot replies with the ticket number.
See how it worksGet alerts about security issues that affect you
When a serious vulnerability is published for software you use, your security channel hears about it the same hour.
See how it worksKeep exploring
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.