AI Agents

Route Telegram messages through OpenAI and log results to Google Sheets

23 nodes 319 140 Automatic trigger
Download

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. 1.Receive messages from Telegram chat trigger
  2. 2.Process message through OpenAI AI agent model
  3. 3.Parse and structure output with defined data format
  4. 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

Chat Trigger OpenAI Output Parser Telegram AI Agent Google Sheets

Details

Trigger Automatic trigger
Nodes 23
Apps 6
Views 319
Downloads 140

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 (23)

/

When chat message received

Chat Trigger

#1

OpenAI Chat Model

OpenAI

#2

Structured Output Parser

Output Parser Structured

#3

Get Audio File

Set

#4

Transcribe Recording

OpenAI

#5

Limit

Limit

#6

Receive Telegram message

Set

#7

If it's a voice message

If

#8

Set chatInput from message

Set

#9

Set chatInput from voice

Set

#10

List of Ingredients and nutrients

Agent

#11

Explode the list

Split Out

#12

Add date

Code

#13

Store in sheet

Google Sheets

#14

Sticky Note

Sticky Note

#15

Sticky Note1

Sticky Note

#16

Sticky Note2

Sticky Note

#17

Sticky Note3

Sticky Note

#18

Sticky Note4

Sticky Note

#19

Sticky Note5

Sticky Note

#20

Sticky Note6

Sticky Note

#21

Respond message

Set

#22

Sticky Note7

Sticky Note

#23