From 65e92a79ae7bd3f416f558e182c366275028fc88 Mon Sep 17 00:00:00 2001 From: gitea Date: Mon, 1 Jan 2001 00:00:00 +0000 Subject: [PATCH] Update MyDealzBest.json --- MyDealzBest.json | 876 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 802 insertions(+), 74 deletions(-) diff --git a/MyDealzBest.json b/MyDealzBest.json index f2408dc..1e7aebd 100644 --- a/MyDealzBest.json +++ b/MyDealzBest.json @@ -1,7 +1,7 @@ { - "updatedAt": "2026-01-05T16:29:28.000Z", - "createdAt": "2025-12-08T10:31:16.680Z", - "id": "GR1gqXtazt67q0cb", + "updatedAt": "2026-01-12T18:34:05.100Z", + "createdAt": "2026-01-12T18:22:29.219Z", + "id": "dudx1UPVZYtOTNFbJQ_ii", "name": "MyDealzBest", "active": true, "isArchived": false, @@ -20,10 +20,10 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.3, "position": [ - 224, - 0 + -1760, + 128 ], - "id": "2d03a805-1669-4fae-bba8-82e75fce401f", + "id": "689c910c-5665-480f-8c96-2faf06614882", "name": "HTTP Request", "retryOnFail": false }, @@ -48,10 +48,10 @@ "type": "n8n-nodes-base.html", "typeVersion": 1.2, "position": [ - 432, - 0 + -1552, + 128 ], - "id": "61eab985-2ef7-4eb1-980a-be843607a6f4", + "id": "b17ca07e-2b19-4ed8-ab6e-0e536e32c15e", "name": "HTML" }, { @@ -87,10 +87,10 @@ "type": "n8n-nodes-base.html", "typeVersion": 1.2, "position": [ - 640, - 0 + -1344, + 128 ], - "id": "4b37c3af-a7ff-4c06-99e9-f658d85d577e", + "id": "c0f18b7b-e4f5-4e0f-93ed-5e256396dd71", "name": "HTML1" }, { @@ -137,10 +137,10 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 848, - 0 + -1136, + 128 ], - "id": "bb646ae1-eb22-490d-be64-600dd0d4995e", + "id": "7e8c602b-0231-45ea-969c-78c573001642", "name": "Edit Fields" }, { @@ -179,16 +179,16 @@ "type": "n8n-nodes-base.postgres", "typeVersion": 2.6, "position": [ - 1328, - 0 + -656, + 128 ], - "id": "444e568f-7ca2-4f06-addc-c919b4b22cfd", + "id": "e0c6f396-9a0e-4a01-9483-f394a140a26d", "name": "Select rows from a table", "executeOnce": true, "credentials": { "postgres": { - "id": "KfuCkzCoRyZId8cM", - "name": "Postgress-MyDealz" + "id": "VyZORXHG4fXznguO", + "name": "Postgres account" } } }, @@ -314,16 +314,16 @@ "type": "n8n-nodes-base.postgres", "typeVersion": 2.6, "position": [ - 1088, - 0 + -896, + 128 ], - "id": "b21d664f-480f-4393-bb6b-8c303009b0ce", + "id": "10b556e5-3e69-4b1f-bae0-a94f724b1779", "name": "Insert or update rows in a table", "executeOnce": false, "credentials": { "postgres": { - "id": "KfuCkzCoRyZId8cM", - "name": "Postgress-MyDealz" + "id": "VyZORXHG4fXznguO", + "name": "Postgres account" } } }, @@ -460,15 +460,15 @@ "type": "n8n-nodes-base.postgres", "typeVersion": 2.6, "position": [ - 1984, - -128 + 0, + 0 ], - "id": "f178423a-30e2-471d-82ac-a0b89224ba6b", + "id": "ee13dcee-ffc7-4f65-8366-cadeb42f97d1", "name": "Update rows in a table", "credentials": { "postgres": { - "id": "KfuCkzCoRyZId8cM", - "name": "Postgress-MyDealz" + "id": "VyZORXHG4fXznguO", + "name": "Postgres account" } } }, @@ -487,10 +487,10 @@ "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.3, "position": [ - -400, - 0 + -2384, + 128 ], - "id": "9d501eff-0b54-483c-b87b-61e9c08c8722", + "id": "75b4d0d7-def6-4b97-bcfa-33d1a7631e47", "name": "Schedule Trigger" }, { @@ -500,10 +500,10 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - -192, - 0 + -2176, + 128 ], - "id": "6c8dc53e-fd22-446a-86f9-e16ed10adfb5", + "id": "01ca18d6-6753-43bb-bc0c-223252261dc0", "name": "Code in JavaScript" }, { @@ -513,12 +513,13 @@ "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ - 0, - 0 + -1984, + 128 ], - "id": "5f231f91-012c-4e28-b17d-eca914e009e7", + "id": "b4e1c6b2-7b7e-4be5-b5f0-fa65e43afe67", "name": "Wait", - "webhookId": "2506d52b-677e-4ff1-ab1a-315ab75f9408" + "webhookId": "2506d52b-677e-4ff1-ab1a-315ab75f9408", + "disabled": true }, { "parameters": { @@ -533,16 +534,16 @@ "type": "n8n-nodes-base.telegram", "typeVersion": 1.2, "position": [ - 1984, - 0 + 0, + 128 ], - "id": "30468d2b-44ef-41f0-9155-85b64c533882", + "id": "2c01a248-eee2-4344-ae4a-4a5ebd9e9930", "name": "Send a text message", "webhookId": "6bb12551-6d47-40b7-8ffc-594e66295b8f", "credentials": { "telegramApi": { - "id": "k5rX2fD1IwPWwuCY", - "name": "Telegram_mydealzcmts_bot" + "id": "8Xq6WZw99Bofym0I", + "name": "t.me/mydealzcmts_bot" } } }, @@ -563,10 +564,10 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 1776, - 128 + -208, + 256 ], - "id": "f456d7df-98c6-46dc-8f83-45c33547dcef", + "id": "1f76cde6-cce5-451b-b46b-51c9e68e2652", "name": "Edit Fields1" }, { @@ -606,10 +607,10 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 1536, - 0 + -448, + 128 ], - "id": "791b1133-73ff-4367-aa94-e0222417af77", + "id": "a70dd115-033d-4ea6-b89f-8ad0942f6bb3", "name": "If" } ], @@ -690,11 +691,6 @@ ] ] }, - "Update rows in a table": { - "main": [ - [] - ] - }, "Schedule Trigger": { "main": [ [ @@ -728,11 +724,6 @@ ] ] }, - "Send a text message": { - "main": [ - [] - ] - }, "If": { "main": [ [ @@ -746,29 +737,766 @@ } }, "settings": { - "executionOrder": "v1" - }, - "staticData": { - "node:Schedule Trigger": { - "recurrenceRules": [ - 0 - ] - } + "executionOrder": "v1", + "availableInMCP": false }, + "staticData": null, "meta": { "templateCredsSetupCompleted": true }, "pinData": {}, - "versionId": "39687c0e-63e5-403e-95c0-36a10f29d283", + "versionId": "1b764a34-2ea6-40be-907e-8ae21d831aca", + "activeVersionId": "1b764a34-2ea6-40be-907e-8ae21d831aca", "triggerCount": 1, "shared": [ { - "updatedAt": "2025-12-08T10:31:16.683Z", - "createdAt": "2025-12-08T10:31:16.683Z", + "updatedAt": "2026-01-12T18:22:29.222Z", + "createdAt": "2026-01-12T18:22:29.222Z", "role": "workflow:owner", - "workflowId": "GR1gqXtazt67q0cb", - "projectId": "S4tmpzSj6JlGFOze" + "workflowId": "dudx1UPVZYtOTNFbJQ_ii", + "projectId": "cSAaWNJydnksD5EB" } ], + "activeVersion": { + "updatedAt": "2026-01-12T18:34:58.000Z", + "createdAt": "2026-01-12T18:34:05.101Z", + "versionId": "1b764a34-2ea6-40be-907e-8ae21d831aca", + "workflowId": "dudx1UPVZYtOTNFbJQ_ii", + "nodes": [ + { + "parameters": { + "url": "https://www.mydealz.de/", + "sendHeaders": true, + "headerParameters": { + "parameters": [ + {} + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.3, + "position": [ + -1760, + 128 + ], + "id": "689c910c-5665-480f-8c96-2faf06614882", + "name": "HTTP Request", + "retryOnFail": false + }, + { + "parameters": { + "operation": "extractHtmlContent", + "extractionValues": { + "values": [ + { + "key": "deal", + "cssSelector": ".thread--deal", + "returnValue": "html", + "returnArray": true + } + ] + }, + "options": { + "trimValues": false, + "cleanUpText": false + } + }, + "type": "n8n-nodes-base.html", + "typeVersion": 1.2, + "position": [ + -1552, + 128 + ], + "id": "b17ca07e-2b19-4ed8-ab6e-0e536e32c15e", + "name": "HTML" + }, + { + "parameters": { + "operation": "extractHtmlContent", + "dataPropertyName": "deal", + "extractionValues": { + "values": [ + { + "key": "title", + "cssSelector": ".thread-link", + "returnValue": "attribute", + "attribute": "title" + }, + { + "key": "href", + "cssSelector": ".thread-link", + "returnValue": "attribute", + "attribute": "href" + }, + { + "key": "price", + "cssSelector": ".js-vue3", + "returnValue": "attribute", + "attribute": "data-vue3" + } + ] + }, + "options": { + "trimValues": false + } + }, + "type": "n8n-nodes-base.html", + "typeVersion": 1.2, + "position": [ + -1344, + 128 + ], + "id": "c0f18b7b-e4f5-4e0f-93ed-5e256396dd71", + "name": "HTML1" + }, + { + "parameters": { + "assignments": { + "assignments": [ + { + "id": "d24b314b-ed33-42c0-8c8f-6552572fd5a6", + "name": "thread_id", + "value": "={{ $json.price.match(\"threadId\\\":\\\"([0-9]+)\")[1]}}", + "type": "number" + }, + { + "id": "319ad3c4-299a-4083-96bb-166205377465", + "name": "price", + "value": "={{ $json.price.match(\"price\\\":([0-9.]+)\")[1] }}", + "type": "number" + }, + { + "id": "0535fa09-5dcd-4287-9f04-d612fba1b5a1", + "name": "nextBestPrice", + "value": "={{ $json.price.match(\"nextBestPrice\\\":([0-9.]+)\")[1]}}", + "type": "number" + }, + { + "id": "1e476b3e-1a4c-40b3-89b2-9600352a1c69", + "name": "isHot", + "value": "={{ $json.price.match(\"isHot\\\":(true|false),\\\"\")[1]}}", + "type": "boolean" + }, + { + "id": "4b14ec00-4e9a-4be2-b170-b6217ee95cbb", + "name": "temperature", + "value": "={{ $json.price.match(\"temperatureLevel\\\":\\\"(.*?)\\\",\")[1]}}", + "type": "string" + } + ] + }, + "includeOtherFields": true, + "include": "except", + "excludeFields": "price", + "options": {} + }, + "type": "n8n-nodes-base.set", + "typeVersion": 3.4, + "position": [ + -1136, + 128 + ], + "id": "7e8c602b-0231-45ea-969c-78c573001642", + "name": "Edit Fields" + }, + { + "parameters": { + "operation": "select", + "schema": { + "__rl": true, + "value": "dealz", + "mode": "list", + "cachedResultName": "dealz" + }, + "table": { + "__rl": true, + "value": "deals", + "mode": "list", + "cachedResultName": "deals" + }, + "where": { + "values": [ + { + "column": "send", + "value": "false" + } + ] + }, + "sort": { + "values": [ + { + "column": "temperature", + "direction": "DESC" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.postgres", + "typeVersion": 2.6, + "position": [ + -656, + 128 + ], + "id": "e0c6f396-9a0e-4a01-9483-f394a140a26d", + "name": "Select rows from a table", + "executeOnce": true, + "credentials": { + "postgres": { + "id": "VyZORXHG4fXznguO", + "name": "Postgres account" + } + } + }, + { + "parameters": { + "operation": "upsert", + "schema": { + "__rl": true, + "value": "dealz", + "mode": "list", + "cachedResultName": "dealz" + }, + "table": { + "__rl": true, + "value": "deals", + "mode": "list", + "cachedResultName": "deals" + }, + "columns": { + "mappingMode": "defineBelow", + "value": { + "ishot": "={{ $json.isHot }}", + "thread_id": "={{ $json.thread_id }}", + "title": "={{ $json.title }}", + "price": "={{ $json.price }}", + "nextbestprice": "={{ $json.nextBestPrice }}", + "url": "={{ $json.href }}", + "temperature": "={{ $json.temperature }}" + }, + "matchingColumns": [ + "thread_id" + ], + "schema": [ + { + "id": "thread_id", + "displayName": "thread_id", + "required": true, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": false + }, + { + "id": "title", + "displayName": "title", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": false + }, + { + "id": "temperature", + "displayName": "temperature", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": false, + "removed": false + }, + { + "id": "price", + "displayName": "price", + "required": false, + "defaultMatch": false, + "display": true, + "type": "number", + "canBeUsedToMatch": false + }, + { + "id": "nextbestprice", + "displayName": "nextbestprice", + "required": false, + "defaultMatch": false, + "display": true, + "type": "number", + "canBeUsedToMatch": false + }, + { + "id": "ishot", + "displayName": "ishot", + "required": false, + "defaultMatch": false, + "display": true, + "type": "boolean", + "canBeUsedToMatch": false + }, + { + "id": "url", + "displayName": "url", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": false + }, + { + "id": "created_at", + "displayName": "created_at", + "required": false, + "defaultMatch": false, + "display": true, + "type": "dateTime", + "canBeUsedToMatch": false + }, + { + "id": "updated_at", + "displayName": "updated_at", + "required": false, + "defaultMatch": false, + "display": true, + "type": "dateTime", + "canBeUsedToMatch": false + } + ], + "attemptToConvertTypes": false, + "convertFieldsToString": false + }, + "options": {} + }, + "type": "n8n-nodes-base.postgres", + "typeVersion": 2.6, + "position": [ + -896, + 128 + ], + "id": "10b556e5-3e69-4b1f-bae0-a94f724b1779", + "name": "Insert or update rows in a table", + "executeOnce": false, + "credentials": { + "postgres": { + "id": "VyZORXHG4fXznguO", + "name": "Postgres account" + } + } + }, + { + "parameters": { + "operation": "update", + "schema": { + "__rl": true, + "value": "dealz", + "mode": "list", + "cachedResultName": "dealz" + }, + "table": { + "__rl": true, + "value": "deals", + "mode": "list", + "cachedResultName": "deals" + }, + "columns": { + "mappingMode": "defineBelow", + "value": { + "send": true, + "updated_at": "={{ $now }}", + "thread_id": "={{ $json.thread_id }}" + }, + "matchingColumns": [ + "thread_id" + ], + "schema": [ + { + "id": "thread_id", + "displayName": "thread_id", + "required": true, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": false + }, + { + "id": "title", + "displayName": "title", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "temperature", + "displayName": "temperature", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "price", + "displayName": "price", + "required": false, + "defaultMatch": false, + "display": true, + "type": "number", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "nextbestprice", + "displayName": "nextbestprice", + "required": false, + "defaultMatch": false, + "display": true, + "type": "number", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "ishot", + "displayName": "ishot", + "required": false, + "defaultMatch": false, + "display": true, + "type": "boolean", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "url", + "displayName": "url", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "send", + "displayName": "send", + "required": false, + "defaultMatch": false, + "display": true, + "type": "boolean", + "canBeUsedToMatch": true + }, + { + "id": "created_at", + "displayName": "created_at", + "required": false, + "defaultMatch": false, + "display": true, + "type": "dateTime", + "canBeUsedToMatch": true, + "removed": true + }, + { + "id": "updated_at", + "displayName": "updated_at", + "required": false, + "defaultMatch": false, + "display": true, + "type": "dateTime", + "canBeUsedToMatch": true + } + ], + "attemptToConvertTypes": false, + "convertFieldsToString": false + }, + "options": {} + }, + "type": "n8n-nodes-base.postgres", + "typeVersion": 2.6, + "position": [ + 0, + 0 + ], + "id": "ee13dcee-ffc7-4f65-8366-cadeb42f97d1", + "name": "Update rows in a table", + "credentials": { + "postgres": { + "id": "VyZORXHG4fXznguO", + "name": "Postgres account" + } + } + }, + { + "parameters": { + "rule": { + "interval": [ + { + "field": "hours", + "hoursInterval": 2, + "triggerAtMinute": "={{ 0 }}" + } + ] + } + }, + "type": "n8n-nodes-base.scheduleTrigger", + "typeVersion": 1.3, + "position": [ + -2384, + 128 + ], + "id": "75b4d0d7-def6-4b97-bcfa-33d1a7631e47", + "name": "Schedule Trigger" + }, + { + "parameters": { + "jsCode": "// Konfiguration: Wieviele Minuten maximal warten?\nconst minMinutes = 1;\nconst maxMinutes = 25;\n\n// Zufallsberechnung in Sekunden\nconst randomSeconds = Math.floor(Math.random() * (maxMinutes * 60 - minMinutes * 60 + 1) + minMinutes * 60);\n\nreturn [\n {\n json: {\n wait_time: randomSeconds,\n info: `Ich warte jetzt ${Math.floor(randomSeconds / 60)} Minuten und ${randomSeconds % 60} Sekunden.`\n }\n }\n];" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + -2176, + 128 + ], + "id": "01ca18d6-6753-43bb-bc0c-223252261dc0", + "name": "Code in JavaScript" + }, + { + "parameters": { + "amount": "={{ $json.wait_time }}" + }, + "type": "n8n-nodes-base.wait", + "typeVersion": 1.1, + "position": [ + -1984, + 128 + ], + "id": "b4e1c6b2-7b7e-4be5-b5f0-fa65e43afe67", + "name": "Wait", + "webhookId": "2506d52b-677e-4ff1-ab1a-315ab75f9408", + "disabled": true + }, + { + "parameters": { + "chatId": "=302560724", + "text": "={{ $json.price }}€ / {{ $json.nextbestprice }}€ {{ $json.temperature == \"Hot1\" ? \"🔥\" : $json.temperature == \"Hot2\" ? \"🔥🔥\" : $json.temperature == \"Hot3\" ? \"🔥🔥🔥\" : $json.temperature == \"Hot4\" ? \"🔥🔥🔥🔥\" : \"❄️\"}}\n\n{{ $json.url }}", + "additionalFields": { + "appendAttribution": false, + "disable_web_page_preview": false, + "parse_mode": "HTML" + } + }, + "type": "n8n-nodes-base.telegram", + "typeVersion": 1.2, + "position": [ + 0, + 128 + ], + "id": "2c01a248-eee2-4344-ae4a-4a5ebd9e9930", + "name": "Send a text message", + "webhookId": "6bb12551-6d47-40b7-8ffc-594e66295b8f", + "credentials": { + "telegramApi": { + "id": "8Xq6WZw99Bofym0I", + "name": "t.me/mydealzcmts_bot" + } + } + }, + { + "parameters": { + "assignments": { + "assignments": [ + { + "id": "6114b468-a308-4865-90fd-c8f72049cbe3", + "name": "temperature", + "value": "=", + "type": "string" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.set", + "typeVersion": 3.4, + "position": [ + -208, + 256 + ], + "id": "1f76cde6-cce5-451b-b46b-51c9e68e2652", + "name": "Edit Fields1" + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "ff317884-eb2a-4955-b029-6f5d0a70fa21", + "leftValue": "={{ $json.temperature }}", + "rightValue": "hot3", + "operator": { + "type": "string", + "operation": "equals" + } + }, + { + "id": "2d7b0212-041a-4e48-9fb4-b26b98907dab", + "leftValue": "={{ $json.temperature }}", + "rightValue": "hot4", + "operator": { + "type": "string", + "operation": "equals", + "name": "filter.operator.equals" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + -448, + 128 + ], + "id": "a70dd115-033d-4ea6-b89f-8ad0942f6bb3", + "name": "If" + } + ], + "connections": { + "HTTP Request": { + "main": [ + [ + { + "node": "HTML", + "type": "main", + "index": 0 + } + ] + ] + }, + "HTML": { + "main": [ + [ + { + "node": "HTML1", + "type": "main", + "index": 0 + } + ] + ] + }, + "HTML1": { + "main": [ + [ + { + "node": "Edit Fields", + "type": "main", + "index": 0 + } + ] + ] + }, + "Edit Fields": { + "main": [ + [ + { + "node": "Insert or update rows in a table", + "type": "main", + "index": 0 + } + ] + ] + }, + "Insert or update rows in a table": { + "main": [ + [ + { + "node": "Select rows from a table", + "type": "main", + "index": 0 + } + ] + ] + }, + "Select rows from a table": { + "main": [ + [ + { + "node": "Update rows in a table", + "type": "main", + "index": 0 + }, + { + "node": "Edit Fields1", + "type": "main", + "index": 0 + }, + { + "node": "If", + "type": "main", + "index": 0 + } + ] + ] + }, + "Schedule Trigger": { + "main": [ + [ + { + "node": "Code in JavaScript", + "type": "main", + "index": 0 + } + ] + ] + }, + "Code in JavaScript": { + "main": [ + [ + { + "node": "Wait", + "type": "main", + "index": 0 + } + ] + ] + }, + "Wait": { + "main": [ + [ + { + "node": "HTTP Request", + "type": "main", + "index": 0 + } + ] + ] + }, + "If": { + "main": [ + [ + { + "node": "Send a text message", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "authors": "Prasanna Ranjan", + "name": "Version 1b764a34", + "description": "", + "autosaved": false + }, "tags": [] } \ No newline at end of file