Anticode Open builder

Website form to Telegram bot: enquiries on your phone in plain text

Anticode can send each form from your published sites to Telegram through a bot you own. You give it two things: the bot token from @BotFather and the chat to post in, either a numeric chat id or a channel's @username. Each booking request, enquiry and sign-up then arrives as a plain-text message, usually within a minute.

Updated · By the Anticode team

When Telegram is the right inbox

Telegram suits people who run a business from their phone: a tour guide, a tutor, a market stall, a small team spread across countries. Notifications are fast, the app is light, and a group chat can act as a shared inbox without anyone signing up for a new tool. Wiring a website form to a Telegram bot also keeps enquiries out of an email inbox that's already full.

What you need before you start

A bot token
Message @BotFather, send /newbot, choose a display name and a username ending in "bot". BotFather replies with a token made of a number, a colon and a long secret, like 110201543:AAH…. Telegram's bot features page describes the flow.
A chat for the bot to post in
A private chat with you, a group or a channel. Telegram notes that bots can't start conversations: a person has to message the bot first, or add it to a group. For a channel, add the bot as an administrator that can post.
The chat's address
A channel's public @username works as it is. Private chats and groups need the numeric id, which for groups starts with a minus sign (supergroups look like -100…).

To find a numeric id, send your bot a message (or post in the group after adding it), then open https://api.telegram.org/bot<token>/getUpdates in your browser with your own token in place of <token>. The chat object in the reply contains the id. Do this on your own device and don't paste the address anywhere public, because it contains the token.

Connect it in Anticode

  1. Open Connectors in the dashboard and choose Telegram.
  2. Paste the token into Bot token and the id or @channel into Chat id or @channel.
  3. Press Save and turn on. Anticode checks the token has the BotFather shape and the chat is a number of 3 to 20 digits or an @username of 5 to 32 characters.
  4. Press Send a test. A message headed "New message on Anticode test" should arrive in the chat.

Inside each message

The first line reads "New booking request on …", "New message on …" or "New newsletter sign-up on …" with your project's name. Then come the fields, one per line: for a booking that's service, day, time, name, phone and email. The bot's message is sent with no parse mode, so asterisks, underscores and HTML tags that a visitor types appear literally rather than becoming formatting, and link previews are turned off so a pasted URL doesn't unfurl into a card. Messages are capped at 4,000 characters, inside Telegram's 4,096 limit for sendMessage.

The token is the bot

Telegram warns that a bot token can be used by anyone to control the bot. Anticode seals the token and chat together with AES-256-GCM, bound to your account and this connector; they're never shown again in the dashboard and never placed in the builder or your published pages. Messages go only to Telegram's own API address. If you think the token has leaked, send /revoke to @BotFather to revoke it and get a new one, then enter both fields again in Anticode.

Limits

  • One chat per account. Every site you publish posts to the same chat.
  • No retries. Each submission is sent once. If Telegram refuses it, for example because the bot was removed from the group, that message is lost, though the submission stays in the project's Submissions.
  • Group pacing. Telegram's bot FAQ says bots can't send more than 20 messages a minute in a group. A burst of forms beyond that may be refused.
  • Text only. No buttons to reply, accept a booking or mark something done.

Common errors

  • "Telegram answered 400": usually chat not found. The bot hasn't been messaged, isn't in the group, or the id is missing its minus sign.
  • "Telegram answered 401": the token is wrong or was revoked through @BotFather. Paste the current one.
  • "Telegram answered 403": the bot was blocked, removed, or isn't allowed to post in the channel.
  • A group became a supergroup and its id changed. Run getUpdates again and save the new id.

The same submissions can go to Slack or Discord instead, or to your own server with the webhook connector.

Questions people ask

Can the bot post to a channel instead of a group?

Yes. Add the bot as a channel administrator with permission to post, then use the channel's @username or numeric id.

Can I reply to the visitor from Telegram?

No. The bot only posts. Reply by email or phone using the details in the message.

Will a link in a visitor's message become clickable?

Telegram may still show a bare URL as a link, but there's no preview card and no hidden link text, because nothing is parsed as formatting.

Sources

  1. Telegram: Bot features (BotFather), checked
  2. Telegram: Bots, an introduction for developers, checked
  3. Telegram Bot API: sendMessage, checked
  4. Telegram: Bots FAQ, checked