πŸ”’ Monitor SSL certificate expiry dates with Google Sheets & Slack alerts

⚑ 214 views Β· πŸ”’ SecOps & Security Automation

Description

image.png

This n8n workflow illustrates how to monitor and track SSL certificate expiration dates for any domain using the SSL Checker node from customJS. It automatically updates a Google Sheet with the number of days left until expiry and sends a Slack notification when certificates are about to expire.


What this workflow does


Requirements


Workflow Steps

  1. Schedule Trigger

    • ⏰ Starts the workflow automatically (weekly by default, configurable).
  2. Google Sheets (Read Rows)

    • πŸ“„ Retrieves the list of domains from your Google Sheet.
  3. CustomJS - Check SSL

    • πŸ” Fetches SSL certificate details for each domain.
    • Returns JSON output with fields such as expires and daysLeft.
  4. Google Sheets (Update Rows)

    • πŸ“ Updates the sheet with the current number of days left until certificate expiry.
  5. Check Days Left Threshold (formerly β€œIf” node)

    • ⚠️ Evaluates whether the certificate expires within the threshold (e.g., < 8 days).
  6. Slack Node

    • πŸ’¬ Sends a notification message if a certificate is close to expiration.

    Example Slack alert message:

    ⏰ Reminder: SSL certificate of www.example.com 
    will expire in 7 days.

SSL Checker node JSON output

{
  "output": {
    "domain": "example.com",
    "valid": true,
    "expires": "2025-12-31T23:59:59.000Z",
    "issuer": "Let's Encrypt",
    "daysLeft": 5
  }
}

## πŸ”— Nodes Used

Google Sheets, Slack, Schedule Trigger

## πŸ“₯ Import

Download [`workflow.json`](workflow.json) and import into n8n:
**Workflow menu β†’ Import from File**

[πŸ“– Importing guide](../../../docs/importing-templates.md) Β· [πŸ”‘ Credential setup](../../../docs/credential-setup.md)