Route Telegram support messages with TypeSafe Jev, OpenAI and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on Telegram events (message). Along the way it connects Telegram, OpenAI Chat Model and Google Sheets. It also calls api.typesafe.ai over HTTP.
How it runs
Trigger: On Telegram events (message).
- Configure shop data, FAQ and thresholds (Edit Fields (Set)): sets 18 fields: shopName, shopInfo, productCatalog…
- Normalize message (Code): runs custom JavaScript code
- Is it a text message? (If): checks a condition and branches into true / false
- Build Jev classification request (Code): runs custom JavaScript code
- Reply: text only (Code): runs custom JavaScript code
- Classify intent with Jev (HTTP Request): calls api.typesafe.ai (POST)
- Reply to customer (Telegram): uses Telegram
- Decide how to reply (Code): runs custom JavaScript code
- Build log row (Code): runs custom JavaScript code
- Route by decision (Switch): routes items into 2 branches
…plus 5 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Telegram + OpenAI templates (807) · Other Telegram + Google Sheets templates (674)
HTTP calls to: api.typesafe.ai
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Switch
n8n-nodes-base.switch - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Telegram
n8n-nodes-base.telegram - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow handles incoming Telegram customer messages, classifies intent and sentiment with TypeSafe Jev, answers FAQs and simple cases with canned replies, uses OpenAI for product questions, notifies an owner in Telegram when needed, and…