Kaffeeundcode
n8n Flow-Bibliothek
n8n Workflow 01.06.2026

Flow Arbeitsbereich

Port Scanner

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

Workflow Diagramm

auto-generiert
graph LR
    N0(["⚡ Weekly Schedule"])
    N1["🔧 Scan Ports"]
    N2["🔧 Analyze Results"]
    N3[["📤 Notify Telegram"]]
    N0 --> N1
    N1 --> N2
    N2 --> N3

    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 action

33_Port_Scanner.json

{
    "name": "33_Port_Scanner",
    "nodes": [
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {
                            "field": "weeks",
                            "triggerAtDay": 1
                        }
                    ]
                }
            },
            "name": "Weekly Schedule",
            "type": "n8n-nodes-base.schedule",
            "typeVersion": 1,
            "position": [
                250,
                300
            ]
        },
        {
            "parameters": {
                "command": "nc -zv your-ip-or-domain 22 3389 80 443"
            },
            "name": "Scan Ports",
            "type": "n8n-nodes-base.executeCommand",
            "typeVersion": 1,
            "position": [
                450,
                300
            ],
            "continueOnFail": true
        },
        {
            "parameters": {
                "functionCode": "const output = items[0].json.stderr; // nc outputs to stderr usuallynconst openPorts = [];nif (output.includes('succeeded') || output.includes('open')) {n  openPorts.push('Ports detected open!');n}nreturn [{ json: { output, open: openPorts.length > 0 } }];"
            },
            "name": "Analyze Results",
            "type": "n8n-nodes-base.function",
            "typeVersion": 1,
            "position": [
                650,
                300
            ]
        },
        {
            "parameters": {
                "chatId": "YOUR_CHAT_ID",
                "text": "=🛡️ **Port Scan Results**nn{{ $json.output }}",
                "additionalFields": {
                    "parse_mode": "Markdown"
                }
            },
            "name": "Notify Telegram",
            "type": "n8n-nodes-base.telegram",
            "typeVersion": 1,
            "position": [
                850,
                300
            ],
            "credentials": {
                "telegramApi": {
                    "id": "YOUR_TELEGRAM_ID",
                    "name": "Telegram Account"
                }
            }
        }
    ],
    "connections": {
        "Weekly Schedule": {
            "main": [
                [
                    {
                        "node": "Scan Ports",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Scan Ports": {
            "main": [
                [
                    {
                        "node": "Analyze Results",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Analyze Results": {
            "main": [
                [
                    {
                        "node": "Notify Telegram",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    }
}