Automated SSL Certificate Expiry Alert System - n8n Workflow

Use this robust n8n workflow to proactively monitor SSL certificate expiry. It pulls URLs from Google Sheets, checks validity via API, and sends severity-based alerts using Gmail, Telegram, and Ntfy.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

IT Administrators and DevOps Teams: Individuals responsible for maintaining website security and uptime.
Website Owners: Users who need assurance that their SSL certificates will not expire unexpectedly.
Automation Enthusiasts: Those looking for practical n8n templates to implement infrastructure monitoring.
Technical Agencies: Teams managing multiple client websites needing a centralized monitoring solution.

Overview

Managing SSL certificate renewal dates across numerous domains can be challenging and prone to manual error, leading to expired certificates, security warnings, and service disruption. This powerful n8n workflow solves this problem by providing a fully automated, proactive monitoring system.

The system runs on a defined schedule, utilizing Google Sheets as the central database for URLs to monitor. For each URL, the n8n node performs an external check to determine validity and remaining days. The core logic uses a Switch n8n node to categorize threats (Invalid, Warning (<30 days), Notice (<60 days), Info) and trigger appropriate communication channels—ensuring that high-priority issues result in urgent alerts via Telegram and Gmail, while less critical notifications are logged or sent via other services like Ntfy. This specific n8n template ensures you never miss a critical renewal deadline.

How it Works

The entire process is initiated by the Weekly Trigger n8n trigger, configured to run once every week, ensuring regular checks.


  1. Data Retrieval (Fetch URLs): The first step uses a Google Sheets n8n node to fetch the complete list of target URLs from a specified sheet (e.g., Column A of 'Sheet1').

  2. SSL Check (Check SSL): Each URL is passed sequentially to the Check SSL HTTP Request n8n node, which queries the ssl-checker.io API. This API returns detailed information, including whether the certificate is valid (certvalid) and the number of days remaining (daysleft).

  3. Severity Routing (Switch): A crucial Switch n8n node analyzes the results for each URL and routes the item based on conditional logic:

Invalid: If certvalid is false (urgent action required).
Warning: If days
left is less than or equal to 30 days.
Notice: If days_left is less than or equal to 60 days.
Info: All other valid certificates.

  1. Multi-Channel Alerting: Based on the severity path, the n8n workflow dispatches alerts:

Invalid Path sends urgent messages via Send Alert Email4 (Gmail) and Telegram.
Warning Path sends a priority warning via Send Alert Email2 (Gmail).
Notice Path sends an informational email via Send Alert Email1 (Gmail).
Info Path sends non-critical confirmation via Send Alert Email6 (Gmail) and Ntfy4.

  1. Data Logging (URLs to Monitor): Finally, regardless of the alert severity, the workflow updates a dedicated sheet in Google Sheets with the latest certificate status, host, days remaining, and result, ensuring all activity is logged.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it directly into your n8n instance.

  2. Google Sheet Setup: Clone the required Google Sheet template (or create your own) with a list of target URLs. Ensure you have separate sheets for URL input and logging outputs.

  3. Configure Credentials:

Google Sheets: Set up your Google Sheets OAuth2 API credentials. Update the Fetch URLs and URLs to Monitor n8n nodes with the correct Document ID and Sheet names.
Gmail: Configure your Gmail OAuth2 credentials for sending alerts. This credential is used by multiple Gmail n8n nodes.
* Telegram/Ntfy: Set up API credentials for the Telegram n8n node and Ntfy n8n node if you plan to use these channels for urgent alerts.

  1. Final Activation: Activate the n8n workflow. The Weekly Trigger will ensure the monitoring starts automatically based on the configured schedule.

Node Details

This n8n workflow utilizes several key nodes to manage monitoring, routing, and communication:

Weekly Trigger (n8n trigger):
Function: Starts the n8n workflow automatically.
Key Configuration: Set to trigger weekly, specifically on Mondays at 8 AM.
Fetch URLs (Google Sheets n8n node):
Function: Retrieves the list of URLs to be checked from the input sheet.
Key Configuration: Reads data from 'Sheet1' of the configured 'Monitor SSL' spreadsheet.
Check SSL (HTTP Request n8n node):
Function: Queries the ssl-checker.io API using an expression to dynamically insert the fetched URL, retrieving certificate details.
Key Configuration: Uses a constructed URL expression based on the input item's URL field.
Switch (Core Logic n8n node):
Function: Routes the workflow execution based on the API response (certvalid and daysleft).
Key Configuration: Four outputs: 'invalid', 'warning' (<= 30 days), 'notice' (<= 60 days), and 'info' (fallback).
Send Alert Email4 / Send Alert Email2 / Send Alert Email1 / Send Alert Email6 (Gmail n8n node):
Function: Handles email notifications for different severity levels.
Key Configuration: Subjects are dynamically generated using expressions like URGENT: SSL-certificate invalid, action required! - {{ $json.result.host }}.
Telegram (n8n node):
Function: Sends urgent notifications for invalid certificates.
Key Configuration: Sends a message detailing the urgent requirement for action.
URLs to Monitor (Google Sheets n8n node):
Function: Logs the final status and certificate details back into a specified Google Sheet for record-keeping and auditing.
* Key Configuration: Operation set to 'appendOrUpdate' to maintain a running log of checks.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Medical doctor and self-taught IT-enthusiast.

Featured*