AI Agents

Connect Telegram with OpenAI

38 nodes 202 113 Automatic trigger
Download

Workflow Description

Advanced template connecting Telegram accounts with OpenAI's AI models, enabling users to interact with an intelligent agent through instant messaging. The template supports persistent memory, custom tools, and multiple integrations to enhance performance and intelligence capabilities.

How it works

  1. 1.Receive messages from Telegram channels via the trigger
  2. 2.Process content through an OpenAI intelligent agent with saved conversation memory
  3. 3.Send responses automatically back to the user via Telegram
  4. 4.Use external tools (Google Tasks, MCP) to execute tasks
  5. 5.Store logs and data in a Postgres database
  6. 6.Integrate with Evolution API and OpenRouter for additional options

Use cases

  • Build a smart assistant that automatically responds to customer inquiries on Telegram
  • Create a bot that manages tasks and reminders while maintaining context across multiple conversations

Requirements

  • Active Telegram Bot account and API token
  • Valid API keys from OpenAI and/or LM Chat Open Router
  • Available Postgres database for persistent memory
  • (Optional) Accounts in Google Tasks or Evolution API

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

OpenAI AI Agent Tool Telegram Postgres Lm Chat Open Router Evolution Api

Details

Trigger Automatic trigger
Nodes 38
Apps 7
Views 202
Downloads 113

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (38)

/

OpenAI Chat Model1

OpenAI

#1

Assistente clinica interno

Agent

#2

Google Tasks

Google Tasks Tool

#3

MCP Google Calendar

Mcp Client Tool

#4

Receber Mensagem Telegram

Set

#5

Postgres Chat Memory

Memory Postgres Chat

#6

OpenAI Chat Model

OpenAI

#7

Assistente Clínica

Agent

#8

Enviar alerta de cancelamento

Set

#9

Gatilho diário

Schedule Trigger

#10

Assistente de confirmação

Agent

#11

AI Agent

Agent

#12

Sticky Note

Sticky Note

#13

Sticky Note2

Sticky Note

#14

Sticky Note3

Sticky Note

#15

Postgres Chat Memory1

Memory Postgres Chat

#16

MCP Google Calendar2

Mcp Client Tool

#17

MCP GMAIL

Mcp Client Tool

#18

MCP CALENDAR

Mcp Client Tool

#19

Telegram

Set

#20

OpenRouter Chat Model1

Lm Chat Open Router

#21

Webhook1

Webhook

#22

Edit Fields1

Set

#23

Switch

Switch

#24

Sticky Note5

Sticky Note

#25

OpenAI

OpenAI

#26

Evolution API

Evolution Api

#27

Convert to File

Convert To File

#28

Sticky Note1

Sticky Note

#29

Sticky Note6

Sticky Note

#30

OpenAI1

OpenAI

#31

AI Agent2

Agent

#32

OpenRouter Chat Model2

Lm Chat Open Router

#33

Evolution API2

Evolution Api

#34

Sticky Note4

Sticky Note

#35

CallToHuman

Tool Workflow

#36

OpenAI Chat Model2

OpenAI

#37

REMINDER

Evolution Api

#38