Case studies
CASE STUDY — Automation

Telegram Approval Gate

Deployed at Logistics startup3 days to build
Telegramn8nWebhook

One stuck approval used to freeze everything behind it. The approver kept refreshing their inbox, the requester kept asking "has it been approved yet?" The problem wasn't the approval itself — it was the time spent waiting for it.

So we pulled approvals out of the inbox. When a request comes in, a card flies to the approver's Telegram, and one button tap runs the next step of the workflow immediately.

telegram-approval.workflowLIVE
REQRequest inTGTelegram cardApprove / rejectn8Run next step

How it works

The workflow is two trigger chains. The first sends the approval card to Telegram. The second polls for the approver's button tap and pushes the result back downstream. State lives briefly in n8n's workflow static data and is read back out when the callback arrives.

Send chain

  1. A Webhook node receives the approval request as an HTTP POST.
  2. An Edit Fields (Set) node normalizes the payload (requestId, title, amount, requester, approverChatId, callbackUrl).
  3. A Code node saves { requestId: callbackUrl } into workflow static data.
  4. A Telegram Send Message node posts the approval card to the approver's chat. The card has two inline buttons whose callback_data is approve:REQ-ID or reject:REQ-ID.
  5. A Respond to Webhook node immediately returns {"status":"pending","requestId":"..."} to the requester.

Callback chain

  1. A Telegram Trigger node polls for callback_query updates. Because nothing needs to reach n8n from the outside, this works as-is in a local dev environment.
  2. A Code node parses decision and requestId from callback_data, looks up the stored callbackUrl, and removes it from static data.
  3. An HTTP Request node POSTs {decision, requestId} to the callbackUrl the requester supplied.
  4. A Telegram: Answer Callback Query node clears the button's loading spinner and shows a done toast to the user.

What you need

  • n8n 2.29.9 or later (self-hosted or Cloud). Verified on self-hosted Docker (docker.n8n.io/n8nio/n8n).
  • Core nodes only (Webhook · Set · Code · Telegram Send Message · Telegram Trigger · HTTP Request · Respond to Webhook · Telegram Answer Callback Query). No community nodes.
  • A Telegram Bot token from BotFather — register it in n8n Credentials as Telegram API.
  • The approver's numeric chat ID — message @userinfobot and it will tell you. @username will not work.
  • The approver must have sent the bot at least one message (Telegram policy). Search for the bot and hit Start once.
  • A downstream endpoint to receive the result (callbackUrl). A free webhook.site URL is enough for testing.
  • The send chain and the callback chain must live in the same workflow. They share state via workflow static data ($getWorkflowStaticData('global')).
  • A bad chat ID causes the Telegram Send Message node to fail with Bad Request: chat not found. In production, attach alerting or a retry branch here.
  • Static data is volatile — it vanishes when the workflow is deactivated or deleted. For long-running approvals or audit trails, swap it for a durable store like Postgres.

Sample payload

curl -X POST http://localhost:5678/webhook/telegram-approval \
  -H "Content-Type: application/json" \
  -d '{
    "requestId": "REQ-2026-001",
    "title": "Budget approval — Q3 marketing",
    "amount": 1500000,
    "requester": "Jihoon Kim",
    "approverChatId": "8104222459",
    "callbackUrl": "https://webhook.site/your-uuid"
  }'
This workflow was verified end-to-end on n8n 2.29.9 — curl → Telegram card → approver button tap → callbackUrl POST → spinner cleared. Last verified: 2026-07-11.
6.2h → 40 min
Average approval wait
0
Missed approvals
3 days
Build time
I clear all my approvals on my phone during the commute. By the time I get to the office, the next step is already running.Operations manager

Your operation belongs
in here, too.

Tell us the most repetitive task you have. We'll map an automation scenario for it.