Kaffeeundcode
n8n Flow-Bibliothek
n8n Workflow 01.06.2026

Flow Arbeitsbereich

Low Disk Space Report

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

Workflow Diagramm

auto-generiert
graph LR
    N0(["⚡ Weekly Schedule"])
    N1["🔧 Get Device HW Info"]
    N2["🔧 Filter Low Disk"]
    N3["🔧 Send Teams Report"]
    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

17_Low_Disk_Space_Report.json

{
    "name": "17_Low_Disk_Space_Report",
    "nodes": [
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {
                            "field": "weeks",
                            "triggerAtDay": 1,
                            "triggerAtHour": 9
                        }
                    ]
                }
            },
            "name": "Weekly Schedule",
            "type": "n8n-nodes-base.schedule",
            "typeVersion": 1,
            "position": [
                250,
                300
            ]
        },
        {
            "parameters": {
                "authentication": "predefinedCredentialType",
                "nodeCredentialType": "microsoftGraphOAuth2Api",
                "requestMethod": "GET",
                "url": "https://graph.microsoft.com/beta/deviceManagement/managedDevices?$select=deviceName,userPrincipalName,hardwareInformation",
                "options": {}
            },
            "name": "Get Device HW Info",
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 3,
            "position": [
                450,
                300
            ],
            "credentials": {
                "microsoftGraphOAuth2Api": {
                    "id": "YOUR_CREDENTIAL_ID",
                    "name": "Microsoft Graph Account"
                }
            }
        },
        {
            "parameters": {
                "functionCode": "const devices = items[0].json.value;nconst lowDisk = devices.filter(d => {n  if (!d.hardwareInformation || !d.hardwareInformation.totalStorageSpace || !d.hardwareInformation.freeStorageSpace) return false;n  const total = d.hardwareInformation.totalStorageSpace;n  const free = d.hardwareInformation.freeStorageSpace;n  return (free / total) < 0.1;n});nnreturn [{ json: { count: lowDisk.length, report: lowDisk.map(d => `${d.deviceName} (${d.userPrincipalName})`).join('\n') } }];"
            },
            "name": "Filter Low Disk",
            "type": "n8n-nodes-base.function",
            "typeVersion": 1,
            "position": [
                650,
                300
            ]
        },
        {
            "parameters": {
                "resource": "chat",
                "message": "=💾 **Low Disk Space Report**n{{ $json.count }} devices have less than 10% free space:nn{{ $json.report }}"
            },
            "name": "Send Teams Report",
            "type": "n8n-nodes-base.microsoftTeams",
            "typeVersion": 1,
            "position": [
                850,
                300
            ]
        }
    ],
    "connections": {
        "Weekly Schedule": {
            "main": [
                [
                    {
                        "node": "Get Device HW Info",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Get Device HW Info": {
            "main": [
                [
                    {
                        "node": "Filter Low Disk",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Filter Low Disk": {
            "main": [
                [
                    {
                        "node": "Send Teams Report",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    }
}