# Forms: How to send notifications about new submissions to Telegram

**URL:** <https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126>\
**Category:** Pro Tips\
**Tags:** forms\
**Created:** [December 5, 2025, 6:59pm UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126 "2025-12-05T18:59:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [December 5, 2025, 6:59pm UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/1 "2025-12-05T18:59:49Z")

</div>

Based on the insights from this [thread](https://community.elfsight.com/t/send-notification-about-form-submission-to-telegram/110407) (kudos to @Sina and @Aleksandr_Popov) , we’ve created a simple guide on how to send notifications for new form submissions to Telegram 🙌

> **Register your Telegram Bot**
>
> - First, open **BotFather** on Telegram. You can find it by searching for “BotFather” in the Telegram search bar.
> 
> - Start a chat with BotFather and type **/newbot** to create a new bot.
> 
> - BotFather will ask you for two things:
> 
> - After providing this information, BotFather will generate a **bot token**. Keep this token handy, as you’ll use it to interact with your bot programmatically
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/d/a/da783a4dc83902ad84a9bdf6b9c5b4346b4f607b.jpeg)

  

> **Get a Telegram Channel ID**
>
> To send messages from your bot, you need to know the **Telegram Chat ID** of the user you want to message. For this, use another bot called **userinfobot**.
> 
> - Open the Telegram search bar, type **userinfobot** , and start a conversation with it.
> - Click **Start** , and the bot will send you your **Telegram ID**. This is the ID you’ll use to send messages to yourself or another user:
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/d/b/dbb3bfbd4b6cb1019bfb00579df74b0b90c5131a.jpeg)
> 
>   
> 
> Once you have the bot token and the user ID, you’re ready to create a form and start sending messages from your bot 😉

  

> **Adding a custom code**
>
> Here is a custom code to send notifications about new submissions to your Telegram channel:
> 
> ```auto
> const TELEGRAM_BOT_TOKEN = 'YOUR_TOKEN';
> const TELEGRAM_CHAT_ID = 'CHAT_ID';
> 
> widget.on('submit', (fields) => {
> let text = '';
> Object.values(fields).forEach((field) => {
> if (field.value && field.type !== 'consent') {
> text += `${field.name}: ${field.value}\n`;
> }
> });
> 
> fetch(`https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage`, {
> method: 'POST',
> keepalive: true,
> headers: {
> 'Content-Type': 'application/json',
> },
> body: JSON.stringify({
> chat_id: TELEGRAM_CHAT_ID,
> text,
> }),
> }).catch(() => {
> console.error(`Form: the message wasn't sent to Telegram.`);
> });
> });
> 
> ```
> 
> Replace `YOUR_TOKEN` and `CHAT_ID` with your Telegram Bot Token and Chat ID and add the resulted code to the **Custom JS** field on the **Settings** tab of your [Form](https://elfsight.com/widgets/?category=forms) widget’s settings.

  

Voila! Now you’ll receive notifications about new form submissions in your Telegram Channel:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/a/3/a3fe7d8987b3d6be6e2dc4d1303d7c2b65065388.jpeg)

  

> Folks, was the solution helpful to you? Let us know in the comments 😉

---

<div class="post-metadata">

**Author:** ![Michael\_Surnak](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/michael_surnak/32/82394_2.png) [@Michael\_Surnak](https://community.elfsight.com/u/Michael_Surnak)\
**Post date:** [January 29, 2026, 2:49am UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/2 "2026-01-29T02:49:39Z")

</div>

Thanks, Max. It works! One thing worth noting, especially for those unfamiliar with Telegram: after creating your bot, if using your personal Telegram ID, you need to start a chat with it by finding it in the search bar and sending the /start command. Otherwise, it won’t be able to send you any submissions.

You can also make a group and add the bot to it. But there are a few settings you need to update, namely:

- Use the correct group chat ID – you can find this via the userinfobot. Make sure you do this after you tweak your group settings as some settings change your group ID (e.g., the chat history for new members setting).
- Turn off Privacy Mode in BotFather: /mybots → select your bot → Bot Settings → Group Privacy → Turn off. This allows the bot to see messages and send updates in the group.
- Send an initial message in the group after adding the bot, so it’s “activated” and can receive and post messages.

---

<div class="post-metadata">

**Author:** ![Michael\_Surnak](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/michael_surnak/32/82394_2.png) [@Michael\_Surnak](https://community.elfsight.com/u/Michael_Surnak)\
**Post date:** [February 12, 2026, 4:48am UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/3 "2026-02-12T04:48:01Z")

</div>

Hi Max,

Changing the Post-Submit Action of my form (installed on [this page](https://k9poopertroopers.com.au/get-your-free-quote)) from Show Success Message to Redirect to URL also appears to have broken this script. Any idea why that might have happened? I just tested it and my other form still sends notifications to Telegram fine.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [February 12, 2026, 10:58am UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/4 "2026-02-12T10:58:19Z")

</div>

Hi @Michael_Surnak 👋

Please let me look into this with the devs. I’ll keep you updated 🙂

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [February 12, 2026, 1:06pm UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/5 "2026-02-12T13:06:12Z")

</div>

Just to confirm, you’ve sent `/start` in the chat with the Telegram bot, right?

We’ve also noticed that you’ve added the `CHAT_ID` of the group instead of the user. You should replace with the Chat ID of the user (you) and send /start in the chat with the Telegram bot on your behalf.

If it doesn’t help, please right-click the widget on your website, choose Inspeact and open the Send Message section on the Network tab:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/8/3/833fa6183e8506bfa80c8969f652a17c2b9284f9.png)

Then, submit the form and take a screenshot of the Send Message section 🙂

---

<div class="post-metadata">

**Author:** ![Michael\_Surnak](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/michael_surnak/32/82394_2.png) [@Michael\_Surnak](https://community.elfsight.com/u/Michael_Surnak)\
**Post date:** [February 13, 2026, 4:33am UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/6 "2026-02-13T04:33:49Z")

</div>

Hi Max,

I just tested it and it’s working again now! I successfully received a telegram bot message for the submission. I’m not sure what the issue was but it seems to have fixed itself.

I appreciate your continued support and assistance.

Best regards,

Michael

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [February 13, 2026, 10:13am UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/7 "2026-02-13T10:13:19Z")

</div>

Awesome, you’re welcome 😉

---

<div class="post-metadata">

**Author:** ![Michael\_Surnak](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/michael_surnak/32/82394_2.png) [@Michael\_Surnak](https://community.elfsight.com/u/Michael_Surnak)\
**Post date:** [March 2, 2026, 10:58am UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/8 "2026-03-02T10:58:27Z")

</div>

Hi Max, the issue persisted after my last reply. I thought I’d try my luck and described the issue to ChatGPT. It proposed I add this line:

```
  keepalive: true,

```

That has done the trick! I’ve been reliably receiving form submission via telegram since 🙂

The issue was that upon changing my form to redirect to another page upon submission, customers on slower connections may have been redirected before the JS could completely execute. That addition seems to keep the script going regardless.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [March 2, 2026, 12:49pm UTC](https://community.elfsight.com/t/forms-how-to-send-notifications-about-new-submissions-to-telegram/142126/9 "2026-03-02T12:49:46Z")

</div>

Hi @Michael_Surnak 👋

Thank you so much for your insight! I’ve added this code snippet to the code in the post to avoid such issues in the future 😉
