265 lines
8.1 KiB
JSON
265 lines
8.1 KiB
JSON
{
|
|
"name": "LibreBooking Beispiel-Workflows",
|
|
"description": "Sammlung von Beispiel-Workflows für den LibreBooking n8n Node",
|
|
"workflows": [
|
|
{
|
|
"name": "1. Alle Reservierungen abrufen",
|
|
"description": "Ruft alle Reservierungen der nächsten 14 Tage ab",
|
|
"nodes": [
|
|
{
|
|
"parameters": {},
|
|
"name": "Start",
|
|
"type": "n8n-nodes-base.manualTrigger",
|
|
"typeVersion": 1,
|
|
"position": [100, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"resource": "reservation",
|
|
"operation": "getAll",
|
|
"filters": {}
|
|
},
|
|
"name": "Alle Reservierungen",
|
|
"type": "n8n-nodes-librebooking.libreBooking",
|
|
"typeVersion": 1,
|
|
"position": [300, 300],
|
|
"credentials": {
|
|
"libreBookingApi": "LibreBooking Account"
|
|
}
|
|
}
|
|
],
|
|
"connections": {
|
|
"Start": {
|
|
"main": [[{"node": "Alle Reservierungen", "type": "main", "index": 0}]]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "2. Neue Reservierung erstellen",
|
|
"description": "Erstellt eine neue Reservierung für morgen 10:00-11:00 Uhr",
|
|
"nodes": [
|
|
{
|
|
"parameters": {},
|
|
"name": "Start",
|
|
"type": "n8n-nodes-base.manualTrigger",
|
|
"typeVersion": 1,
|
|
"position": [100, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"resource": "reservation",
|
|
"operation": "create",
|
|
"resourceId": 1,
|
|
"startDateTime": "={{ $now.plus({days: 1}).set({hour: 10, minute: 0, second: 0}).toISO() }}",
|
|
"endDateTime": "={{ $now.plus({days: 1}).set({hour: 11, minute: 0, second: 0}).toISO() }}",
|
|
"title": "Automatisch erstellte Reservierung",
|
|
"additionalFields": {
|
|
"description": "Diese Reservierung wurde automatisch über n8n erstellt"
|
|
}
|
|
},
|
|
"name": "Reservierung erstellen",
|
|
"type": "n8n-nodes-librebooking.libreBooking",
|
|
"typeVersion": 1,
|
|
"position": [300, 300],
|
|
"credentials": {
|
|
"libreBookingApi": "LibreBooking Account"
|
|
}
|
|
}
|
|
],
|
|
"connections": {
|
|
"Start": {
|
|
"main": [[{"node": "Reservierung erstellen", "type": "main", "index": 0}]]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "3. Ressourcen-Verfügbarkeit prüfen",
|
|
"description": "Prüft die Verfügbarkeit aller Ressourcen",
|
|
"nodes": [
|
|
{
|
|
"parameters": {},
|
|
"name": "Start",
|
|
"type": "n8n-nodes-base.manualTrigger",
|
|
"typeVersion": 1,
|
|
"position": [100, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"resource": "resource",
|
|
"operation": "getAvailability"
|
|
},
|
|
"name": "Verfügbarkeit prüfen",
|
|
"type": "n8n-nodes-librebooking.libreBooking",
|
|
"typeVersion": 1,
|
|
"position": [300, 300],
|
|
"credentials": {
|
|
"libreBookingApi": "LibreBooking Account"
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"conditions": {
|
|
"boolean": [
|
|
{
|
|
"value1": "={{ $json.available }}",
|
|
"value2": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"name": "Nur Verfügbare",
|
|
"type": "n8n-nodes-base.if",
|
|
"typeVersion": 1,
|
|
"position": [500, 300]
|
|
}
|
|
],
|
|
"connections": {
|
|
"Start": {
|
|
"main": [[{"node": "Verfügbarkeit prüfen", "type": "main", "index": 0}]]
|
|
},
|
|
"Verfügbarkeit prüfen": {
|
|
"main": [[{"node": "Nur Verfügbare", "type": "main", "index": 0}]]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "4. Benutzer-Übersicht",
|
|
"description": "Ruft alle Benutzer ab und formatiert sie",
|
|
"nodes": [
|
|
{
|
|
"parameters": {},
|
|
"name": "Start",
|
|
"type": "n8n-nodes-base.manualTrigger",
|
|
"typeVersion": 1,
|
|
"position": [100, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"resource": "user",
|
|
"operation": "getAll",
|
|
"userFilters": {}
|
|
},
|
|
"name": "Alle Benutzer",
|
|
"type": "n8n-nodes-librebooking.libreBooking",
|
|
"typeVersion": 1,
|
|
"position": [300, 300],
|
|
"credentials": {
|
|
"libreBookingApi": "LibreBooking Account"
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"mode": "runOnceForEachItem",
|
|
"jsCode": "return {\n json: {\n name: `${$json.firstName} ${$json.lastName}`,\n email: $json.emailAddress,\n organization: $json.organization || 'Keine',\n lastLogin: $json.lastLogin\n }\n};"
|
|
},
|
|
"name": "Formatieren",
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2,
|
|
"position": [500, 300]
|
|
}
|
|
],
|
|
"connections": {
|
|
"Start": {
|
|
"main": [[{"node": "Alle Benutzer", "type": "main", "index": 0}]]
|
|
},
|
|
"Alle Benutzer": {
|
|
"main": [[{"node": "Formatieren", "type": "main", "index": 0}]]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "5. Trigger: Neue Reservierungen überwachen",
|
|
"description": "Trigger-Workflow der bei neuen Reservierungen auslöst",
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"event": "newReservation",
|
|
"filters": {},
|
|
"timeWindow": "14days",
|
|
"options": {
|
|
"fetchDetails": true
|
|
}
|
|
},
|
|
"name": "LibreBooking Trigger",
|
|
"type": "n8n-nodes-librebooking.libreBookingTrigger",
|
|
"typeVersion": 1,
|
|
"position": [100, 300],
|
|
"credentials": {
|
|
"libreBookingApi": "LibreBooking Account"
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"mode": "runOnceForEachItem",
|
|
"jsCode": "const reservation = $json;\nreturn {\n json: {\n message: `Neue Reservierung: ${reservation.title || 'Ohne Titel'}`,\n resource: reservation.resourceName,\n start: reservation.startDate,\n end: reservation.endDate,\n user: `${reservation.firstName} ${reservation.lastName}`\n }\n};"
|
|
},
|
|
"name": "Nachricht formatieren",
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2,
|
|
"position": [300, 300]
|
|
}
|
|
],
|
|
"connections": {
|
|
"LibreBooking Trigger": {
|
|
"main": [[{"node": "Nachricht formatieren", "type": "main", "index": 0}]]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "6. Täglicher Reservierungsbericht",
|
|
"description": "Sendet täglich eine Übersicht der heutigen Reservierungen",
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"rule": {
|
|
"interval": [
|
|
{
|
|
"field": "cronExpression",
|
|
"expression": "0 8 * * *"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"name": "Täglich 8:00",
|
|
"type": "n8n-nodes-base.scheduleTrigger",
|
|
"typeVersion": 1,
|
|
"position": [100, 300]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"resource": "reservation",
|
|
"operation": "getAll",
|
|
"filters": {
|
|
"startDateTime": "={{ $now.startOf('day').toISO() }}",
|
|
"endDateTime": "={{ $now.endOf('day').toISO() }}"
|
|
}
|
|
},
|
|
"name": "Heutige Reservierungen",
|
|
"type": "n8n-nodes-librebooking.libreBooking",
|
|
"typeVersion": 1,
|
|
"position": [300, 300],
|
|
"credentials": {
|
|
"libreBookingApi": "LibreBooking Account"
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"aggregate": "aggregateAllItemData"
|
|
},
|
|
"name": "Zusammenfassen",
|
|
"type": "n8n-nodes-base.aggregate",
|
|
"typeVersion": 1,
|
|
"position": [500, 300]
|
|
}
|
|
],
|
|
"connections": {
|
|
"Täglich 8:00": {
|
|
"main": [[{"node": "Heutige Reservierungen", "type": "main", "index": 0}]]
|
|
},
|
|
"Heutige Reservierungen": {
|
|
"main": [[{"node": "Zusammenfassen", "type": "main", "index": 0}]]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |