Handle order tracking and FAQ requests with Telegram, Gemini, and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs on Telegram events (message). Along the way it connects Telegram, Google Sheets and Google Gemini Chat Model.
How it runs
Trigger: On Telegram events (message).
- Set Config Variables (Edit Fields (Set)): sets 3 fields: customer_message, chat_id, spreadsheet_id
- Detect Intent Agent (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI GPT-; output parser: Parse Intent Structure
- If: checks a condition and branches into true / false
- Read Orders in Sheets (Google Sheets): uses Google Sheets
- Read FAQ in Sheets (Google Sheets): uses Google Sheets
- Prepare Order Reply Data (Edit Fields (Set)): sets 3 fields: reply, intent, order_id
- Aggregate: combines items into one
- Prepare Conversation Log Data (Edit Fields (Set)): sets 6 fields: timestamp, chat_id, customer_message…
- Answer FAQ Agent (Basic LLM Chain): sends a prompt to an LLM, with model: Claude Sonnet
- Append to Sheets (Google Sheets): append
…plus 2 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Aggregate
n8n-nodes-base.aggregate - Telegram
n8n-nodes-base.telegram - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
From the author
Quick overview Youtube Video: https://youtu.be/Y1OYeENJUn4 This workflow responds to Telegram customer messages by using Google Gemini to detect whether the user wants an order status update or an FAQ answer, pulls the relevant data from Google Sheets, logs…