Initial project setup for Telegram-to-Qdrant knowledge base.

Add unified n8n workflow, userbot ingestion script, and detailed README for running n8n with a separate Dockerized Telethon collector.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-23 20:20:56 +03:00
commit a8d634f422
13 changed files with 1768 additions and 0 deletions

View File

@@ -0,0 +1,150 @@
{
"name": "Создание базы (TG Text) - Fixed",
"nodes": [
{
"parameters": {
"mode": "insert",
"qdrantCollection": {
"__rl": true,
"value": "11111",
"mode": "id"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"typeVersion": 1.3,
"position": [
608,
0
],
"id": "7f206108-8187-4ca9-a734-704eae814643",
"name": "Qdrant Vector Store",
"credentials": {
"qdrantApi": {
"id": "gS1LJOMgnR7VJFRO",
"name": "QdrantApi account 2"
}
}
},
{
"parameters": {
"model": "qwen3-embedding:8b"
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
"typeVersion": 1,
"position": [
464,
208
],
"id": "9c1f5512-f2f7-4469-bcc3-e8a6824aae51",
"name": "Embeddings Ollama",
"credentials": {
"ollamaApi": {
"id": "XVSCsyxx8Z57lSRa",
"name": "Ollama account 3"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "tg-inbox",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
0,
0
],
"id": "f784ec7d-bbc5-4ed4-af89-ec894d99d053",
"name": "Webhook",
"webhookId": "d857e864-ed25-447f-84ef-27c63190fb93"
},
{
"parameters": {
"jsCode": "const msg = $input.item.json.body || {};\nconst rawText = msg.text || \"\"; \nconst meta = msg.metadata || {};\n\nconst senderName = meta.sender_name || \"Unknown\";\nconst senderId = meta.sender_id || \"0\";\n\n// Формируем ОДНУ строку, которая станет ОДНИМ вектором\nreturn {\n json: {\n text: `Пользователь ${senderName} (ID: ${senderId}) написал: ${rawText}`,\n metadata: {\n ...meta,\n sender_name: senderName,\n sender_id: senderId\n }\n }\n};\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
272,
0
],
"id": "6bb63840-979a-4453-8284-a52df680a972",
"name": "Format Data"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"typeVersion": 1.1,
"position": [
752,
208
],
"id": "5260623b-ec01-4fa6-baed-c340d74d1eab",
"name": "Default Data Loader"
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "Format Data",
"type": "main",
"index": 0
}
]
]
},
"Format Data": {
"main": [
[
{
"node": "Qdrant Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Ollama": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_document",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"availableInMCP": false
},
"versionId": "483acdf0-ad7b-4ade-ab5a-61f6e3a73f5a",
"meta": {
"instanceId": "96706479c2e398d2a4e75bb05002310bb6030e8268be45294cab77c6640a0fe6"
},
"id": "R9JVik9-vpScLvVK-27nM",
"tags": []
}