Files
n8n-workspace/MyDealzBest.json
2001-01-01 00:00:00 +00:00

1502 lines
56 KiB
JSON

{
"updatedAt": "2026-01-12T18:34:05.100Z",
"createdAt": "2026-01-12T18:22:29.219Z",
"id": "dudx1UPVZYtOTNFbJQ_ii",
"name": "MyDealzBest",
"active": true,
"isArchived": false,
"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
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"availableInMCP": false
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"pinData": {},
"versionId": "1b764a34-2ea6-40be-907e-8ae21d831aca",
"activeVersionId": "1b764a34-2ea6-40be-907e-8ae21d831aca",
"triggerCount": 1,
"shared": [
{
"updatedAt": "2026-01-12T18:22:29.222Z",
"createdAt": "2026-01-12T18:22:29.222Z",
"role": "workflow:owner",
"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": []
}