Dateien nach "/" hochladen
This commit is contained in:
207
tracker-db.json
207
tracker-db.json
@@ -8,13 +8,13 @@
|
||||
],
|
||||
"additionalFields": {}
|
||||
},
|
||||
"id": "b7769320-830c-4a76-9086-ea4067969ad7",
|
||||
"id": "ddba8065-2681-4767-a8fc-99f3ccdba6ec",
|
||||
"name": "Telegram Trigger",
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
0,
|
||||
16
|
||||
80,
|
||||
128
|
||||
],
|
||||
"webhookId": "telegram-location-webhook",
|
||||
"credentials": {
|
||||
@@ -35,43 +35,34 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "57f03b50-3184-4d1e-9d33-f628f93f466b",
|
||||
"id": "3b6cacfd-4fa8-49b5-b7d7-c53e8a38b2b1",
|
||||
"name": "Hat Location?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
224,
|
||||
16
|
||||
304,
|
||||
128
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "// Extrahiere Location-Daten für NocoDB\nconst items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n const location = item.json.message.location;\n const from = item.json.message.from;\n const messageDate = item.json.message.date;\n \n const timestamp = new Date(messageDate * 1000).toISOString();\n const displayTime = new Date(messageDate * 1000).toLocaleString('de-DE');\n \n results.push({\n json: {\n latitude: location.latitude,\n longitude: location.longitude,\n timestamp: timestamp,\n user_id: from.id,\n first_name: from.first_name || '',\n last_name: from.last_name || '',\n username: from.username || '',\n marker_label: `${from.first_name || ''} ${from.last_name || ''}`.trim(),\n display_time: displayTime,\n chat_id: item.json.message.chat.id\n }\n });\n}\n\nreturn results;"
|
||||
},
|
||||
"id": "dafcade6-0563-47b9-bd0d-dff0f61d1dbb",
|
||||
"id": "e6048d6f-f70e-48d2-b9ac-d8e9b666ed06",
|
||||
"name": "Location verarbeiten",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
448,
|
||||
0
|
||||
528,
|
||||
112
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"authentication": "nocoDbApiToken",
|
||||
"operation": "create",
|
||||
"projectId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_PROJECT_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "YOUR_PROJECT_NAME"
|
||||
},
|
||||
"tableId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_TABLE_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "locations"
|
||||
},
|
||||
"projectId": "pdxl4cx4dbu9nxi",
|
||||
"table": "m8pqj5ixgnnrzkg",
|
||||
"fieldsUi": {
|
||||
"fieldValues": [
|
||||
{
|
||||
@@ -117,92 +108,66 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "c519118b-0626-4ace-befc-ee9859d73504",
|
||||
"id": "871598c7-0d0d-420d-b570-6cc2fe68225b",
|
||||
"name": "Speichere in NocoDB",
|
||||
"type": "n8n-nodes-base.nocoDb",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
672,
|
||||
0
|
||||
752,
|
||||
112
|
||||
],
|
||||
"credentials": {
|
||||
"nocoDbApiToken": {
|
||||
"id": "YOUR_NOCODB_CREDENTIALS_ID",
|
||||
"name": "NocoDB API Token"
|
||||
"id": "6fNBtcghMe8wFoE5",
|
||||
"name": "NocoDB Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"authentication": "nocoDbApiToken",
|
||||
"operation": "getAll",
|
||||
"projectId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_PROJECT_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "YOUR_PROJECT_NAME"
|
||||
},
|
||||
"tableId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_TABLE_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "locations"
|
||||
},
|
||||
"returnAll": false,
|
||||
"projectId": "pdxl4cx4dbu9nxi",
|
||||
"table": "m8pqj5ixgnnrzkg",
|
||||
"limit": 1,
|
||||
"options": {
|
||||
"sort": [
|
||||
{
|
||||
"field": "timestamp",
|
||||
"direction": "desc"
|
||||
}
|
||||
]
|
||||
}
|
||||
"options": {}
|
||||
},
|
||||
"id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
|
||||
"id": "e80e8a1d-901e-4870-85a9-9daac4188b4a",
|
||||
"name": "Hole letzten Eintrag",
|
||||
"type": "n8n-nodes-base.nocoDb",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
896,
|
||||
0
|
||||
976,
|
||||
112
|
||||
],
|
||||
"credentials": {
|
||||
"nocoDbApiToken": {
|
||||
"id": "YOUR_NOCODB_CREDENTIALS_ID",
|
||||
"name": "NocoDB API Token"
|
||||
"id": "6fNBtcghMe8wFoE5",
|
||||
"name": "NocoDB Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"authentication": "nocoDbApiToken",
|
||||
"operation": "getAll",
|
||||
"projectId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_PROJECT_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "YOUR_PROJECT_NAME"
|
||||
},
|
||||
"tableId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_TABLE_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "locations"
|
||||
},
|
||||
"projectId": "pdxl4cx4dbu9nxi",
|
||||
"table": "m8pqj5ixgnnrzkg",
|
||||
"returnAll": true,
|
||||
"options": {}
|
||||
},
|
||||
"id": "8b7a6c5d-4e3f-2a1b-0c9d-8e7f6a5b4c3d",
|
||||
"id": "c98b7cd0-bf3e-41a0-811e-04b22c5e8662",
|
||||
"name": "Zähle Einträge",
|
||||
"type": "n8n-nodes-base.nocoDb",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
896,
|
||||
120
|
||||
976,
|
||||
240
|
||||
],
|
||||
"credentials": {
|
||||
"nocoDbApiToken": {
|
||||
"id": "YOUR_NOCODB_CREDENTIALS_ID",
|
||||
"name": "NocoDB API Token"
|
||||
"id": "6fNBtcghMe8wFoE5",
|
||||
"name": "NocoDB Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -210,13 +175,13 @@
|
||||
"parameters": {
|
||||
"jsCode": "// Kombiniere Daten für Telegram-Bestätigung\nconst lastEntry = $('Hole letzten Eintrag').all();\nconst allEntries = $('Zähle Einträge').all();\nconst originalData = $('Location verarbeiten').first().json;\n\nreturn [{\n json: {\n latitude: originalData.latitude,\n longitude: originalData.longitude,\n display_time: originalData.display_time,\n chat_id: originalData.chat_id,\n total: allEntries.length\n }\n}];"
|
||||
},
|
||||
"id": "7c6b5a4d-3e2f-1a0b-9c8d-7e6f5a4b3c2d",
|
||||
"id": "894ec56f-e490-4639-8c50-f5590b036cc9",
|
||||
"name": "Bereite Bestätigung vor",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
1120,
|
||||
0
|
||||
1344,
|
||||
128
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -225,13 +190,13 @@
|
||||
"text": "=✅ Standort gespeichert!\n\n📍 Koordinaten:\nLat: {{ $json.latitude }}\nLon: {{ $json.longitude }}\n\n🕐 Zeit: {{ $json.display_time }}\n\n🗺️ Karte:\nhttps://web.unixweb.home64.de/tracker/index.html\n\n📊 Gespeicherte Punkte: {{ $json.total }}",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"id": "aa023c84-7664-4641-b3fc-cd30b9f69941",
|
||||
"id": "e68d8cb8-7978-44eb-875c-5dd04ae1a4f8",
|
||||
"name": "Telegram Bestätigung",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
1344,
|
||||
0
|
||||
1520,
|
||||
128
|
||||
],
|
||||
"webhookId": "9df3ad7d-315d-4782-b4ec-4fb154c0b46d",
|
||||
"credentials": {
|
||||
@@ -249,53 +214,37 @@
|
||||
"allowedOrigins": "*"
|
||||
}
|
||||
},
|
||||
"id": "b47e8370-3276-4f49-a2c5-25ef07b83ce8",
|
||||
"id": "b3b98836-97c0-43b4-84ca-4a47eb4bc670",
|
||||
"name": "Webhook - Location API",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
0,
|
||||
304
|
||||
80,
|
||||
416
|
||||
],
|
||||
"webhookId": "location-api-endpoint"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"authentication": "nocoDbApiToken",
|
||||
"operation": "getAll",
|
||||
"projectId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_PROJECT_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "YOUR_PROJECT_NAME"
|
||||
},
|
||||
"tableId": {
|
||||
"__rl": true,
|
||||
"value": "YOUR_TABLE_ID",
|
||||
"mode": "list",
|
||||
"cachedResultName": "locations"
|
||||
},
|
||||
"projectId": "pdxl4cx4dbu9nxi",
|
||||
"table": "m8pqj5ixgnnrzkg",
|
||||
"returnAll": true,
|
||||
"options": {
|
||||
"sort": [
|
||||
{
|
||||
"field": "timestamp",
|
||||
"direction": "desc"
|
||||
}
|
||||
]
|
||||
}
|
||||
"options": {}
|
||||
},
|
||||
"id": "200dbfff-2932-4e92-9e47-181ff706c0de",
|
||||
"id": "efc8af5b-b101-4a1c-b43e-f53adc22736e",
|
||||
"name": "Lade Daten aus NocoDB",
|
||||
"type": "n8n-nodes-base.nocoDb",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
224,
|
||||
304
|
||||
304,
|
||||
416
|
||||
],
|
||||
"credentials": {
|
||||
"nocoDbApiToken": {
|
||||
"id": "YOUR_NOCODB_CREDENTIALS_ID",
|
||||
"name": "NocoDB API Token"
|
||||
"id": "6fNBtcghMe8wFoE5",
|
||||
"name": "NocoDB Token account"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -303,13 +252,13 @@
|
||||
"parameters": {
|
||||
"jsCode": "// Baue API Response aus NocoDB-Daten\nconst locations = $input.all().map(item => item.json);\n\nconst current = locations.length > 0 ? locations[0] : null;\n\nreturn [{\n json: {\n success: true,\n current: current,\n history: locations,\n total_points: locations.length,\n last_updated: current ? current.timestamp : null\n }\n}];"
|
||||
},
|
||||
"id": "7c56b850-f1dd-4c51-ac8d-4313e199e6e7",
|
||||
"id": "9e270f26-f22e-4b12-a401-326786f8a3ec",
|
||||
"name": "Format API Response",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
448,
|
||||
304
|
||||
528,
|
||||
416
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -331,13 +280,13 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "9b720b0b-b4f8-4599-9e2f-d6e8f67819ab",
|
||||
"id": "6f2b9459-9a70-4fd0-aeca-fd93e2686371",
|
||||
"name": "JSON Response",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
672,
|
||||
304
|
||||
752,
|
||||
416
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -348,12 +297,23 @@
|
||||
},
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-80,
|
||||
-112
|
||||
0,
|
||||
0
|
||||
],
|
||||
"typeVersion": 1,
|
||||
"id": "29506fa4-6cb3-403f-bd64-6a2f49a2eb85",
|
||||
"id": "5f977203-f2d1-4769-b586-61626021a492",
|
||||
"name": "Sticky Note"
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"typeVersion": 3.2,
|
||||
"position": [
|
||||
1168,
|
||||
128
|
||||
],
|
||||
"id": "ddefcd86-d670-408f-86c5-bbcf4468f446",
|
||||
"name": "Merge"
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
@@ -411,7 +371,7 @@
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bereite Bestätigung vor",
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
@@ -422,9 +382,9 @@
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bereite Bestätigung vor",
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -472,19 +432,32 @@
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Bereite Bestätigung vor",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": true,
|
||||
"settings": {
|
||||
"executionOrder": "v1",
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionTimeout": -1,
|
||||
"availableInMCP": false,
|
||||
"errorWorkflow": "PhwIkaqyXRasTXDH"
|
||||
},
|
||||
"versionId": "b87a412a-4833-4f0d-aa33-0ba9074238d9",
|
||||
"versionId": "01b8afe3-8aa5-4004-9384-2dc32654961a",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "12d864c68e4fb5dfd100dc0c683b95f43cd55af7e9efa82e25407fac5a3824a5"
|
||||
},
|
||||
"id": "5dUTiJE61r7opoul",
|
||||
"id": "gs6GxPzIPKTjpK2Z",
|
||||
"tags": []
|
||||
}
|
||||
Reference in New Issue
Block a user