Daily
Check SSL expiry for domains in Notion and warn on Telegram
Every domain in your Notion database is checked daily, its expiry date is updated, and you get a Telegram message for any expiring within 14 days.
- Runs
- Daily
- Apps
- Notion, Telegram
- AI
- Not needed
- Access
- Notion read+write; bot token
Send this to your assistant
Create a ClickRuntime automation: every day, check SSL expiry for each domain in my Notion Domains database, update the expiry date, and message me on Telegram about any expiring within 14 days.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small hosting and maintenance business keeps its client domains in a Notion database, alongside the client, the host and the renewal notes. Certificate expiry dates in that database are typed in by hand and quickly go stale. When a renewal fails, the database still says everything is fine.
This automation checks each domain's certificate every day, writes the real expiry date back into Notion, and sends a Telegram message when any is within 14 days of expiring. Your database stays accurate and you get time to act.
What you get out of it
Expiry dates you can trust
The dates in Notion come from the live certificate, not from memory. Anyone reading the database sees the truth.
Warnings with time to act
Two weeks' notice is enough to sort out a failed renewal with a client's host. No more weekend emergencies.
Keeps your client records in one place
Domains stay next to the rest of your client information in Notion. There is no separate spreadsheet or tool to maintain.
Alerts reach you anywhere
A Telegram message arrives on your phone wherever you are. You know about a problem without logging into anything.
How it works
What happens, step by step
Once a day, ClickRuntime reads every domain in your Notion Domains database.
It looks up the most recent certificate issued for each domain in the public certificate logs and reads when it expires.
It writes that date into the Expires field of the domain's Notion entry.
If any certificate expires within 14 days, or no certificate is found for a domain, you get one Telegram message listing them.
Before it runs live
- Connect Notion and share the database you want it to 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 Notion and Telegram steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http
DOMAINS_DB, CHAT_ID = "your-notion-database-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)
@on_trigger
def run(event):
notion = {"Authorization": f"Bearer {credentials.connection('notion', 'work')}", "Notion-Version": "2022-06-28"}
pages = http.post(f"https://api.notion.com/v1/databases/{DOMAINS_DB}/query", headers=notion, json={"page_size": 100}).json()["results"]
warnings = []
for p in pages:
title = p["properties"]["Name"]["title"]
domain = title[0]["plain_text"].strip() if title else ""
if not domain:
continue
try:
expires = expiry(domain)
except Exception:
warnings.append(f"{domain}: no certificate found")
continue
http.patch(f"https://api.notion.com/v1/pages/{p['id']}", headers=notion, json={"properties": {"Expires": {"date": {"start": expires.date().isoformat()}}}})
days = (expires - datetime.now(timezone.utc)).days
if days < 14:
warnings.append(f"{domain}: {days} days left")
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(pages), "warnings": len(warnings)}FAQ
Common questions
What does the Notion database need?
What if no certificate is found for a domain?
Can I use a different warning window?
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
Get your Notion tasks as a Telegram digest
Each morning or each Sunday evening, your upcoming Notion tasks arrive on Telegram, grouped the way you plan.
See how it worksSave relevant RSS articles to Notion with Telegram alerts
Articles from your feeds that match your topics are saved to Notion with a summary, and the best ones are sent to you on Telegram.
See how it worksGet Telegram nudges for stale leads in your Notion CRM
Every weekday morning, leads you have not contacted in 7 days are sent to you on Telegram, each with a suggested follow-up message.
See how it worksKeep exploring
Set up “Check SSL expiry for domains in Notion and warn on Telegram” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.