Send IoT alerts to Telegram directly from your Ubidots events — no per-message billing, no SMS gateway, no extra app for your team to install. Telegram works well when ops engineers already coordinate in group chats and want sensor alerts to land in the same channel.
To send IoT alerts to Telegram from Ubidots, install the Ubidots Telegram plugin (powered by a Telegram bot you create), then add a Trigger Webhook action to any event so the message is delivered to your chosen Telegram bot, group, or contact whenever a sensor crosses a threshold, a device goes inactive, or a geofence is breached.
When to use Telegram for IoT alerts
Field and operations teams already on Telegram — alerts land in a chat they're already watching, no new app to learn.
Markets with strong Telegram adoption — CIS, parts of LATAM, the Middle East, and Southeast Asia.
Group-chat alerts — multiple operators see the same alert simultaneously, with a written record everyone can reference.
Bot-driven workflows — your bot can also accept commands, so operators can ack alerts or query device state without leaving Telegram.
Cost-sensitive deployments — Telegram doesn't bill per message; you only consume your Ubidots event/webhook quota.
How it works
A Ubidots event (value-based, inactivity, geofence, scheduled) fires a Trigger Webhook action. The webhook hits your Ubidots Telegram plugin's HTTPS endpoint, which forwards the message through a Telegram bot you control to the destination group or contact. You configure the bot once with BotFather, install the plugin once with the bot's token, and from that point every event becomes a Telegram message.
The 24-hour rule: the Ubidots Telegram plugin only registers a chat ID if its webhook is fired within 24 hours of the bot joining that chat. Miss the window and you'll need to remove and re-add the bot. This is the single most common reason IoT alerts to Telegram silently fail to deliver.
Requirements
An Ubidots account on the Industrial plan or higher (plugins require Industrial+).
A Telegram account (you'll create the bot from your phone).
Permission to create groups in your destination Telegram workspace (only needed if you want to deliver alerts to a group rather than individual contacts).
1. Create a Telegram bot via BotFather
You'll need a bot to relay messages. BotFather is Telegram's official bot for creating new bots.
Open the Telegram app.
Tap the search icon in the upper right corner.
Type
botfatherand tap the BotFather result to start a chat.In the BotFather chat, send
/newbot.BotFather asks for a display name — pick one and send it.
BotFather then asks for a unique username. It must end in
bot(e.g.,myexamplebot). Send it.If the username is available, BotFather creates the bot and replies with a token. Copy this token — you'll paste it into the Ubidots plugin in the next step.
2. Install the Ubidots Telegram plugin
Go to Dev Center → Plugins, click the + button in the upper right, choose Telegram, and:
Paste your bot's token.
Give the plugin a name.
Optionally add a description.
Save. The plugin now exposes an HTTPS webhook endpoint that you'll point your event at in step 4.
3. Telegram group setup (skip if sending to individual contacts)
If you want alerts delivered to a group, set it up now. (Sending to individual contacts? Skip to step 4 — the second alternative covers it.)
Open the Telegram app.
Tap the hamburger menu → New Group. Give it a clear, distinctive name (e.g., Weather Alerts). The group name is what the plugin matches on, and it's case-sensitive.
Invite your bot to the group.
Send an initial command-style message (anything starting with
/, e.g.,/help). This is what tells Telegram to expose the chat ID to the bot.
4. Create the event with a Trigger Webhook action
Create a conditional, global, or scheduled event in Data → Events with whatever trigger logic suits your use case (value-based, inactivity, geofence, or context-based).
Then add a Trigger Webhook action (full reference: Events: Create a Webhook) and configure:
URL — your plugin's HTTPS endpoint. Find it in Dev Center → Plugins → [your plugin] → Decoder.
Method —
POST.Headers —
Content-Type: application/json.Payload — pick one of the two alternatives below.
Tip: type the double quotes manually inside the payload editor instead of pasting them — pasted "smart quotes" are the #1 cause of malformed payloads on this plugin.
Alternative 1 — deliver to a Telegram group
{"groupname": "<GROUPNAME>", "message": "<MESSAGE>"}<GROUPNAME>— the case-sensitive name of the target group, exactly as it appears in Telegram.<MESSAGE>— the body to send. Use Ubidots' tag icon to insert dynamic placeholders (device name, value, timestamp, etc.).
Alternative 2 — deliver to individual contacts
{"to": "<NUMBER(S)>", "message": "<MESSAGE>"}<NUMBER(S)>— phone number(s), each with country code (+57 XXX,+52 XXX). Comma-separate multiple recipients to fan out:"+57 XXX, +52 XXX".<MESSAGE>— the body.
On the first event trigger, each contact receives an SMS with an opt-in link. They must click it to start receiving Telegram alerts. Until they do, every event firing re-sends the same opt-in SMS.
5. Link the chat ID to the plugin within 24 hours
The plugin only stores a chat ID if its webhook is triggered while the bot is freshly added to the chat. If you don't trigger the webhook within 24 hours of adding the bot, the plugin won't be able to deliver to that chat — you'll have to remove and re-add the bot.
The simplest way is to fire a manual test from Postman or curl:
curl -X POST 'https://dataplugin.ubidots.com/api/web-hook/<plugin>' \
-H 'Content-Type: application/json' \
-d '{"groupname": "<GROUPNAME>", "message": "Bot is live and ready to send alerts."}'Use this same call to introduce the bot to the group with a friendly first message.
6. Settings tab
Name the event, optionally add a description, apply tags for end-user visibility control, set a cooldown period (in seconds) to mute repeated firings, and define one or more active windows during which the event is allowed to run. Click Save.
Best practices
One bot per project — keeps logs and rate limits scoped, and makes it easy to retire a single bot if a project ends.
Pre-seed the chat with
/helpbefore the first webhook fires; without it, Telegram won't expose the chat ID to your bot.Lead the message body with device name + threshold — Telegram's mobile preview cuts off long lines.
Test with a curl POST to the plugin URL before deploying IoT alerts to Telegram in production; the plugin's logs (Dev Center → Plugins → [your plugin] → Logs) are the source of truth for delivery status.
Pricing & limits
Telegram cost: free. No per-message billing.
Ubidots cost: consumes your event and webhook quota; no extra plugin fee.
Plan availability: Industrial plan or higher (required for plugins).
24-hour rule: the plugin only registers a chat ID if the webhook is triggered within 24 hours of adding the bot to the chat.
Rate limits: Telegram itself rate-limits bots at ~30 messages/sec across all chats and ~1 msg/sec per chat. In practice, IoT alert volumes never come close.
Frequently asked questions
Why didn't my Telegram message arrive?
Common causes, in order of frequency: (1) the bot's chat ID wasn't registered within 24 hours of joining the chat — re-add the bot and trigger the webhook immediately; (2) the groupname in the payload doesn't match the Telegram group name exactly (it's case-sensitive); (3) the webhook URL is wrong — recheck Dev Center → Plugins → [your plugin] → Decoder; (4) the event is outside its active window or muted by the cooldown period; (5) the plugin's logs show an error — check them in Dev Center → Plugins → [your plugin] → Logs.
Can I send to a Telegram group, individual contacts, or both?
Both, with different payload shapes. For a group, use {"groupname": "<GROUPNAME>", "message": "<MESSAGE>"}. For individual contacts, use {"to": "<NUMBER(S)>", "message": "<MESSAGE>"} with country-coded phone numbers. You can fan out to multiple contacts in one webhook by comma-separating the numbers.
Does Ubidots have a built-in "Send Telegram" event action like WhatsApp/SMS?
No. Telegram alerts are delivered through the Ubidots Telegram plugin plus a Trigger Webhook event action — not as a native action in the event-action picker. This is the supported, current method (the older "Send Telegram" action documented elsewhere has been retired).
Is there a per-message cost for Telegram alerts?
No. Telegram itself doesn't charge per message, and Ubidots doesn't add a per-message fee — you only consume your event and webhook quota on your plan.
Telegram vs. WhatsApp vs. SMS — which should I use?
Telegram for free, group-friendly alerts in markets where Telegram is widely used; great for ops teams already on the platform. WhatsApp for customer/operator alerts in WhatsApp-dominant markets (LATAM, EMEA, SEA), with two-way replies and rich content — billed per message, requires recipient opt-in. SMS for legacy phones, low-data-coverage regions, or regulated industries that need an SMS audit trail — billed per country prefix, capped at 140 characters.
Troubleshooting
Check the plugin's logs in Dev Center → Plugins → [your plugin] → Logs for delivery status and error messages.
Test the bot directly by POSTing to the plugin URL with curl or Postman, using a known-good payload.
Re-add the bot if a chat ID was never registered (24-hour rule), then immediately fire a test webhook.



