Introduction

Ensuring your websites have valid SSL certificates is crucial for security and user trust. With n8n and the CustomJS SSL Checker node, you can automate the monitoring of your SSL certificates to prevent unexpected expirations.

Why Automate SSL Checks in n8n?

  • Proactively prevent website downtime due to expired certificates.
  • Automate compliance and security monitoring.
  • Receive alerts before a certificate expires.

n8n Template

Link to n8n Workflow

Prerequisites

  • A self-hosted n8n instance
  • The CustomJS PDF Toolkit node installed
  • A list of domains to check

Workflow Overview

The workflow consists of the following steps:

  1. Get Domains – Provide a list of domains to monitor.
  2. Check SSL – Use the SSL Checker node to get certificate details.
  3. Alert if Necessary - Check the expiration date and send an alert if it's soon.

Step-by-Step Guide

1. Get the List of Domains

Use a Google Sheets node, a Code node with a hardcoded list, or any other node to provide the domains.

2. Check SSL Certificates with the Toolkit

  • Add the SSL Checker node from the CustomJS Toolkit.
  • Connect the input containing the list of domains.
  • The node will output details for each domain, including the expiration date and days remaining.

3. Create Expiration Alerts

  • Add an IF node to check if days_remaining is below a certain threshold (e.g., 30 days).
  • If true, send a notification via Email, Slack, or another messaging service.

Final Thoughts

Automating SSL certificate checks helps you avoid downtime and security issues. By integrating the SSL Checker node, you can ensure your domains are always secure and compliant.