Home  /  Integrations  /  Telegram
Integration

Automate with Telegram

Telegram bots are one of the fastest ways to build internal tools and alert systems. NVS uses Telegram as the outbound channel for instant notifications and the inbound channel for command-driven workflows.

Use Cases

01

Menu Bot with Switch on Commands

A single Telegram trigger handles all bot commands via a Switch. /status hits a live API, /report pulls from Sheets, /help sends a static message, and unknown input gets a friendly fallback reply.

Trigger
Bot Message
telegram.trigger
Telegram fires on every message sent to the bot.
Extract Command
nvs.set
Command text extracted and normalized from the message payload.
Switch
Command
nvs.switch
Routes each bot command to the correct handler branch.
/start
Output
Send Welcome
telegram.bot
Welcome message sent with the full command menu keyboard.
/status
Fetch Status
http.request
Live system status fetched from the monitoring API.
Output
Send Status
telegram.bot
Status report formatted and sent back to the user.
/report
Get Report Data
google.sheets
Latest report data fetched from the connected Google Sheet.
Output
Send Report
telegram.bot
Formatted report sent as a Telegram message.
default
Output
Unknown Command
telegram.bot
Reply: 'Unknown command. Use /help to see what I can do'.
02

AI Chatbot with Human Handoff

Messages are classified by OpenAI. Questions that can be answered automatically get an AI reply; anything requiring human judgment triggers a Slack alert and a holding message to the user.

Trigger
Telegram Message
telegram.trigger
Incoming message fires the intent classification pipeline.
Classify Intent
openai.gpt-4o
GPT-4o classifies the message: can_handle_automatically or needs_human.
IF
Needs Human?
nvs.condition
Complex or sensitive queries are escalated to the sales team.
YES
Log Conversation
airtable.table
Conversation logged in Airtable with user info and message content.
Alert Sales
slack.message
Slack alert: 'Human needed: {{user}} — {{message}}'.
Output
Send Holding Reply
telegram.bot
User receives: 'A team member will reach out to you shortly'.
NO
Generate AI Reply
openai.gpt-4o
GPT-4o generates an accurate, on-brand response to the query.
Output
Send Reply
telegram.bot
AI-generated reply sent directly to the user in Telegram.
03

Auth Guard + Command Control Bot

Only an authorized user ID can control this bot. Unauthorized messages are rejected instantly. Authorized commands map to NVS API calls to activate, deactivate, or list workflows remotely.

Trigger
Bot Message
telegram.trigger
Every message sent to the control bot fires this workflow.
IF
Authorized User?
nvs.condition
Checks message.from.id against a stored authorized user ID.
NO
Output
Reject
telegram.bot
Reply sent: 'Unauthorized. This incident has been logged'.
YES
Parse Command
nvs.set
Command and workflow_id extracted from the message text.
Switch
Command
nvs.switch
Routes each control command to the matching NVS API call.
/activate
Activate Workflow
nvs.api
NVS API activates the specified workflow by ID.
Output
Confirm
telegram.bot
Confirmation sent: 'Workflow {{id}} activated'.
/deactivate
Deactivate Workflow
nvs.api
NVS API deactivates the specified workflow.
Output
Confirm
telegram.bot
Confirmation sent: 'Workflow {{id}} deactivated'.
/list
List Workflows
nvs.api
All active workflows fetched from NVS API with name and status.
Output
Send List
telegram.bot
Formatted workflow list sent back to the authorized user.

Ready to automate Telegram?

We'll map your workflow, connect your tools, and build it in days, not months.

Book a Free Strategy Call →