Skip to content

Daily

Run daily checks that open Jira tickets when something fails

Each day your SSL certificates and key endpoints are checked, and any new problem opens a Jira ticket and sends you an email.

Runs
Daily
Apps
Gmail, Jira
AI
Not needed
Access
Jira create issues; gmail.send

Send this to your assistant

Create a ClickRuntime automation: every morning, check our domains' SSL certificates expire in more than 21 days and our health endpoints respond; for each new problem, open a ticket in OPS and email me.

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 SaaS company had its website go dark for an afternoon because an SSL certificate expired. The renewal email had gone to someone who had left. Similar slow-burn problems, like a nightly job silently failing, are found only when a customer complains.

A daily set of checks that opens a ticket when something is wrong gives these problems an owner before they become outages. The email makes sure someone sees it, and the ticket makes sure it is tracked to a fix.

What you get out of it

  • Expiry dates are not missed

    Certificates are flagged three weeks before they expire. Renewal happens calmly, not during an outage.

  • Problems become tracked work

    Each failure opens a ticket. It is assigned, worked and closed like any other task.

  • One ticket per problem

    Known problems are remembered and not ticketed again each day. The ticket closes the loop when it is fixed.

  • Easy to extend

    Add checks for anything you can test from the web, such as a nightly export file or an API usage limit.

How it works

What happens, step by step

  1. Every morning, ClickRuntime runs your list of checks, such as certificate expiry and whether key pages respond.

  2. It compares each failure with the problems it already knows about.

  3. For each new problem, it opens a ticket in your Jira project.

  4. You get an email listing the new problems and their tickets.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Jira

What you get

RunsDaily
Run daily checks that open Jira tickets when something failstoday, 9:00Succeeded
Email · 1 new monitoring problemsOPS-421 SSL certificate for app.acme.example expires in 18 days

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
  • 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 Gmail and Jira 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.
monitoring_checks_that_open_jira_tickets_and_email.pyexample
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, notify, state

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)

DOMAINS, HEALTH = ["acme.example", "app.acme.example"], ["https://app.acme.example/health"]

def cert_days(host):
    resp = http.get(f"https://{host}", stream=True, timeout=10)
    not_after = resp.raw.connection.sock.getpeercert()["notAfter"]
    resp.close()
    return (datetime.strptime(not_after, "%b %d %H:%M:%S %Y %Z").replace(tzinfo=timezone.utc) - datetime.now(timezone.utc)).days

@on_trigger
def run(event):
    problems = {}
    for d in DOMAINS:
        if (days := cert_days(d)) < 21:
            problems[f"ssl:{d}"] = f"SSL certificate for {d} expires in {days} days"
    for url in HEALTH:
        try:
            ok = http.get(url, timeout=10).ok
        except Exception:
            ok = False
        if not ok:
            problems[f"health:{url}"] = f"Health check failed for {url}"
    known = state.get("known") or {}
    created = []
    for key, text in problems.items():
        if key not in known:
            known[key] = jira("POST", "/rest/api/3/issue", json={"fields": {"project": {"key": "OPS"}, "issuetype": {"name": "Task"}, "summary": text}})["key"]
            created.append(f"{known[key]} {text}")
    if created:
        notify.email_me(f"{len(created)} new monitoring problems", "\n".join(created))
    state.set("known", {k: v for k, v in known.items() if k in problems})
    return {"problems": len(problems), "new": len(created)}

FAQ

Common questions

What kinds of checks can it run?
Anything that can be tested over HTTPS: certificate expiry, a page or health endpoint responding, a file being recent, or a usage figure from a provider's API staying under a limit.
What happens when a problem is fixed?
Once a check passes again, the problem is forgotten, so if it fails again later a new ticket is opened.
Can it post to Slack as well?
Yes. Ask for a Slack message in addition to the email.
What permissions does it need?
Jira create issues; gmail.send. 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 runs (daily). 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 “Run daily checks that open Jira tickets when something fails” from your assistant

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