Kaffeeundcode
n8n Flow-Bibliothek
n8n Workflow 01.06.2026

Flow Arbeitsbereich

VPP Token Expiry Warning

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

Workflow Diagramm

auto-generiert
graph LR
    N0(["⚡ Daily Check"])
    N1["🔧 Get VPP Tokens"]
    N2["🔧 Filter Expiring"]
    N3[["📤 Slack Alert"]]
    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

08_VPP_Token_Expiry_Warning.json

{
    "name": "08_VPP_Token_Expiry_Warning",
    "nodes": [
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {
                            "field": "days"
                        }
                    ]
                }
            },
            "name": "Daily Check",
            "type": "n8n-nodes-base.schedule",
            "typeVersion": 1,
            "position": [
                250,
                300
            ]
        },
        {
            "parameters": {
                "authentication": "predefinedCredentialType",
                "nodeCredentialType": "microsoftGraphOAuth2Api",
                "requestMethod": "GET",
                "url": "https://graph.microsoft.com/v1.0/deviceAppManagement/vppTokens",
                "options": {}
            },
            "name": "Get VPP Tokens",
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 3,
            "position": [
                450,
                300
            ],
            "credentials": {
                "microsoftGraphOAuth2Api": {
                    "id": "YOUR_CREDENTIAL_ID",
                    "name": "Microsoft Graph Account"
                }
            }
        },
        {
            "parameters": {
                "functionCode": "const tokens = items[0].json.value;nconst now = new Date();nconst thirtyDays = 30 * 24 * 60 * 60 * 1000;nnreturn tokens.filter(t => {n  const expiry = new Date(t.expirationDateTime);n  return (expiry - now) < thirtyDays;n}).map(t => ({ json: t }));"
            },
            "name": "Filter Expiring",
            "type": "n8n-nodes-base.function",
            "typeVersion": 1,
            "position": [
                650,
                300
            ]
        },
        {
            "parameters": {
                "resource": "chat",
                "message": "=⚠️ **VPP Token Expiring Soon** ⚠️nToken Name: {{ $json.displayName }}nExpires: {{ $json.expirationDateTime }}nnPlease renew immediately in Apple Business Manager."
            },
            "name": "Slack Alert",
            "type": "n8n-nodes-base.slack",
            "typeVersion": 1,
            "position": [
                850,
                300
            ]
        }
    ],
    "connections": {
        "Daily Check": {
            "main": [
                [
                    {
                        "node": "Get VPP Tokens",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Get VPP Tokens": {
            "main": [
                [
                    {
                        "node": "Filter Expiring",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Filter Expiring": {
            "main": [
                [
                    {
                        "node": "Slack Alert",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    }
}