{
  "name": "paperless Erinnerung",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "3861a5ae-9227-4901-974c-349b11cd97b9",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "url": "=http://paperless.example.local:8010/api/documents/",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "custom_field_query",
              "value": "=[\"Erinnerung\",\"exact\",\"{{ $now.format(\"yyyy-MM-dd\") }}\"]"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        208,
        0
      ],
      "id": "0dd65ee1-06cf-4073-9ef6-3114ef91ed6c",
      "name": "HTTP Request",
      "credentials": {
        "httpHeaderAuth": {
          "id": "zQn0ENjxIiA12bCK",
          "name": "Paperless Authentication"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        176
      ],
      "id": "af70a094-c421-4213-9cff-156891d3bd16",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "chatId": "",
        "text": "=⚠️ Erinnerung an \"{{ $json.results[0].title }}\". Bitte wirf einen Blick auf das Dokument in Paperless.\n\nNotizen zum Dokument: {{ $json.results[0].notes.length > 0 ? 'Zusätzliche Notizen in paperless verfügbar' : 'Keine vorhanden' }}\n\nDu hast festgelegt, dass du an dieses Dokument heute erinnert werden willst.",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        640,
        0
      ],
      "id": "d6f9c828-0fa9-45ef-8988-228aee7d45f6",
      "name": "Send a text message",
      "webhookId": "d95c352d-a746-4668-9398-2ca6e7b3c37f",
      "credentials": {
        "telegramApi": {
          "id": "",
          "name": "Bot"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "9d62a185-a536-40fb-8e4e-774ada894626",
              "leftValue": "={{ $json.count }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        416,
        0
      ],
      "id": "0c068399-c3b1-41ca-8fa2-2f4ae53ce25f",
      "name": "If"
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "2fbbfbff-23b3-4c33-a24a-b4bcf6ba6d19",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": ""
  },
  "nodeGroups": [],
  "id": "kIIrWlNo5SOWyuQF",
  "tags": []
}