The moment it happens
Turn new errors into GitHub issues with a Slack alert
Each new kind of error opens a GitHub issue with a likely cause, and the team is told in Slack. Repeats of a known error are not filed again.
- Runs
- The moment it happens
- Apps
- GitHub, Slack
- AI
- Yes, uses the built-in AI allowance
- Access
- issues:write; chat:write
Send this to your assistant
Create a ClickRuntime automation: when our app sends an error to the trigger link, check if we've seen it before; if not, have AI explain the likely cause, open a GitHub issue in acme/api and post it to #eng-alerts.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A startup's backend logs errors to a channel that scrolls past hundreds of times a day. Real new problems get lost among repeats of old ones, and nobody owns turning them into work. Bugs are found by customers instead.
Filing one GitHub issue per distinct error, with a first guess at the cause, turns the noise into a tracked list. The team sees new errors in Slack once, and each one lands in the backlog where it can be assigned and fixed.
What you get out of it
New errors stand out
Each distinct error is filed once. Repeats of something already known do not bury a new problem.
Errors become tracked work
An issue can be assigned, labelled and closed. Nothing depends on someone remembering a message in a busy channel.
A head start on the fix
AI reads the error and stack trace and suggests a likely cause. Whoever picks it up starts with a hypothesis, not a blank page.
The team hears once
A single Slack message per new error, with the issue link, keeps the alert channel calm. People pay attention because alerts are rare and specific.
How it works
What happens, step by step
When your app reports an error, it sends the details to your automation's trigger link.
ClickRuntime makes a fingerprint of the error and checks whether it has seen that error before.
For a new error, AI reads the message and stack trace and writes a short explanation of the likely cause.
A GitHub issue is opened with the error, the explanation and when it first happened.
A message with the issue link is posted to your #eng-alerts Slack channel.
Before it runs live
- Connect GitHub
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- Paste your automation's link into the other app's webhook settings
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
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Google Sheets
- Combine it with other GitHub and Slack steps into one automation
Under the hood
The code that runs this automation
import hashlib, re
from clickruntime import on_event, credentials, http, notify, state, ai
def gh(method, path, **kw):
resp = http.request(method, f"https://api.github.com{path}", headers={
"Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"}, **kw)
return resp.raise_for_status() or (resp.json() if resp.content else None)
REPO = "acme/api"
@on_event
def handle(event):
err = event.json or {}
top = "\n".join((err.get("stack") or "").splitlines()[:5])
fp = hashlib.sha1(re.sub(r"\d+", "N", f"{err.get('type')}|{err.get('message')}|{top}").encode()).hexdigest()[:12]
known = state.get("known") or {}
if fp in known:
return {"issue": known[fp], "new": False}
analysis = ai.generate(f"{err.get('type')}: {err.get('message')}\n{(err.get('stack') or '')[:3000]}",
system="Explain the most likely cause of this error in 3 short sentences.", max_output_tokens=200).text
issue = gh("POST", f"/repos/{REPO}/issues", json={"title": f"{err.get('type')}: {err.get('message', '')}"[:200], "labels": ["bug", "from-errors"],
"body": f"First seen {event.received_at}\n\n**Likely cause**\n{analysis}\n\n```\n{(err.get('stack') or '')[:5000]}\n```"})
known[fp] = issue["html_url"]
state.set("known", known)
notify.slack(f"New error filed: <{issue['html_url']}|{issue['title']}>\n{analysis}", channel="#eng-alerts")
return {"issue": issue["html_url"], "new": True}FAQ
Common questions
How does it decide two errors are the same?
What sends errors to it?
Does the AI see customer data in errors?
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
Get an AI first review on every pull request
Each new pull request gets a review comment pointing out likely bugs and risks, and Slack shows a one-line verdict with the link.
See how it worksSummarise documentation changes in Slack
When someone changes the docs in GitHub, Slack gets a short plain-language summary of what changed and why it matters.
See how it worksTriage new GitHub issues with AI and flag urgent ones
Every new GitHub issue is labelled by type and priority, possible duplicates are noted, and urgent ones are posted to Slack.
See how it worksKeep exploring
Set up “Turn new errors into GitHub issues with a Slack alert” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.