Chat with GPT-5 on Telegram: AI-Powered Conversational Bot
Go to WorkflowDescription
๐ฌ GPT-5 Powered Telegram Bot โ AI/ML API + n8n
This n8n workflow lets users chat with GPT-5 directly in Telegram.
It simulates typing for a natural UX, sends messages to GPT-5 via AI/ML API, and replies back in the same chat.
Optionally, each interaction can be logged in Google Sheets.
๐ Features
๐ฉ Telegram-based chat input
๐ฌ Typing indicator before reply
๐ง High-quality AI responses via openai/gpt-5-chat-latest (AI/ML API)
๐ค Replies sent back in Telegram with formatting
๐ Optional logging to Google Sheets
๐ Secure credential handling in n8n
๐ Setup Guide
1. ๐ฒ Create Telegram Bot
Open @BotFather
Use /newbot, choose name + username
Save the API token
2. ๐ Set Up Credentials in n8n
Telegram API: paste the BotFather token
AI/ML API: create a key from aimlapi.com
(Optional) Google Sheets: connect via OAuth2/Service Account
3. ๐ Prepare Google Sheet (optional logging)
Name: e.g., GPT5 Bot Logs
Sheet: Sheet1
Columns:
user_id | date | query | response
4. ๐ง Configure Workflow
Import the JSON into n8n
Attach your credentials to the Telegram + AI/ML API nodes
(Optional) update Google Sheets node with Sheet ID
โ๏ธ Flow Summary
| Node | Function |
| ------------------------------- | -------------------------------------- |
| ๐ฉ Receive Telegram Message | Trigger on user message |
| ๐ฌ Simulate Typing | Sends "typingโฆ" action to Telegram |
| ๐ง Process with GPT-5 | Calls AI/ML API with message text |
| ๐ค Send Response to Telegram | Replies back to user with model output |
| ๐ Log Interaction (optional) | Appends log row to Google Sheets |
๐ก Example User Flow
User sends:
Whatโs the capital of Japan?
Bot replies after "typingโฆ":
The capital of Japan is Tokyo.
Conversation continues naturally.
๐งช Testing
Use a test chat with your bot
Trigger via /execute workflow (not โExecute Nodeโ)
Add Set or Console nodes for debugging
๐ Resources
๐ AI/ML API Docs
๐ค GPT-5 Models