Usar Telegram, Tavily y GPT-5 para búsquedas en la web con respuestas fácticas y preguntas
Este es unPersonal Productivity, AI RAGflujo de automatización del dominio deautomatización que contiene 15 nodos.Utiliza principalmente nodos como Telegram, AimlApi, TelegramTrigger, Tavily. Usar Telegram, Tavily y GPT-5 para responder preguntas con búsquedas de hechos en la web
- •Bot Token de Telegram
Nodos utilizados (15)
Categoría
{
"meta": {
"instanceId": "e95138f4feafe21ee6a9aac976bfd8e9187993130e7b713ed219f955c1b8837d",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "84253a28-e14b-462a-969c-f1e296f1eb40",
"name": "Nota adhesiva — Descripción general",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-928
],
"parameters": {
"color": 5,
"width": 384,
"height": 360,
"content": "# 🔍 Telegram Search Assistant\n\nMinimal bot that:\n1) Receives a question in Telegram\n2) Searches the web (Tavily)\n3) Summarizes facts with AIMLAPI (`openai/gpt-5-chat-latest`)\n4) Replies concisely (3–4 sentences), grounded in sources\n\n**Goal:** fast, factual answers without hallucinations."
},
"typeVersion": 1
},
{
"id": "0aaea504-3ed8-48b3-aa38-61963de91735",
"name": "Nota adhesiva — Indicación para LLM",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
-736
],
"parameters": {
"color": 6,
"width": 384,
"height": 240,
"content": "## 🧠 LLM Prompt (Guardrails)\n* Extract only facts that answer the question\n* 3–4 sentences max\n* If data is thin → say so clearly\n* **No fabrication** — use provided results only\n\n**Inputs:**\n- `query = user message`\n- `results = full Tavily JSON`"
},
"typeVersion": 1
},
{
"id": "0b337423-00e8-4236-b8ef-293641dd387a",
"name": "Nota adhesiva — Pruebas",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
-496
],
"parameters": {
"width": 384,
"height": 192,
"content": "## 🧪 Testing & Fallbacks\n* Test from Telegram (not only “Execute Node”)\n* Add `Switch` for commands and empty text\n* If no results → reply: “I couldn’t find enough reliable info.”\n* Catch errors: send friendly message, log details"
},
"typeVersion": 1
},
{
"id": "4c772d35-25cc-4cf9-bfe8-58bf23d7c6eb",
"name": "Nota adhesiva — Personalización",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-576
],
"parameters": {
"color": 5,
"width": 384,
"height": 232,
"content": "## 🛠 Customization\n* `/help` → usage & examples\n* `/sources` → list top URLs from results\n* `/news` or `/wiki` routing via keywords\n* Add NSFW/profanity filter pre-search\n* Rate-limit per user (Set → Wait → Redis/DB)\n* Optional: cache recent answers (key = normalized query)"
},
"typeVersion": 1
},
{
"id": "9778f214-dabf-48db-9f70-6c62e8747fc6",
"name": "Nota adhesiva — Respuesta",
"type": "n8n-nodes-base.stickyNote",
"position": [
752,
-192
],
"parameters": {
"color": 4,
"height": 304,
"content": "## 📤 Reply to Telegram\nReply to same chat, referencing original message."
},
"typeVersion": 1
},
{
"id": "e948ce86-f169-47a8-99c8-582bcc5e7d1b",
"name": "Nota adhesiva — LLM",
"type": "n8n-nodes-base.stickyNote",
"position": [
496,
-192
],
"parameters": {
"color": 6,
"height": 304,
"content": "## 🧠 LLM Summarize\nInput: full search JSON.\nOutput: concise factual answer."
},
"typeVersion": 1
},
{
"id": "a7430bc0-6057-4648-82ed-f90ccaf6fe76",
"name": "Nota adhesiva — Búsqueda",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
-192
],
"parameters": {
"color": 5,
"height": 304,
"content": "## 🔎 Web Search\nQuery = user message. Pass raw JSON downstream."
},
"typeVersion": 1
},
{
"id": "3c805f46-b470-4016-afe6-89641b180a86",
"name": "Nota adhesiva — Escribiendo",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-192
],
"parameters": {
"color": 2,
"height": 304,
"content": "## ⌨️ Typing Indicator\nSend \"typing\" to show progress."
},
"typeVersion": 1
},
{
"id": "3cca7a73-c37a-4e59-a994-a24d81e98c83",
"name": "Nota adhesiva — Recibir",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
-192
],
"parameters": {
"color": 4,
"height": 304,
"content": "## 📩 Receive Telegram Message\nHandle incoming text. Use chat.id + message_id for reply."
},
"typeVersion": 1
},
{
"id": "0ccc7f9f-bc6d-4e44-881d-7b9e1af4f622",
"name": "Enviar un mensaje de texto",
"type": "n8n-nodes-base.telegram",
"position": [
832,
-48
],
"webhookId": "01689fcb-171a-4338-bdc5-10447d604caa",
"parameters": {
"text": "={{ $json.content }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false,
"reply_to_message_id": "={{ $('Telegram Trigger').item.json.message.message_id }}"
}
},
"credentials": {
"telegramApi": {
"id": "wh7cybWjl2Zw0MEh",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "eeb18791-a210-4614-9b65-7ec3c7edba37",
"name": "Enviar una acción de chat",
"type": "n8n-nodes-base.telegram",
"position": [
48,
-48
],
"webhookId": "bf4cf2c0-6013-4ebf-be08-3519823031c1",
"parameters": {
"chatId": "={{ $json.message.chat.id }}",
"operation": "sendChatAction"
},
"credentials": {
"telegramApi": {
"id": "wh7cybWjl2Zw0MEh",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "239a5aad-bd01-4895-9551-2606aaa9444a",
"name": "Activador Telegram",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-208,
-48
],
"webhookId": "5ff309b0-9d51-4953-b9ae-616e4c17322b",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "wh7cybWjl2Zw0MEh",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "abdc849f-ed58-40c8-a34b-2d547f5d9212",
"name": "Buscar",
"type": "@tavily/n8n-nodes-tavily.tavily",
"position": [
304,
-48
],
"parameters": {
"query": "={{ $('Telegram Trigger').item.json.message.text }}",
"options": {}
},
"credentials": {
"tavilyApi": {
"id": "8wWN6c3Z8RZux0RW",
"name": "Tavily account 2"
}
},
"typeVersion": 1
},
{
"id": "17336e52-7ab1-4087-9358-97e04f129d63",
"name": "Finalización de chat de IA/ML",
"type": "n8n-nodes-aimlapi.aimlApi",
"position": [
560,
-48
],
"parameters": {
"model": "openai/gpt-5-chat-latest",
"prompt": "=You are an AI assistant. \nYou have search results from Google in JSON or text format. \nYour task is to: \n1. Extract only the facts that directly answer the user’s question. \n2. Provide a clear, concise answer in 3–4 sentences maximum. \n3. If the information is limited, state that clearly. \n4. Never make things up — base your answer only on the provided results. \n\nUser question: \"{{ $json.query }}\" \nSearch results: \n{{ JSON.stringify($json.results) }}\n\nGenerate the final answer in plain, simple English.\n",
"options": {
"responseFormat": "text"
},
"requestOptions": {}
},
"credentials": {
"aimlApi": {
"id": "QLCphbfkAMZbZesE",
"name": "AI/ML account"
}
},
"typeVersion": 1
},
{
"id": "eb8e941d-3b34-45b1-86da-f051b13a7f08",
"name": "Nota adhesiva — Indicación para LLM 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
-976
],
"parameters": {
"color": 4,
"width": 384,
"height": 240,
"content": "## ⚙️ Setup\n1. **Telegram**: create bot via @BotFather → add token in *Credentials → Telegram API*.\n2. **Tavily**: create API key → add *Tavily account* credentials.\n3. **AIMLAPI**: add *AI/ML API* credentials (base URL `https://api.aimlapi.com/v1`).\n4. **Environment**: set `TELEGRAM_BOT_TOKEN`, `TAVILY_API_KEY`, `AIML_API_KEY` in n8n (if using env)."
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"abdc849f-ed58-40c8-a34b-2d547f5d9212": {
"main": [
[
{
"node": "17336e52-7ab1-4087-9358-97e04f129d63",
"type": "main",
"index": 0
}
]
]
},
"239a5aad-bd01-4895-9551-2606aaa9444a": {
"main": [
[
{
"node": "eeb18791-a210-4614-9b65-7ec3c7edba37",
"type": "main",
"index": 0
}
]
]
},
"eeb18791-a210-4614-9b65-7ec3c7edba37": {
"main": [
[
{
"node": "abdc849f-ed58-40c8-a34b-2d547f5d9212",
"type": "main",
"index": 0
}
]
]
},
"17336e52-7ab1-4087-9358-97e04f129d63": {
"main": [
[
{
"node": "0ccc7f9f-bc6d-4e44-881d-7b9e1af4f622",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Productividad personal, RAG de IA
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
AI/ML API | D1m7asis
@d1m7asisCompartir este flujo de trabajo