240 lines
7.8 KiB
JSON
240 lines
7.8 KiB
JSON
{
|
|
"updatedAt": "2026-07-31T21:59:48.757Z",
|
|
"createdAt": "2026-07-31T21:29:56.006Z",
|
|
"id": "yB3PWOy5O5bI82rv",
|
|
"name": "My workflow 4",
|
|
"active": false,
|
|
"isArchived": false,
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"updates": [
|
|
"message"
|
|
],
|
|
"additionalFields": {}
|
|
},
|
|
"type": "n8n-nodes-base.telegramTrigger",
|
|
"typeVersion": 1.3,
|
|
"position": [
|
|
-128,
|
|
-64
|
|
],
|
|
"id": "0207e09b-38a4-4ffc-8c46-9bfa8e4d7874",
|
|
"name": "Telegram Trigger",
|
|
"webhookId": "dd25e1b8-f9d1-4b09-bb08-b7c5e7663108",
|
|
"credentials": {
|
|
"telegramApi": {
|
|
"id": "rDFxPFGGKagsBKLV",
|
|
"name": "Telegram eBayNotifyBot"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "http://198.168.178.133:3001/searches/add",
|
|
"sendBody": true,
|
|
"specifyBody": "json",
|
|
"jsonBody": "={\n \"chatId\": \"={{ $('Telegram Trigger').item.json.message.chat.id }}\",\n \"query\": \"{{ $('Switch').item.json.positiveKeyword}}\",\n \"negativeKeywords\": {{ $('Switch').item.json.negativeKeywords }}\n}",
|
|
"options": {}
|
|
},
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.4,
|
|
"position": [
|
|
480,
|
|
-64
|
|
],
|
|
"id": "dc699f14-505d-46e2-92cf-a1f729b64b52",
|
|
"name": "HTTP Request"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"rules": {
|
|
"values": [
|
|
{
|
|
"conditions": {
|
|
"options": {
|
|
"caseSensitive": true,
|
|
"leftValue": "",
|
|
"typeValidation": "strict",
|
|
"version": 3
|
|
},
|
|
"conditions": [
|
|
{
|
|
"leftValue": "={{ $json.comand }}",
|
|
"rightValue": "/add",
|
|
"operator": {
|
|
"type": "string",
|
|
"operation": "equals"
|
|
},
|
|
"id": "e8bd8b22-bfe4-445b-8874-df28d37430d1"
|
|
}
|
|
],
|
|
"combinator": "and"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"type": "n8n-nodes-base.switch",
|
|
"typeVersion": 3.4,
|
|
"position": [
|
|
272,
|
|
-64
|
|
],
|
|
"id": "18982561-fad5-4a12-895f-26c58314d3d3",
|
|
"name": "Switch"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"assignments": {
|
|
"assignments": [
|
|
{
|
|
"id": "4e123384-87ed-4b4e-8b29-dcf65c77c900",
|
|
"name": "comand",
|
|
"value": "={{ $json.message.text.trim().split(/\\s+/)[0] }}",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"id": "51c90eec-93b9-4eab-9e0d-281ece7b3c26",
|
|
"name": "positiveKeyword",
|
|
"value": "={{ $json.message.text.trim().split(/\\s+/)[1] }}",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"id": "07598e9f-8cca-4646-80f2-d194fcbf228d",
|
|
"name": "negativeKeywords",
|
|
"value": "={{ $json.message.text.trim().split(/\\s+/).slice(2).map(w => w.replace(/^-/, '')) }}",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"options": {}
|
|
},
|
|
"type": "n8n-nodes-base.set",
|
|
"typeVersion": 3.4,
|
|
"position": [
|
|
64,
|
|
-64
|
|
],
|
|
"id": "9e0ba9c2-417c-4abe-8b24-22aca98d2b54",
|
|
"name": "Edit Fields"
|
|
}
|
|
],
|
|
"connections": {
|
|
"Telegram Trigger": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Edit Fields",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Edit Fields": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Switch",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Switch": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "HTTP Request",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"settings": {
|
|
"executionOrder": "v1",
|
|
"binaryMode": "separate"
|
|
},
|
|
"staticData": null,
|
|
"meta": {
|
|
"templateCredsSetupCompleted": true
|
|
},
|
|
"pinData": {
|
|
"Telegram Trigger": [
|
|
{
|
|
"json": {
|
|
"update_id": 412066095,
|
|
"message": {
|
|
"message_id": 5239,
|
|
"from": {
|
|
"id": 302560724,
|
|
"is_bot": false,
|
|
"first_name": "Pr4s4n",
|
|
"username": "pr4s4n",
|
|
"language_code": "de"
|
|
},
|
|
"chat": {
|
|
"id": 302560724,
|
|
"first_name": "Pr4s4n",
|
|
"username": "pr4s4n",
|
|
"type": "private"
|
|
},
|
|
"date": 1785533834,
|
|
"text": "/add playstation -controller -headset",
|
|
"entities": [
|
|
{
|
|
"offset": 0,
|
|
"length": 4,
|
|
"type": "bot_command"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"Edit Fields": [
|
|
{
|
|
"json": {
|
|
"comand": "/add",
|
|
"positiveKeyword": "playstation",
|
|
"negativeKeywords": "[\"controller\",\"headset\"]"
|
|
},
|
|
"pairedItem": {
|
|
"item": 0
|
|
}
|
|
}
|
|
],
|
|
"Switch": [
|
|
{
|
|
"json": {
|
|
"comand": "/add",
|
|
"positiveKeyword": "playstation",
|
|
"negativeKeywords": "[\"controller\",\"headset\"]"
|
|
},
|
|
"pairedItem": {
|
|
"item": 0
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"versionId": "b921334a-86fa-4d3f-bf7e-78429fecb038",
|
|
"activeVersionId": null,
|
|
"triggerCount": 0,
|
|
"shared": [
|
|
{
|
|
"updatedAt": "2026-07-31T21:29:56.021Z",
|
|
"createdAt": "2026-07-31T21:29:56.021Z",
|
|
"role": "workflow:owner",
|
|
"workflowId": "yB3PWOy5O5bI82rv",
|
|
"projectId": "cSAaWNJydnksD5EB"
|
|
}
|
|
],
|
|
"activeVersion": null,
|
|
"tags": []
|
|
} |