How to Monitor SSL Expiry in n8n with Telegram by AutomizeHub.aI

How to Monitor SSL Expiry in n8n with Telegram (Step-by-Step Guide)

AI Agent Guide

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

n8n ssl expiry monitoring workflow with telegram alert

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

  1. Open Telegram
  2. Search BotFather
  3. Send: /newbot
  4. Follow steps and get your Bot Token

Step 2: Get Your Chat ID

  1. Open your bot
  2. Send: /start
  3. Open this URL: https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
  4. 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

n8n cron trigger 6pm daily

Step 3.2: Add Execute Command Node

Add a node:

Execute Command

Command: sudo certbot certificates

This will fetch SSL expiry data.

n8n execute command certbot certificates

⚠️ Important Note

Make sure this works without password: sudo certbot certificates

If not, add sudo permission using: sudo visudo

Step 4: Build Report (Code Node)

Now we convert raw data into a table.

Add Code / Function node

Paste this code:

// (same code you already have – shortened here for blog readability)

👉 (In your real blog, keep full code)

This code:

  • extracts domain name
  • gets expiry date
  • calculates days left
  • creates a table

n8n code node ssl expiry parsing

Step 5: Send Message using HTTP Request

Instead of Telegram node, we use HTTP Request.

Setup:

Method: POST

URL: https://api.telegram.org/botYOUR_BOT_TOKEN/sendMessage
Body Type: Form URL Encoded

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

Domain Name Expire Date Days Left
ankurchemist.in 2026-04-27 31
swiftmazetech.com 2026-05-06 39

Common Errors & Fixes

Error: chat not found

Fix:

  • Send /start to 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.

Author

AutomizeHub.ai is a leading AI automation agency and AI Agents Platform focused on transforming how businesses work through intelligent automation. Our team of AI engineers, automation experts, and strategists create smart agents and custom solutions that help companies save time, improve efficiency, and scale faster. We share insights, tutorials, and real-world strategies on AI adoption, agentic AI, and workflow automation to help businesses stay ahead in the automation era. Learn more about our work at AutomizeHub.ai

No Comments

Leave a comment

Your email address will not be published. Required fields are marked *