Route Telegram messages through OpenAI and log results to Google Sheets
Workflow Description
This workflow captures incoming Telegram messages, processes them with an OpenAI-powered AI agent, parses and structures the responses, and automatically records the results in a Google Sheets document for audit trails and team reference.
How it works
- 1.Receive messages from Telegram chat trigger
- 2.Process message through OpenAI AI agent model
- 3.Parse and structure output with defined data format
- 4.Insert processed results into Google Sheets rows
Use cases
- Document customer inquiries from Telegram with AI-generated responses
- Automate command processing and maintain organized transaction logs
Requirements
- Active Telegram account with configured bot credentials
- Valid OpenAI API key with sufficient quota
- Google Sheets document with edit permissions
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 (23)
When chat message received
Chat Trigger
OpenAI Chat Model
OpenAI
Structured Output Parser
Output Parser Structured
Get Audio File
Set
Transcribe Recording
OpenAI
Limit
Limit
Receive Telegram message
Set
If it's a voice message
If
Set chatInput from message
Set
Set chatInput from voice
Set
List of Ingredients and nutrients
Agent
Explode the list
Split Out
Add date
Code
Store in sheet
Google Sheets
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Respond message
Set
Sticky Note7
Sticky Note