Guide: Telegram Bot Workflow

Build a bot that runs a Tensorify workflow on every message (or selected commands) and can reply in the same chat — without hosting your own long-polling server.

Direct answer: Use the Telegram Trigger plugin as the start of the workflow and Telegram Send Message to reply. Telegram delivers updates to your Tensorify webhook URL after you set setWebhook once.

What you will build:

Telegram Trigger → Code (optional) → Telegram Send Message

Time: ~15 minutes
Who this is for: Developers and builders who want Telegram as an input channel for automations or lightweight agents.

Prerequisites:

  • Tensorify workspace
  • A bot token from @BotFather
  • Ability to deploy a workflow (Managed or CLI runner)

Step 1: Create the workflow

  1. Open app.tensorify.io → New Workflow
  2. Name it telegram-bot (or your product name)
  3. Create the workflow

Step 2: Add Telegram Trigger

Drag Telegram Trigger onto the canvas.

Typical settings:

  • Bot token — from BotFather (prefer a workspace env var, e.g. TELEGRAM_BOT_TOKEN)
  • Commands / filters — optional; restrict to /start, /help, or allow all messages
  • Confirm the trigger exposes chat id, text, and update payload for downstream nodes

See the Telegram Trigger reference for field-level detail.

Step 3: Optional logic

Insert Code, AI Agent, or HTTP Request between trigger and reply when you need parsing, tools, or external APIs.

Example Code shape (adjust to the real trigger payload shape you see in the canvas):

text = input.get("text") or input.get("message", {}).get("text", "")
chat_id = input.get("chat_id") or input.get("message", {}).get("chat", {}).get("id")
return {"chat_id": chat_id, "reply": f"You said: {text}"}

Step 4: Reply with Telegram Send Message

Drag Telegram Send Message. Bind:

  • Chat ID → from the trigger or Code node
  • Text → your reply string
  • Bot token → same secret as the trigger

Reference: Telegram Send Message.

Step 5: Deploy and register the webhook

  1. Deploy the workflow (Managed or CLI)
  2. Copy the public trigger URL Tensorify shows for the Telegram Trigger
  3. Point Telegram at that URL (Bot API setWebhook or the method documented on the plugin page)

Send a message to the bot in Telegram. Confirm a job appears under Jobs and a reply lands in the chat.


FAQ

Does this replace a custom bot server?
For many automations and agent-style bots, yes. You still use BotFather and Telegram’s API; Tensorify owns the workflow runtime.

Can I filter commands only?
Yes — use trigger filters or a Code/If node so only matching messages continue.

How is this different from long polling?
Webhook delivery pushes updates to Tensorify when they happen. No process needs to poll getUpdates on your laptop.


Next steps


  • Support triage bot that opens a ticket and acknowledges in-chat
  • Alert bot that receives ops commands (/status, /deploy) and runs workflows
  • Thin UI in front of an AI agent workflow
On this page