Skip to content

The moment it happens

Alert Slack on production errors with one Jira bug per error

Production errors are posted to Slack straight away, and each distinct error opens exactly one Jira bug, with repeats added as comments.

Runs
The moment it happens
Apps
Jira, Slack
AI
Optional
Access
Jira create; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: when an error arrives at the trigger link, post it to #alerts, and open a Jira bug in ENG unless there's already an open ticket for the same error; if there is, add a comment instead.

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 web app's monitoring sends every error to Slack, and someone creates Jira bugs by hand when they have time. The same error ends up with three tickets, while a new one goes unticketed because everyone assumed someone else had filed it.

Posting each error immediately and filing exactly one ticket per distinct error, with repeats noted as comments, keeps the backlog accurate. The team sees how often each error happens and fixes the noisiest first.

What you get out of it

  • Instant awareness

    Errors reach Slack in seconds. The team knows about problems before customers report them.

  • One ticket per problem

    Repeats of the same error are added to the open ticket. The backlog stays clean.

  • Frequency is visible

    Comments on the ticket show each time the error happened again. The noisiest errors are easy to spot.

  • Severity in the alert

    Each Slack post shows the error's severity. Critical problems stand out from warnings.

How it works

What happens, step by step

  1. When your monitoring reports an error, it sends the details to your automation's trigger link.

  2. The error is posted to your #alerts Slack channel with its severity.

  3. ClickRuntime makes a fingerprint of the error and looks for an open Jira ticket with the same fingerprint.

  4. If there is one, it adds a comment with the new occurrence; if not, it opens a new bug.

  5. If you turn on AI, new tickets include a short note on the likely cause.

Before it runs live

  • Connect Jira
  • 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

RunsThe moment it happens
Alert Slack on production errors with one Jira bug per errorjust nowSucceeded
Slack · #alerts[critical] TimeoutError in payments-api: upstream did not respond in 30s New bug ENG-977 opened for this error

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
  • 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 Jira and Slack 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.
error_alerts_to_slack_with_deduplicated_jira_tickets.pyexample
import hashlib
from clickruntime import on_event, credentials, http, notify, ai

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)

@on_event
def handle(event):
    err = event.json or {}
    text = f"{err.get('name')} in {err.get('service')}: {err.get('message', '')}"
    notify.slack(f"[{err.get('severity', 'error')}] {text}", channel="#alerts")
    fp = "err-" + hashlib.sha1(f"{err.get('service')}|{err.get('name')}".encode()).hexdigest()[:10]
    found = jira("POST", "/rest/api/3/search/jql", json={"jql": f'project = ENG AND labels = "{fp}" AND statusCategory != Done', "fields": ["key"], "maxResults": 1})["issues"]
    if found:
        jira("POST", f"/rest/api/3/issue/{found[0]['key']}/comment", json={"body": adf(f"Happened again at {event.received_at}: {text}")})
        return {"issue": found[0]["key"], "new": False}
    note = ""
    try:
        note = ai.generate(f"{text}\n{(err.get('stack') or '')[:3000]}", system="Give the likely cause in 2 sentences.", max_output_tokens=120).text
    except (ai.AINotIncluded, ai.AILimitReached):
        pass
    issue = jira("POST", "/rest/api/3/issue", json={"fields": {"project": {"key": "ENG"}, "issuetype": {"name": "Bug"}, "labels": [fp],
                 "summary": f"[Error] {err.get('name')} in {err.get('service')}"[:250], "description": adf(f"{text}\n\n{note}")}})
    notify.slack(f"New bug {issue['key']} opened for this error: {SITE}{issue['key']}", channel="#alerts")
    return {"issue": issue["key"], "new": True}

FAQ

Common questions

How are errors matched to existing tickets?
Each error gets a fingerprint from its service and error name, stored as a label on the ticket. A new error with the same fingerprint finds the open ticket.
What happens after the ticket is closed?
If the same error returns after its ticket is done, a new ticket is opened, so regressions are not hidden.
Can AI explain the error?
Yes, optionally. AI can add a short note on the likely cause to new tickets.
What permissions does it need?
Jira create; Slack chat:write. 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 for each event the app sends.
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 “Alert Slack on production errors with one Jira bug per error” from your assistant

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