Website leads to Telegram: the form sends data, the bot posts a message

To get website leads in Telegram, nana800 uses two blocks: webhook receives the form data, and Telegram message send posts it to a private chat, group or channel. All you need is a bot token from @BotFather, with no server of your own. One lead takes two basic block runs, 1,000 runs cost $1, and your balance is topped up to $3.50 for free every month.

Build it in the builder

What you can automate

  • Contact form leads go to the owner in a private chat or to the sales team in a work group
  • Website orders with the name, phone number and order items land in a channel or a separate group topic
  • An admin sees every online booking right away: name, phone number and the chosen time
  • Quiz or calculator answers from a landing page arrive as one message, so the manager calls with the numbers at hand
  • Alerts from any app or service that can send a request to a webhook address

How to set it up

  1. 1

    Create a bot and find the chat ID

    Send /newbot to @BotFather and copy the bot token. Press Start in your bot, otherwise it cannot message you. For a team group, add the bot as a member. The @getmyid_bot bot shows the chat ID, and group IDs start with -100.

  2. 2

    Add the webhook trigger

    A webhook is an address your website sends the form data to. Create a scheme in the builder and add the webhook trigger. Choose POST in the method field and enter a path such as /lead in the path field. The path starts with a slash and does not end with one.

  3. 3

    Build the message in Telegram message send

    Add the Telegram message send block and paste the token and chat ID. In the message text, write a lead template and insert the form fields from the webhook data: they sit in body under the same names as in your form, for example name and phone. Pick the plain_text format so characters typed into the form cannot break the message.

  4. 4

    Put the webhook address into your form

    Turn the scheme on and press the API button in the builder, where each webhook has a Copy address button. Paste the address into the form settings if your website builder can send forms to a webhook, or into your website code. While the scheme is off, the webhook answers with error 409.

  5. 5

    Send a test lead

    On the API page open the Try it tab, put JSON like {"name": "Test", "phone": "+15550000000"} into the request body and press Send. The message arrives in Telegram. If it does not, open the result of the send block: the error_text field holds the Telegram answer. An enabled scheme costs $0.0042 per hour.

Pricing

A run of a Webhook block costs up to $0.001, a run of a Telegram block costs $0.001. Every month the balance is topped up to $3.50 for free, an enabled scheme costs $0.0042 per hour.

Services in this connection

  • Webhook

    Receive website leads and service events with a webhook and answer requests with no server and no code. Free balance every month, no card needed.

  • Telegram

    Build a Telegram bot without code: reply to messages, add buttons, send leads and alerts to a chat, group or channel. Free balance every month, no card needed.

Frequently asked questions

Receiving a lead with the webhook and sending the message are two basic block runs, and 1,000 runs cost $1. An enabled scheme costs $0.0042 per hour. Your balance is topped up to $3.50 for free every month, no card needed. A scheme kept on around the clock for a month spends most of that on scheme hours.

JSON or a regular form submission works, as well as plain text and XML, up to 20 MB. Form fields end up in body, and parameters after the ? in the address end up in query. The webhook does not parse multipart/form-data, the format FormData uses in JavaScript, so such a lead arrives without fields.

The webhook waits for the scheme to finish, up to 120 seconds, and answers with code 200 and {"finished":true,"default":true}. For your own answer, such as "Thank you, we got your request", add the free webhook response block after the send block and set the text and status code there.

Yes. The simplest way is a team group with the bot in it, so every member sees the message. In a group with topics, use the group topic ID field to file leads under the right topic. You can also connect several Telegram message send blocks with different chat IDs to the webhook, each of them is a separate run.

The webhook address is public: anyone who knows it can send a request, and every request runs the scheme. If the form is sent by the server of your website builder or by your own server, add a secret parameter after the ? in the address and check it with the free condition block before the Telegram message goes out.

No, if your website builder can send forms to a webhook: just paste the address there. On a custom website, a developer adds sending the form to this address. The nana800 blocks are set up with fields in the browser, and you do not need a server.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder