Skip to content

Daily

Never let an SSL certificate expire

Keep your domains in a sheet, and Slack warns you three weeks before any certificate runs out.

Runs
Daily
Apps
Google Sheets, Slack
AI
Not needed
Access
Sheets read+write; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: every day, check the SSL certificate of each domain in my Domains sheet, update the days left, and post to #ops any that expire within 21 days.

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 agency manages websites for thirty clients, each with its own domain and some with subdomains for shops or portals. Certificates are meant to renew automatically, but a changed DNS record, a moved hosting account or a failed renewal job can silently stop that. When one expires, visitors see a full-screen browser warning, checkout stops and the client calls the agency on a Saturday morning.

Each day, ClickRuntime reads the domain list from your sheet, makes a TLS connection to each one and reads the certificate's expiry date. It writes the days remaining back to the sheet, and posts in Slack about certificates that expire within the warning window, such as 21 days.

Agencies, IT teams and small businesses with several domains use it as a backstop for automatic renewal.

What you get out of it

  • No browser warning pages for customers

    An expired certificate makes browsers block visitors with a red warning. Alerts weeks ahead give you time to fix renewal so shoppers never see that message. Lost visits and abandoned carts are avoided before they happen, which matters most for shops.

  • Failed auto-renewals are caught

    Automatic renewal depends on DNS, hosting and scripts that change over time. Checking the actual certificate, not the renewal system, catches the case where renewal quietly stopped. Silent renewal failures are a common cause of outages for sites that were never touched.

  • Weekend emergencies avoided

    Certificates tend to expire at inconvenient moments. A warning three weeks early turns a Saturday crisis into a routine task on a Tuesday afternoon. Planned maintenance happens in working hours, with the right people in the office.

  • Every domain in one view

    The sheet shows days remaining for all domains, sorted by urgency. A manager can see the whole portfolio at a glance and spot the oldest certificates without logging into each hosting panel.

  • Client trust and contracts protected

    Agencies are blamed when a client's site shows a security warning. Showing you checked certificates daily is a concrete part of the service you provide, and protects the relationship. Clients notice when everything just keeps working.

How it works

What happens, step by step

  1. Every day, ClickRuntime reads your list of domains from your Google Sheet.

  2. It connects to each website and checks how many days are left on its SSL certificate.

  3. The days left are written back into the sheet.

  4. Any certificate that expires within three weeks is listed in your #ops Slack channel with the days remaining.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsDaily
Never let an SSL certificate expiretoday, 9:00Succeeded
Slack · #ops🔐 SSL certificates expiring soon • shop.example.com: 9 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 Gmail
  • Combine it with other Google Sheets 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.
ssl_expiry_alerts_to_slack.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, notify

SHEET_ID = "your-spreadsheet-id"

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

@on_trigger
def run(event):
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    domains = [r[0] for r in sheets.spreadsheets().values().get(spreadsheetId=SHEET_ID, range="Domains!A2:A")
               .execute().get("values", []) if r]
    days = [days_left(d) for d in domains]
    sheets.spreadsheets().values().update(spreadsheetId=SHEET_ID, range=f"Domains!B2:B{len(domains) + 1}",
                                          valueInputOption="RAW", body={"values": [[n] for n in days]}).execute()
    soon = [f"• {d}: {n} days left" for d, n in zip(domains, days) if n <= 21]
    if soon:
        notify.slack("🔐 SSL certificates expiring soon\n" + "\n".join(soon), channel="#ops")
    return {"checked": len(domains), "expiring": len(soon)}

FAQ

Common questions

How far ahead will it warn me?
You choose the window. 30 days suits manual renewals, while 14 or 21 days is enough for certificates that renew automatically and only need a nudge when renewal fails. You can set a second, stricter alert for the last week.
Does it check subdomains and non-standard ports?
Yes, list each hostname you want checked as its own row, including subdomains such as shop.example.com. A port other than 443 can be specified in the row. Wildcard certificates are checked through any hostname they cover.
What happens if a site is down or unreachable?
A failed connection is reported separately from an expiring certificate, so you can tell the two apart. The sheet shows an error status for that domain and a message goes to Slack, because an unreachable site is also worth knowing about.
What permissions does it need?
Sheets read+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 (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 “Never let an SSL certificate expire” from your assistant

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