Templates / Route Telegram support messages with TypeSafe Jev, OpenAI and Google Sheets

Route Telegram support messages with TypeSafe Jev, OpenAI and Google Sheets

Ready for 3.0

by Finrod Chen ✓ · 1 views · created 2026-11-03 · Support Chatbot, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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).

  1. Configure shop data, FAQ and thresholds (Edit Fields (Set)): sets 18 fields: shopName, shopInfo, productCatalog…
  2. Normalize message (Code): runs custom JavaScript code
  3. Is it a text message? (If): checks a condition and branches into true / false
  4. Build Jev classification request (Code): runs custom JavaScript code
  5. Reply: text only (Code): runs custom JavaScript code
  6. Classify intent with Jev (HTTP Request): calls api.typesafe.ai (POST)
  7. Reply to customer (Telegram): uses Telegram
  8. Decide how to reply (Code): runs custom JavaScript code
  9. Build log row (Code): runs custom JavaScript code
  10. Route by decision (Switch): routes items into 2 branches

…plus 5 more steps. See the full node list below.

Services it uses

TelegramOpenAI Chat ModelGoogle Sheets

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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (10)

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…

Excerpt from Finrod Chen's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.