EN · $ USD
Developer and Application Servers

n8n Telegram and WhatsApp Notification Automation

7 min read Updated: Sunucu Atlas technical team

In short

To set up Telegram notifications in n8n, get a bot token from BotFather, add the bot to a chat or group and find the chat ID, then create a Telegram credential in n8n. Next, add a Telegram Send Message node after a Form, WooCommerce or IMAP trigger. WhatsApp requires Meta's WhatsApp Business Cloud API, and notifications sent outside the 24-hour window must use an approved message template.

In this guide
  1. Telegram or WhatsApp?
  2. Prerequisites
  3. Part 1: Create a Telegram bot
  4. Part 2: The Telegram credential in n8n
  5. Part 3: Choose a trigger
  6. Part 4: Build the message and send it to Telegram
  7. Part 5: Customer notifications with the WhatsApp Business API
  8. Keep notifications meaningful: filtering and grouping
  9. Part 6: Error handling and going live
  10. Take your notification flow live

The n8n Telegram integration is the fastest, no-cost way to send your team a phone notification the moment something happens (a new order, a form submission, an important email). The setup has three parts: a trigger (the node that catches the event), a message template (text filled in with expressions) and a send node (Telegram or WhatsApp). In this guide, we first build a Telegram bot from scratch and connect it to three different triggers, then add customer notifications to the same flow with the WhatsApp Business API.

Telegram or WhatsApp?

CriteriaTelegram Bot APIWhatsApp Business Cloud API
SetupMinutes, with BotFatherRequires a Meta developer account, business verification and a phone number
CostFreeMeta charges by conversation or message category
Sending free-form textAlwaysOnly within 24 hours of the customer's last message
Best forInternal team alerts, operations groupsOrder, shipping and appointment notifications to customers

Practical tip: send internal team alerts to Telegram and customer-facing notifications to WhatsApp.

Prerequisites

  • A working n8n install. Order and form webhooks must be reachable from the internet, so you need an n8n server published over HTTPS. Preinstalled n8n servers with automatic SSL meet this requirement out of the box.
  • A Telegram account and (for WhatsApp) a Meta Business account.
  • Admin access to the system you will use as a trigger (WooCommerce, an email inbox).

Part 1: Create a Telegram bot

  1. Create the bot: In Telegram, open @BotFather and send the /newbot command. Choose a display name and a username that ends in bot.
  2. Save the token: BotFather gives you a token in the format 123456789:AA.... This token grants full access to the bot; never share it.
  3. Add the bot to a group: Open the group where notifications should arrive, add the bot as a member, and send any message to the group.
  4. Find the chat ID: Call the URL below in your browser or on the server; the "chat":{"id": ...} value in the response is your chat ID. Group IDs start with a minus sign.
curl https://api.telegram.org/bot<TOKEN>/getUpdates

If the response is empty, send a new message to the group after adding the bot and try again. If the bot cannot see messages because of group privacy mode, you can turn that mode off in BotFather with /setprivacy or mention the bot in your message.

Part 2: The Telegram credential in n8n

  1. In n8n, go to Credentials in the left menu and create a new credential of type Telegram API.
  2. Paste the token from BotFather into the Access Token field and save. n8n tests the connection.

Part 3: Choose a trigger

Option A: Web form submission

If your site has no form, n8n's Form Trigger node ("On form submission") generates a ready-made form page. Define name, phone and message fields, and link the form URL from your site. If you already have a form (for example, a WordPress form plugin), you can receive its POST data with the Webhook node.

Option B: WooCommerce order

Add the WooCommerce Trigger node and select order.created as the event. For the credential, create a key pair (Consumer Key and Consumer Secret) with read/write permissions in the WooCommerce admin under Settings → Advanced → REST API. When you activate the workflow, n8n registers the webhook in your store automatically.

Option C: Important emails

Connect to your business mailbox with the Email Trigger (IMAP) node (IMAP usually uses port 993 with SSL/TLS). Then use an IF node to filter only emails from a specific sender or with "Invoice" in the subject.

Part 4: Build the message and send it to Telegram

  1. Add a Telegram node after the trigger and choose Send Message as the operation.
  2. Enter the ID you found in the Chat ID field.
  3. Under Additional Fields → Parse Mode, choose HTML so you can use bold text and links.
  4. Enter the message template in the Text field in expression mode. An example for a WooCommerce order:
<b>Yeni sipariş #{{ $json.number }}</b>
Müşteri: {{ $json.billing.first_name }} {{ $json.billing.last_name }}
Tutar: {{ $json.total }} {{ $json.currency }}
Ürünler: {{ $json.line_items.map(i => i.name + ' x' + i.quantity).join(', ') }}
Ödeme: {{ $json.payment_method_title }}

With the form trigger, field names depend on the labels you gave in the form; run "Test workflow" first to get sample data, then drag the fields from the right panel into the message. Telegram's HTML mode supports only a limited set of tags such as b, i, u, a, code and pre; if a customer name contains a < or & character, the message may be rejected. To avoid this, escape user-supplied fields in a Code node or turn parse mode off.

Part 5: Customer notifications with the WhatsApp Business API

On WhatsApp, businesses send messages through the WhatsApp Business Platform (Cloud API). Automating the personal WhatsApp app violates the terms of service and can get your number banned.

  1. Create a Meta app: On Meta for Developers, create an app of type "Business" and add the WhatsApp product.
  2. Number and IDs: On the WhatsApp → API Setup screen, note the Phone Number ID and WhatsApp Business Account ID. For long-term use, add and verify your own business number.
  3. Permanent access token: The temporary token shown on screen expires quickly. Create a System User in Meta Business settings and generate a permanent token with the whatsapp_business_messaging permission.
  4. Message template approval: Business-initiated messages such as order confirmations can only be sent with approved templates outside the 24-hour window after the customer's last message. In WhatsApp Manager, create a template in the "Utility" category with variables such as {{1}} and {{2}}: "Hi {{1}}, we've received your order number {{2}}."
  5. n8n credential: Create a WhatsApp API credential in n8n and enter the Access Token and Business Account ID.
  6. Send node: Add the WhatsApp Business Cloud node to the flow and choose Send Template as the operation. Enter the Phone Number ID as the sender and the customer's phone number with country code as the recipient (for example 905XXXXXXXXX), and fill the template variables from the order data.

In Türkiye, customers usually write phone numbers as 0532... or with spaces. Before sending to WhatsApp, clean the number in an Edit Fields or Code node: remove spaces and dashes, drop the leading 0 and add 90 (Türkiye's country code). You also need the customer's explicit opt-in to receive notifications over WhatsApp, both under Meta's policies and under KVKK, Türkiye's personal data protection law.

Keep notifications meaningful: filtering and grouping

Sending a separate message for every event eventually gets the group muted. Use these techniques to keep notifications valuable:

  • Threshold filter: Use an IF node to send instant alerts only for orders above a certain amount or for specific product categories.
  • Separate channels: Use a Switch node to route orders to the warehouse group, return requests to the customer service group, and payment errors to a manager.
  • Daily digest: Instead of sending low-priority events instantly, collect them into a single summary message every evening with a Schedule Trigger: the day's order count, total revenue and pending shipments, for example.
  • Quiet hours: Postpone non-urgent overnight alerts until morning with an IF node and a $now.hour check, or send them silently with the Disable Notification option in the Telegram node.

Part 6: Error handling and going live

  • Retry On Fail: Turn on this option in the Telegram and WhatsApp node settings to retry 2-3 times on temporary network errors.
  • Error Workflow: Put an Error Trigger in a separate workflow that notifies you of failed executions on Telegram, and select that flow as the "Error Workflow" in the workflow settings.
  • Activation: Activate the workflow once testing is done. The /webhook-test/ URLs used during testing do not work in production; production uses the /webhook/ URL.

If you get errors such as "HTTPS URL must be provided" or 404 while setting up a Webhook or Telegram Trigger, the problem is most likely your WEBHOOK_URL or reverse proxy settings; the fix is in the n8n webhook not working guide. Telegram's webhook-based triggers only accept HTTPS URLs with a valid SSL certificate. If you are new to n8n's core concepts, start with the what is n8n guide.

Take your notification flow live

Notification flows like these need an n8n instance that is always on and reachable from the internet over HTTPS; an install running on your laptop stops sending order alerts the moment it shuts down. The Sunucu Atlas SA-N8N-1 n8n server in Istanbul comes with n8n preinstalled on Docker, a PostgreSQL database and an automatic SSL certificate, so you can run the Telegram and WhatsApp flows in this guide in production from day one. If you plan to add heavier jobs next to your notification flows, such as AI-powered message classification, compare all n8n server plans to pick an option with more RAM.

Frequently asked questions

How do I find my Telegram chat ID for n8n?

Add the bot to a chat or group and send a message, then call api.telegram.org/bot<TOKEN>/getUpdates. The id value of the chat object in the response is your chat ID; group IDs start with a minus sign.

Can I send messages from my personal WhatsApp number with n8n?

It is not recommended. Automating personal WhatsApp violates the terms of service and can get the number banned; business notifications should use the WhatsApp Business Cloud API.

Why do I need a WhatsApp message template?

Outside the 24 hours after a customer's last message to you, business-initiated messages can only be sent with templates approved by Meta. For order and shipping notifications, you can create a template in the Utility category.

My Telegram message isn't reaching the group. What should I do?

Check that the bot is a member of the group, that the chat ID is entered correctly with its minus sign, and that the token is current. If HTML parse mode is on, unescaped < or & characters in the message can also block delivery.

Does n8n need to be published over HTTPS for Telegram notifications?

Not just to send messages, because the request goes from n8n to Telegram. But to receive incoming events such as a Telegram Trigger, WooCommerce or a form webhook, you need an HTTPS URL with a valid SSL certificate.

For this guide

Recommended plans

To never miss an order or form alert, you need an n8n instance that is on 24/7 and reachable over HTTPS. SA-N8N-1 comes ready with automatic SSL and PostgreSQL, so you can run these flows in production from day one.

SA-N8N-1

n8n
Recommended

4 GB RAM

$2.75/mo

+VAT

  • Processor2 CPU
  • Disk40 GB NVMe
  • LocationIstanbul
  • 1G Port
  • n8n Pre-installed (Docker)
  • PostgreSQL Database
  • Automatic SSL Certificate

SA-N8N-2

n8n

8 GB RAM

$4.32/mo

+VAT

  • Processor4 CPU
  • Disk80 GB NVMe
  • LocationIstanbul
  • 1G Port
  • n8n Pre-installed (Docker)
  • PostgreSQL Database
  • Automatic SSL Certificate

SA-N8N-3

n8n

12 GB RAM

$6.29/mo

+VAT

  • Processor6 CPU
  • Disk120 GB NVMe
  • LocationIstanbul
  • 1G Port
  • n8n Pre-installed (Docker)
  • PostgreSQL Database
  • Automatic SSL Certificate

n8n Server — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.