Daily
Get Telegram warnings before SSL certificates expire
Each day the domains in your sheet are checked, the days left on each certificate are written next to them, and you get a Telegram message for any under 14 days.
- Runs
- Daily
- Apps
- Google Sheets, Telegram
- AI
- Not needed
- Access
- Sheets read+write; Telegram bot token
Send this to your assistant
Create a ClickRuntime automation: every day, check the SSL certificate expiry for the domains in my sheet, write the days left next to each, and message me on Telegram for any under 14 days.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A web developer runs sites for several clients, some on hosts with automatic renewal and some with certificates installed by hand years ago. Renewal sometimes fails quietly: a changed DNS record, an expired card, a server that stopped running its renewal job. The first sign is a browser warning that scares away a client's customers.
This automation checks every domain in your sheet once a day, writes the number of days left beside each one, and sends you a Telegram message when any certificate is within 14 days of expiry. You get two weeks to fix renewal instead of finding out from a client.
What you get out of it
Time to fix renewals calmly
A two-week warning gives room to chase a hosting provider or renew a certificate by hand. Fixing it on your schedule beats an emergency after visitors see a security warning.
One list for every domain
Certificates from different hosts and providers sit in one sheet with their days left. You can sort by the column to see what needs attention first.
Catches silent renewal failures
Automatic renewal usually works, which is why nobody notices when it stops. A daily outside check catches the failure while there is still time.
Protects your clients' trust
An expired certificate makes a site look unsafe and stops sales. Preventing it is a small, visible part of the service you provide.
How it works
What happens, step by step
Once a day, ClickRuntime reads the list of domains from your sheet.
It looks up the most recent certificate issued for each domain in the public certificate logs and reads its expiry date.
It writes the number of days left next to each domain.
If any certificate has fewer than 14 days left, or no certificate is found for a domain, you get one Telegram message listing them.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Telegram
What you get
Build your own
Need it to work differently?
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 Telegram steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timezone
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http
SHEET_ID = "your-spreadsheet-id"
CHAT_ID = "your-telegram-chat-id"
def expiry(domain):
entries = http.get("https://crt.sh/", params={"q": domain, "output": "json"}, timeout=30).json()
dates = [e["not_after"] for e in entries if domain in e.get("name_value", "").splitlines()]
return datetime.fromisoformat(max(dates)).replace(tzinfo=timezone.utc)
def days_left(domain):
return (expiry(domain) - datetime.now(timezone.utc)).days
@on_trigger
def run(event):
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
domains = [r[0].strip() for r in sheets.values().get(spreadsheetId=SHEET_ID, range="Domains!A2:A").execute().get("values", []) if r]
column, warnings = [], []
for d in domains:
try:
left = days_left(d)
except Exception:
left = "no certificate found"
column.append([left])
if left == "no certificate found" or left < 14:
warnings.append(f"{d}: {left}" + ("" if left == "no certificate found" else " days left"))
sheets.values().update(spreadsheetId=SHEET_ID, range=f"Domains!B2:B{len(domains) + 1}", valueInputOption="RAW", body={"values": column}).execute()
if warnings:
token = credentials.secret("TELEGRAM_BOT_TOKEN")
http.post(f"https://api.telegram.org/bot{token}/sendMessage", json={"chat_id": CHAT_ID, "text": "🔒 SSL expiring soon:\n" + "\n".join(warnings)})
return {"checked": len(domains), "warnings": len(warnings)}FAQ
Common questions
Which domains can I put in the sheet?
Can I change the 14-day threshold?
What if no certificate is found for a domain?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Send a weekly Telegram message to every chat in a sheet
Write your announcement once in a sheet and every Telegram chat on your list gets it on Monday morning, with each one marked as sent.
See how it worksGet Telegram alerts when a site in your sheet goes down
Every site in your sheet is checked every 5 minutes, its status is kept up to date, and you get a Telegram message when one goes down or recovers.
See how it worksTrack competitor prices from a sheet
List competitor product pages in a sheet and get a Telegram message whenever one of their prices changes, with the latest price recorded in the sheet.
See how it worksKeep exploring
Set up “Get Telegram warnings before SSL certificates expire” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.