Skip to content

On a schedule

Open Linear issues for expiring SSL certificates

Any domain whose certificate expires within 30 days gets one Linear issue and a Slack alert, well before visitors see a browser warning.

Runs
On a schedule
Apps
Linear, Slack
AI
Not needed
Access
Linear write; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: every morning at 8, check the SSL certificates on my domains. For any that expire within 30 days, open a Linear issue once and post to #ops.

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 product team runs a marketing site, an app, an API and a handful of customer-specific subdomains. Most certificates renew on their own, but one sits on an old load balancer and another was bought by hand years ago. Nobody remembers which. The first sign of trouble is a customer screenshot of a full-page browser warning, and by then sign-ups and API calls have already been failing for hours.

Checking each morning and turning anything close to expiry into a Linear issue puts the renewal into the same queue as the rest of the team's work, with a month of warning instead of none.

What you get out of it

  • A month of warning, not a morning of panic

    Thirty days is enough time to renew a manual certificate, wait for a vendor, or fix a broken auto-renewal. The work gets planned instead of done in a rush while the site is down.

  • The renewal lands in your normal workflow

    A Linear issue can be assigned, estimated and tracked like any other task. It shows up in planning and does not depend on someone remembering a Slack message.

  • One issue per certificate, not one per day

    Each expiring certificate opens a single issue, even though the check runs every morning. Your backlog stays clean and the issue stays the one place for that renewal.

  • Catches the certificates auto-renewal misses

    Certificates that renew themselves can still fail quietly when DNS or a validation step changes. A daily check of the live certificate shows what visitors will actually get, not what the provider dashboard claims.

  • Covers every domain in one list

    Subdomains, client sites and old hosts all sit in one list. Adding a domain is one line, so new ones do not slip through.

How it works

What happens, step by step

  1. Every morning at 8, ClickRuntime checks the security certificate on each domain in your list.

  2. It reads the expiry date and picks out any certificate that runs out within 30 days.

  3. For each one it opens a Linear issue, remembering which ones already have an issue so you never get duplicates.

  4. A short alert with the domain and the days left is posted to your #ops Slack channel.

Before it runs live

  • Connect Linear
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsOn a schedule
Open Linear issues for expiring SSL certificatestoday, 9:00Succeeded
Slack · #opsSSL certificates expiring soon: shop.northwind.com: 21 days left (OPS-142)

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 Google Sheets
  • Combine it with other Linear 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.
open_linear_issues_for_expiring_ssl_certificates.pyexample
import socket, ssl
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, state, notify

DOMAINS = ["example.com", "app.example.com", "api.example.com"]
TEAM_ID = "your-linear-team-id"

def days_left(host):
    with socket.create_connection((host, 443), timeout=10) as sock:
        with ssl.create_default_context().wrap_socket(sock, server_hostname=host) as s:
            expires = datetime.fromtimestamp(ssl.cert_time_to_seconds(s.getpeercert()["notAfter"]), timezone.utc)
    return (expires - datetime.now(timezone.utc)).days

@on_trigger
def run(event):
    opened = state.get("opened") or {}
    alerts = []
    for host in DOMAINS:
        days = days_left(host)
        if days > 30 or host in opened:
            continue
        query = "mutation($i: IssueCreateInput!) { issueCreate(input: $i) { issue { identifier } } }"
        r = http.post("https://api.linear.app/graphql", headers={"Authorization": credentials.secret("LINEAR_API_KEY")},
                      json={"query": query, "variables": {"i": {"teamId": TEAM_ID, "title": f"Renew SSL certificate for {host} ({days} days left)"}}}).json()
        opened[host] = r["data"]["issueCreate"]["issue"]["identifier"]
        alerts.append(f"{host}: {days} days left ({opened[host]})")
    if alerts:
        notify.slack("SSL certificates expiring soon:\n" + "\n".join(alerts), channel="#ops")
    state.set("opened", opened)
    return {"checked": len(DOMAINS), "new_issues": len(alerts)}

FAQ

Common questions

Does it check the certificate my visitors see?
Yes. It connects to each domain the way a browser does and reads the expiry date from the certificate that is actually being served, so a renewed certificate that was never installed still shows as expiring.
What happens after I renew the certificate?
The next morning's check sees the new expiry date and stops alerting. The Linear issue stays open until you close it, so you can confirm the renewal before marking it done.
Can I use a different warning window than 30 days?
Yes. Some teams prefer 45 days for certificates that need a purchase order, or 14 days for ones that usually renew themselves. The window is a single number in the setup.
What permissions does it need?
Linear write; Slack chat:write. 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 (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 Linear issues for expiring SSL certificates” from your assistant

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