Do you forget when your SSL certificates expire?
If yes, you are not alone.
Many developers and website owners face this problem. SSL expiry can break your website and cause downtime.
In this guide, you will learn:
How to monitor SSL expiry in n8n
How to send alerts to Telegram
How to build a simple automation workflow
How to format a clean table message
This guide is very simple. Even beginners can follow it.
What You Will Build
You will create a system that:
- Runs every day at Anytime
- Checks SSL expiry using Certbot
- Sends a Telegram message
- Shows data in a clean table format

Requirements
Before starting, make sure you have:
- n8n installed
- VPS with Certbot installed
- Telegram account
- Basic idea of workflows
Step 1: Create a Telegram Bot
- Open Telegram
- Search BotFather
- Send: /newbot
- Follow steps and get your Bot Token
Step 2: Get Your Chat ID
- Open your bot
- Send: /start
- Open this URL: https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
- Copy your chat id
Step 3: Create n8n Workflow
Open n8n and create a new workflow.
Step 3.1: Add Cron Trigger
- Add Cron Node
- Set:
- Every day
- Time: 6 PM

Step 3.2: Add Execute Command Node
Add a node:
Execute Command
Command: sudo certbot certificates

⚠️ Important Note
Make sure this works without password: sudo certbot certificates
Step 4: Build Report (Code Node)
Now we convert raw data into a table.
Add Code / Function node
Paste this code:
👉 (In your real blog, keep full code)
This code:
- extracts domain name
- gets expiry date
- calculates days left
- creates a table

Step 5: Send Message using HTTP Request
Instead of Telegram node, we use HTTP Request.
Setup:
Method: POST
Fields:
| Name | Value |
|---|---|
| chat_id | {{$json.chatId}} |
| text | {{$json.message}} |
| parse_mode | HTML |
Step 6: Final Output
Your Telegram message will look like this: SSL Expiry Report
ankurchemist.in 2026-04-27 31
swiftmazetech.com 2026-05-06 39
Common Errors & Fixes
Error: chat not found
Fix:
- Send
/startto bot - Use correct chat_id
Error: No output
Fix:
- Check certbot command
- Check sudo permission
Error: HTTP request failed
Fix:
- Check bot token
- Check URL
Pro Tips
- Add emoji for warnings (🔴, 🟡)
- Sort by days left
- Add alert for < 7 days
- Save logs
Why This Method is Powerful
- Fully automated
- No manual checking
- Works for multiple domains
- Easy to scale
Conclusion
Now you know how to monitor SSL expiry in n8n with Telegram.
You built a real automation system that:
- saves time
- prevents downtime
- keeps your websites safe
FAQ
Q1: Can I run this without n8n?
Yes, you can use cron + Python script.
Q2: Can I monitor multiple servers?
Yes, use SSH or API.
Q3: Can I send email instead of Telegram?
Yes, replace HTTP node with email node.



No Comments