Respond to Telegram Messages with an OpenAI-Powered Smart Agent
Workflow Description
This automation connects your Telegram account to an intelligent agent powered by OpenAI, enabling smart responses to incoming messages with contextual awareness. Conversation history is stored in Postgres for continuous learning and reference.
How it works
- 1.Receive and validate incoming Telegram messages
- 2.Route messages to OpenAI agent with stored conversation context
- 3.Generate and send intelligent replies back through Telegram
Use cases
- Build a fully automated customer support bot that responds intelligently on Telegram
- Create a multi-purpose bot that learns and improves from past conversations
Requirements
- Active Telegram account with bot creation permissions
- Valid OpenAI API key with appropriate usage limits
- Postgres database configured to store and retrieve conversation history
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (38)
OpenAI Chat Model1
OpenAI
Assistente clinica interno
Agent
Google Tasks
Google Tasks Tool
MCP Google Calendar
Mcp Client Tool
Receber Mensagem Telegram
Set
Postgres Chat Memory
Memory Postgres Chat
OpenAI Chat Model
OpenAI
Assistente Clínica
Agent
Enviar alerta de cancelamento
Set
Gatilho diário
Schedule Trigger
Assistente de confirmação
Agent
AI Agent
Agent
Sticky Note
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Postgres Chat Memory1
Memory Postgres Chat
MCP Google Calendar2
Mcp Client Tool
MCP GMAIL
Mcp Client Tool
MCP CALENDAR
Mcp Client Tool
Telegram
Set
OpenRouter Chat Model1
Lm Chat Open Router
Webhook1
Webhook
Edit Fields1
Set
Switch
Switch
Sticky Note5
Sticky Note
OpenAI
OpenAI
Evolution API
Evolution Api
Convert to File
Convert To File
Sticky Note1
Sticky Note
Sticky Note6
Sticky Note
OpenAI1
OpenAI
AI Agent2
Agent
OpenRouter Chat Model2
Lm Chat Open Router
Evolution API2
Evolution Api
Sticky Note4
Sticky Note
CallToHuman
Tool Workflow
OpenAI Chat Model2
OpenAI
REMINDER
Evolution Api