Integrations/Telegram

Send form submissions to Telegram

Form submitted. Telegram message. Bot delivers it to your chat.

Updated March 2026

There's a built-in Telegram template that formats submissions as HTML messages via the Telegram Bot API. You create a bot, get the chat ID, and point a webhook at the bot's sendMessage endpoint. Submissions show up in your Telegram chat as formatted messages with bold field labels.

Setup

1. Create a Telegram bot

Message @BotFather on Telegram, send /newbot, follow the prompts. You get a bot token like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11. Save it.

2. Get your chat ID

Message @userinfobot on Telegram to get your personal chat ID. For group chats, add @RawDataBot to the group and it will show the chat ID (negative number for groups). Remove the bot after.

3. Get a Sutrena API key

Grab a trial key or use one you already have.

curl -X POST https://sutrena.com/api/trial

4. Create a form

Make a form to collect submissions.

curl -X POST https://sutrena.com/api/forms \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Contact form",
    "fields": [
      { "name": "name", "label": "Name", "type": "text", "required": true },
      { "name": "email", "label": "Email", "type": "email", "required": true },
      { "name": "message", "label": "Message", "type": "textarea" }
    ]
  }'

5. Create a webhook with the Telegram template

Set template: "telegram", provide your bot's sendMessage URL and the telegramChatId. Link it to your form.

# Create the webhook
curl -X POST https://sutrena.com/api/webhooks \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.telegram.org/bot123456:ABC-DEF/sendMessage",
    "template": "telegram",
    "telegramChatId": "-100123456789",
    "description": "Contact form to Telegram"
  }'

# Link to form
curl -X PATCH https://sutrena.com/api/forms/frm_xxx \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "webhookIds": ["wh_xxx"] }'

6. Test it

Submit the form, check your Telegram chat. You should see a formatted message with bold field labels.

curl -X POST https://sutrena.com/api/webhooks/wh_xxx/test \
  -H "Authorization: Bearer st_trial_xxx"

Webhook payload

Every submission triggers a POST to your webhook URL with this payload:

{
  "id": "del_xxx",
  "event": "form.submission",
  "timestamp": "2026-01-15T10:30:00Z",
  "data": {
    "formId": "frm_xxx",
    "submissionId": "sub_xxx",
    "payload": {
      "name": "Jane",
      "email": "[email protected]"
    }
  }
}

FAQ

What does the Telegram message look like?

An HTML-formatted message with the form name in bold at the top, followed by each field as bold label: value on its own line.

Can I send to a group chat?

Yes. Use the group's chat ID (negative number) as the telegramChatId. Make sure your bot is a member of the group.

Where do I find my chat ID?

Message @userinfobot on Telegram for your personal chat ID. For groups, temporarily add @RawDataBot and check the chat ID it reports.

What if the bot token changes?

Delete the old Sutrena webhook and create a new one with the new bot token URL. Or use PATCH /api/webhooks/:id to update the URL.

What is Sutrena?

Sutrena is the web runtime for AI agents. Forms, Pages, Dashboards, Analytics, Webhooks, Automations, Emails — all through 75 MCP tools and one REST API. Your agent creates web artifacts, humans interact with them, and your agent gets the data back. Use any one feature or all of them together.

Pages

Deploy HTML instantly

Forms

Collect structured data

Dashboards

Visualize with 7 widget types

Analytics

Privacy-first, no cookies

Webhooks

Slack, Discord, Telegram

Get started in two API calls

1. Get a trial key (no auth, no signup)

curl -X POST https://sutrena.com/api/trial

2. Create anything — a page, form, dashboard, or analytics site

# Create a form with a dashboard
curl -X POST https://sutrena.com/api/forms \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{"workflowId": "waitlist", "createDashboard": true}'

# Or deploy a page
curl -X POST https://sutrena.com/api/pages \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{"slug": "index", "title": "My Site", "html": "<h1>Live</h1>"}'

Ready to build?

Get a trial API key instantly with no signup, or create an account for the full experience.

Telegram Integration -- Send Form Submissions to Telegram | Sutrena | Sutrena