Kaffeeundcode
n8n Flow-Bibliothek
n8n Workflow 01.06.2026

Flow Arbeitsbereich

SSL Certificate Expiry

Flow prüfen, Nodes verstehen, JSON importieren und Credentials sauber anpassen.

Workflow Diagramm

auto-generiert
graph LR
    N0(["⚡ Weekly Check"])
    N1["🔧 Get SSL Date"]
    N2["🔧 Calculate Days"]
    N3{"🔀 If < 14 Days"}
    N4[["📤 Notify Telegram"]]
    N0 --> N1
    N1 --> N2
    N2 --> N3
    N3 --> N4

    classDef trigger fill:#f59e0b,stroke:#b45309,color:#000
    classDef action fill:#292524,stroke:#44403c,color:#e7e5e4
    classDef logic fill:#1e1b4b,stroke:#4338ca,color:#c7d2fe
    class N0 trigger
    class N1 action
    class N2 action
    class N3 logic
    class N4 action

32_SSL_Certificate_Expiry.json

{
    "name": "32_SSL_Certificate_Expiry",
    "nodes": [
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {
                            "field": "weeks"
                        }
                    ]
                }
            },
            "name": "Weekly Check",
            "type": "n8n-nodes-base.schedule",
            "typeVersion": 1,
            "position": [
                250,
                300
            ]
        },
        {
            "parameters": {
                "command": "echo | openssl s_client -servername your-website.com -connect your-website.com:443 2>/dev/null | openssl x509 -noout -enddate"
            },
            "name": "Get SSL Date",
            "type": "n8n-nodes-base.executeCommand",
            "typeVersion": 1,
            "position": [
                450,
                300
            ]
        },
        {
            "parameters": {
                "functionCode": "const output = items[0].json.stdout;n// format: notAfter=MMM DD HH:MM:SS YYYY GMTnconst dateStr = output.replace('notAfter=', '');nconst expiryDate = new Date(dateStr);nconst now = new Date();nconst daysLeft = Math.floor((expiryDate - now) / (1000 * 60 * 60 * 24));nnreturn [{ json: { daysLeft, expiryDate: expiryDate.toISOString() } }];"
            },
            "name": "Calculate Days",
            "type": "n8n-nodes-base.function",
            "typeVersion": 1,
            "position": [
                650,
                300
            ]
        },
        {
            "parameters": {
                "conditions": {
                    "number": [
                        {
                            "value1": "={{ $json.daysLeft }}",
                            "operation": "smaller",
                            "value2": 14
                        }
                    ]
                }
            },
            "name": "If < 14 Days",
            "type": "n8n-nodes-base.if",
            "typeVersion": 1,
            "position": [
                850,
                300
            ]
        },
        {
            "parameters": {
                "chatId": "YOUR_CHAT_ID",
                "text": "=⚠️ **SSL Expiring Soon**nYour certificate expires in {{ $json.daysLeft }} days.",
                "additionalFields": {
                    "parse_mode": "Markdown"
                }
            },
            "name": "Notify Telegram",
            "type": "n8n-nodes-base.telegram",
            "typeVersion": 1,
            "position": [
                1050,
                300
            ],
            "credentials": {
                "telegramApi": {
                    "id": "YOUR_TELEGRAM_ID",
                    "name": "Telegram Account"
                }
            }
        }
    ],
    "connections": {
        "Weekly Check": {
            "main": [
                [
                    {
                        "node": "Get SSL Date",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Get SSL Date": {
            "main": [
                [
                    {
                        "node": "Calculate Days",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Calculate Days": {
            "main": [
                [
                    {
                        "node": "If < 14 Days",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "If < 14 Days": {
            "main": [
                [
                    {
                        "node": "Notify Telegram",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    }
}