Templates / Send safely formatted HTML messages with the Telegram bot API

Send safely formatted HTML messages with the Telegram bot API

Ready for 3.0

by Luna | Flow Lab · 18 views · created 2026-09-26 · Social Media

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-10-19.

Nodes used (4)

Telegram

What it does

Quick overview This workflow runs on demand to build a Telegram message in safe HTML by escaping dynamic values and enforcing Telegram’s 4096-character limit, then sends the formatted result to a specified chat using the Telegram bot API. How it works 1. Runs when you manually execute the workflow to send a test message. 2. Defines the target Telegram chat ID, message title, field values, optional link, and per-field length limits. 3. Escapes special characters in all field values, formats them with HTML (bold labels and an optional hyperlink), and truncates the message safely to stay under Telegram’s 4096-character limit. 4. Sends the generated HTML message to Telegram with parse mode set to HTML, attribution disabled, and automatic retries enabled. Setup 1. Create a Telegram bot with @BotFather and add Telegram credentials in n8n. 2. Send /start to your bot, then set your Telegram chat ID in the message settings. 3. Click Execute workflow: the sample message arrives formatted, with every special character intact. Then update the title, fields, optional link and length limits to match your data before you reuse the workflow. Requirements - A Telegram bot token (free, from @BotFather). Customization - Copy Build safe HTML message after any node and pass title, fields (label and value) and link. New fields are escaped the same way, so product names, AI answers and e-mail addresses cannot break the message.

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.