Replace Clay with n8n, Ollama, SearXNG and browserless; add Telegram assistant

Remove the Clay role (Claude Code web UI) and its Anthropic API key.

New roles:
- ollama: local CPU LLM (qwen3:4b-instruct), internal network only
- browserless: headless Chromium for JavaScript-heavy pages
- searxng: metasearch backend for the chat web_search tool
- n8n at agent.ladkau.de: web chat (/chat), scheduled workflows,
  Telegram bot; workflows and credentials are imported from the repo

Telegram bot: Gemini 3.8 -> Gemini 3.5 -> local Qwen fallback chain,
/qwen to force the local model, /stocks and a weekday schedule
(07:30, 13:00, 17:40) for the MTE.DE / PTX.F stock report.

Also: dashboard and check-services entries for the chat, vault checks
for the new secrets (n8n, SearXNG, Gemini, Telegram, SMTP), updated
CLAUDE.md, runbooks and README.
This commit is contained in:
ml
2026-10-03 17:10:33 +02:00
parent b3cf4e250a
commit 974486bc53
37 changed files with 2805 additions and 290 deletions
+222
View File
@@ -0,0 +1,222 @@
{
"id": "chat00000000001",
"name": "Chat",
"active": true,
"nodes": [
{
"id": "c1",
"name": "Chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.4,
"position": [
0,
0
],
"webhookId": "3f2b6c1e-8a4d-4e57-9b0a-6d1c2e7f5a10",
"parameters": {
"public": true,
"mode": "hostedChat",
"authentication": "none",
"initialMessages": "Hi! Ask me anything or paste a link and I will read the page.",
"options": {
"loadPreviousSession": "notSupported",
"responseMode": "streaming",
"title": "Local AI chat"
}
}
},
{
"id": "c2",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3.1,
"position": [
300,
0
],
"parameters": {
"promptType": "auto",
"text": "={{ $json.chatInput }}",
"options": {
"systemMessage": "You are a concise assistant. Answer in the language of the user. For questions about current events, weather, news, prices or anything you cannot know for sure, call the web_search tool first with a short search query, then answer from the results and name the source URLs. When the user gives a web address, or a search result needs more detail, call the fetch_page tool with the full URL and base your answer only on what it returns. If a tool fails, say so. Do not invent facts or page content."
}
}
},
{
"id": "c3",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"typeVersion": 1,
"position": [
200,
260
],
"parameters": {
"model": "__OLLAMA_MODEL__",
"options": {
"numCtx": 16384,
"temperature": 0.3,
"numThread": 4
}
},
"credentials": {
"ollamaApi": {
"id": "ollama0000000001",
"name": "Ollama (local)"
}
}
},
{
"id": "c4",
"name": "Window Buffer Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
380,
260
],
"parameters": {
"sessionIdType": "fromInput",
"contextWindowLength": 3
}
},
{
"id": "c5",
"name": "fetch_page",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
560,
260
],
"parameters": {
"name": "fetch_page",
"description": "Opens a web page in a real browser (JavaScript is executed) and returns its title and readable text, truncated to about 3000 characters. Input: the full URL.",
"workflowId": {
"__rl": true,
"value": "fetchpage0000001",
"mode": "id"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"url": "={{ $fromAI('url', 'The full URL of the page to open, including https://', 'string') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "url",
"displayName": "url",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string"
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
}
},
{
"id": "c6",
"name": "web_search",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
740,
260
],
"parameters": {
"name": "web_search",
"description": "Searches the web and returns the top results (title, URL, short snippet). Input: a short search query.",
"workflowId": {
"__rl": true,
"value": "websearch000001",
"mode": "id"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"query": "={{ $fromAI('query', 'A short web search query', 'string') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string"
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
}
}
],
"connections": {
"Chat": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"fetch_page": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"web_search": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
@@ -0,0 +1,234 @@
{
"id": "digesttg00000001",
"name": "Weekly page digest to Telegram (example)",
"active": false,
"nodes": [
{
"id": "g1",
"name": "Every Monday 06:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 6 * * 1"
}
]
}
}
},
{
"id": "g2",
"name": "Sites",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
240,
0
],
"parameters": {
"jsCode": "// One item per page to summarise. Edit url and prompt.\nreturn [\n { json: { url: 'https://example.com', prompt: 'Summarise this page in five bullet points.' } },\n];\n"
}
},
{
"id": "g3",
"name": "Fetch page text",
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.2,
"position": [
480,
0
],
"parameters": {
"source": "database",
"workflowId": {
"__rl": true,
"value": "fetchpage0000001",
"mode": "id"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"url": "={{ $json.url }}"
},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"waitForSubWorkflow": true
}
}
},
{
"id": "g4",
"name": "Summarise",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.7,
"position": [
720,
0
],
"parameters": {
"promptType": "define",
"text": "={{ $('Sites').item.json.prompt + '\\n\\n---\\n' + $json.response }}"
}
},
{
"id": "g5",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"typeVersion": 1,
"position": [
720,
240
],
"parameters": {
"model": "__OLLAMA_MODEL__",
"options": {
"numCtx": 16384,
"temperature": 0.2,
"numThread": 4
}
},
"credentials": {
"ollamaApi": {
"id": "ollama0000000001",
"name": "Ollama (local)"
}
}
},
{
"id": "g6",
"name": "Format message",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1000,
0
],
"parameters": {
"assignments": {
"assignments": [
{
"id": "f1",
"name": "message",
"type": "string",
"value": "={{ ('Digest: ' + $('Sites').item.json.url + '\\n\\n' + $json.text).slice(0, 4000) }}"
}
]
},
"options": {}
}
},
{
"id": "g7",
"name": "Post to Telegram chat",
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.2,
"position": [
1240,
0
],
"parameters": {
"source": "database",
"workflowId": {
"__rl": true,
"value": "telegramchat0001",
"mode": "id"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"message": "={{ $json.message }}"
},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"waitForSubWorkflow": true
}
}
}
],
"connections": {
"Every Monday 06:00": {
"main": [
[
{
"node": "Sites",
"type": "main",
"index": 0
}
]
]
},
"Sites": {
"main": [
[
{
"node": "Fetch page text",
"type": "main",
"index": 0
}
]
]
},
"Fetch page text": {
"main": [
[
{
"node": "Summarise",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "Summarise",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Summarise": {
"main": [
[
{
"node": "Format message",
"type": "main",
"index": 0
}
]
]
},
"Format message": {
"main": [
[
{
"node": "Post to Telegram chat",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
@@ -0,0 +1,193 @@
{
"id": "digest0000000001",
"name": "Weekly page digest (example)",
"active": false,
"nodes": [
{
"id": "d1",
"name": "Every Monday 06:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 6 * * 1"
}
]
}
}
},
{
"id": "d2",
"name": "Sites",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
240,
0
],
"parameters": {
"jsCode": "// One item per page to summarise. Edit url and prompt.\nreturn [\n { json: { url: 'https://example.com', prompt: 'Summarise this page in five bullet points.', to: 'you@example.com' } },\n];\n"
}
},
{
"id": "d3",
"name": "Fetch page text",
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.2,
"position": [
480,
0
],
"parameters": {
"source": "database",
"workflowId": {
"__rl": true,
"value": "fetchpage0000001",
"mode": "id"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"url": "={{ $json.url }}"
},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"waitForSubWorkflow": true
}
}
},
{
"id": "d4",
"name": "Summarise",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.7,
"position": [
720,
0
],
"parameters": {
"promptType": "define",
"text": "={{ $('Sites').item.json.prompt + '\\n\\n---\\n' + $json.response }}"
}
},
{
"id": "d5",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"typeVersion": 1,
"position": [
720,
240
],
"parameters": {
"model": "__OLLAMA_MODEL__",
"options": {
"numCtx": 16384,
"temperature": 0.2,
"numThread": 4
}
},
"credentials": {
"ollamaApi": {
"id": "ollama0000000001",
"name": "Ollama (local)"
}
}
},
{
"id": "d6",
"name": "Send mail",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2.1,
"position": [
1020,
0
],
"parameters": {
"fromEmail": "={{ $credentials.user }}",
"toEmail": "={{ $('Sites').item.json.to }}",
"subject": "={{ 'Digest: ' + $('Sites').item.json.url }}",
"emailFormat": "text",
"text": "={{ $json.text }}",
"options": {}
},
"credentials": {
"smtp": {
"id": "smtp00000000001",
"name": "Strato SMTP"
}
}
}
],
"connections": {
"Every Monday 06:00": {
"main": [
[
{
"node": "Sites",
"type": "main",
"index": 0
}
]
]
},
"Sites": {
"main": [
[
{
"node": "Fetch page text",
"type": "main",
"index": 0
}
]
]
},
"Fetch page text": {
"main": [
[
{
"node": "Summarise",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "Summarise",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Summarise": {
"main": [
[
{
"node": "Send mail",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
@@ -0,0 +1,98 @@
{
"id": "fetchpage0000001",
"name": "Fetch page text",
"active": true,
"nodes": [
{
"id": "n1",
"name": "When called by another workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"parameters": {
"inputSource": "workflowInputs",
"workflowInputs": {
"values": [
{
"name": "url",
"type": "string"
}
]
}
}
},
{
"id": "n2",
"name": "Render page in browserless",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
260,
0
],
"parameters": {
"method": "POST",
"url": "http://browserless:3000/function",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify({ code: \"export default async function ({ page, context }) {\\n await page.goto(context.url, { waitUntil: 'networkidle2', timeout: 40000 });\\n const title = await page.title();\\n const text = await page.evaluate(() => {\\n document.querySelectorAll('script,style,noscript,nav,footer,header,iframe,svg').forEach(e => e.remove());\\n return (document.body.innerText || '').replace(/\\\\n{3,}/g, '\\\\n\\\\n').trim();\\n });\\n return { data: { title, text: text.slice(0, context.maxChars || 3000) }, type: 'application/json' };\\n}\\n\", context: { url: $json.url, maxChars: 3000 } }) }}",
"options": {
"timeout": 90000
}
}
},
{
"id": "n3",
"name": "Format result",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
520,
0
],
"parameters": {
"assignments": {
"assignments": [
{
"id": "a1",
"name": "response",
"type": "string",
"value": "={{ 'Title: ' + $json.data.title + '\\n\\n' + $json.data.text }}"
}
]
},
"options": {}
}
}
],
"connections": {
"When called by another workflow": {
"main": [
[
{
"node": "Render page in browserless",
"type": "main",
"index": 0
}
]
]
},
"Render page in browserless": {
"main": [
[
{
"node": "Format result",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,98 @@
{
"id": "websearch000001",
"name": "Web search",
"active": true,
"nodes": [
{
"id": "s1",
"name": "When called by another workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"parameters": {
"inputSource": "workflowInputs",
"workflowInputs": {
"values": [
{
"name": "query",
"type": "string"
}
]
}
}
},
{
"id": "s2",
"name": "Query SearXNG",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
260,
0
],
"parameters": {
"method": "GET",
"url": "http://searxng:8080/search",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "q",
"value": "={{ $json.query }}"
},
{
"name": "format",
"value": "json"
}
]
},
"options": {
"timeout": 30000
}
}
},
{
"id": "s3",
"name": "Format results",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
520,
0
],
"parameters": {
"jsCode": "const results = ($input.first().json.results || []).slice(0, 6);\nif (!results.length) return [{ json: { response: 'No search results found.' } }];\nconst text = results.map((r, i) => (i + 1) + '. ' + r.title + '\\n ' + r.url + '\\n ' + (r.content || '').slice(0, 300)).join('\\n\\n');\nreturn [{ json: { response: text.slice(0, 3500) } }];\n"
}
}
],
"connections": {
"When called by another workflow": {
"main": [
[
{
"node": "Query SearXNG",
"type": "main",
"index": 0
}
]
]
},
"Query SearXNG": {
"main": [
[
{
"node": "Format results",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}