Skip to content

Daily

Get a Linear issue before an SSL certificate expires

Each morning the domains in your sheet are checked, and any certificate expiring within 30 days gets one Linear issue and a Slack message.

Runs
Daily
Apps
Google Sheets, Linear
AI
Not needed
Access
Sheets read; Linear write

Send this to your assistant

Create a ClickRuntime automation: every day at 8am, read the domains in my Google Sheet, check when each SSL certificate expires, and create one Linear issue for any that expire within 30 days. Tell me in Slack too.

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

An operations engineer at an agency looks after certificates for client sites, internal tools and a few marketing domains. Most renew automatically, but some sit on older hosting or use certificates bought by hand. When one lapses, visitors see a browser warning, checkout pages stop working, and the first sign is usually an annoyed email from a client.

This automation checks every domain in a shared sheet each morning and opens a Linear issue as soon as a certificate is within 30 days of expiring, so renewing it becomes planned work rather than an emergency.

What you get out of it

  • No more surprise browser warnings

    A month's notice leaves plenty of time to renew, even when it needs a client's card or a registrar login. Visitors never see the warning page. Your team avoids the scramble of a site that suddenly looks unsafe.

  • Renewals land where work is tracked

    The issue appears in Linear next to the rest of the team's work, with the domain and expiry date in it. Someone can be assigned, and it gets closed when done. Nothing relies on a calendar reminder in one person's account.

  • One issue per certificate

    Each expiring certificate is reported once, not every morning until it is fixed. The board stays clean and the issue keeps its history. A new issue is only opened for the next renewal cycle.

  • The domain list is easy to keep up

    Adding a domain means adding a row to the sheet, which anyone on the team can do. New client sites are covered on the day they launch. Retired domains are removed just as easily.

  • Catches certificates that failed to auto-renew

    Automatic renewal sometimes breaks silently after a DNS or hosting change. A daily check spots the stale certificate long before it expires. That makes it a safety net for your automatic setup too.

How it works

What happens, step by step

  1. Every morning at 8am, ClickRuntime reads the list of domains from your Google Sheet.

  2. It connects to each domain and reads when its SSL certificate expires.

  3. For any certificate expiring within 30 days, it creates a Linear issue with the domain and expiry date.

  4. It remembers which certificates already have an issue, so each one is only reported once.

  5. A short Slack message lists any new issues it created.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Linear

What you get

RunsDaily
Get a Linear issue before an SSL certificate expirestoday, 9:00Succeeded
Linear · OpsRenew SSL for shop.northwind.example (expires 2026-11-14), 26 days left

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 Google Sheets and Linear 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.
ssl_certificate_expiry_check_from_a_sheet_linear_issues.pyexample
import socket, ssl
from datetime import datetime, timezone
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, notify

SHEET_ID = "your-spreadsheet-id"
TEAM_ID = "your-linear-team-id"
MUTATION = "mutation($i: IssueCreateInput!) { issueCreate(input: $i) { issue { url } } }"

def expiry(domain):
    with socket.create_connection((domain, 443), timeout=10) as s:
        with ssl.create_default_context().wrap_socket(s, server_hostname=domain) as t:
            return datetime.fromtimestamp(ssl.cert_time_to_seconds(t.getpeercert()["notAfter"]), timezone.utc)

@on_trigger
def run(event):
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    rows = sheets.spreadsheets().values().get(spreadsheetId=SHEET_ID, range="Domains!A2:A").execute().get("values", [])
    domains = [r[0].strip() for r in rows if r]
    reported, created = state.get("reported") or {}, []
    for d in domains:
        try:
            exp = expiry(d)
        except Exception:
            continue
        days, key = (exp - datetime.now(timezone.utc)).days, f"{d}|{exp.date()}"
        if days <= 30 and key not in reported:
            http.post("https://api.linear.app/graphql", headers={"Authorization": credentials.secret("LINEAR_API_KEY")},
                      json={"query": MUTATION, "variables": {"i": {"teamId": TEAM_ID, "title": f"Renew SSL for {d} (expires {exp.date()})"}}})
            reported[key] = True
            created.append(f"{d} in {days} days")
    state.set("reported", reported)
    if created:
        notify.slack("SSL renewals due: " + ", ".join(created), channel="#ops")
    return {"checked": len(domains), "new_issues": len(created)}

FAQ

Common questions

Does it check certificates on subdomains?
Yes, as long as each subdomain is listed as its own row, such as shop.example.com or api.example.com. Each name is checked separately because they can have different certificates.
What if a domain cannot be reached at all?
That domain is skipped for the day and checked again the next morning. If you prefer, unreachable domains can also be reported so you notice sites that are down or have moved.
Can I change the 30-day warning window?
Yes. Thirty days suits most teams, but you can choose a longer window for certificates that take time to buy, or a shorter one if renewals are quick.
What permissions does it need?
Sheets read; Linear 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 (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 “Get a Linear issue before an SSL certificate expires” from your assistant

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