Skip to content

Free Form Integration

In this tutorial, you will learn how to add a free form-submission feature to your website using a Cloudflare Worker and a Telegram Bot.

1. Create Your Cloudflare Worker

  1. Go to your Cloudflare dashboard and open “Workers & Pages.”
  2. Click “Create Application.”
  3. Under “Workers,” choose “Import a repository” and click “Get Started.”
  4. Click “Clone a public repository via Git URL.”
  5. Copy this link: https://github.com/webtuyo/formToTelegram.git, paste it into the field, and click “Continue.”

2. Create Your Telegram Bot

  1. Open your Telegram account.
    It’s easiest to use the web version on your computer for this step.
  2. Search for “BotFather.”
  3. In the chat, type “/”, then select “/newbot.”
  4. Choose a name for your bot and press Enter.
  5. Choose a username for your bot — it must end with “bot.”
  6. Your bot is now created. Click the generated token to copy it.

3. Add Your Bot Token to Cloudflare

  1. Go back to your Cloudflare dashboard.
  2. Under “Configure Environment Variables,” paste your token into:
  3. TELEGRAM_BOT_TOKEN

4. Activate Your Telegram Bot

  1. Return to Telegram and open the chat with your new bot.
    Use the first link provided by BotFather.
  2. Click “Start” so the bot can send messages to you later.
    This step is required for receiving form submissions.

5. Get Your Telegram User / Chat ID

  1. Search for “userinfobot” in Telegram and click Start.
  2. Copy the ID it displays.
  3. Go back to Cloudflare and paste it into:
  4. TELEGRAM_CHAT_ID

6. Add Your Domain

  1. Add your domain starting with https://
  2. You can list multiple domains using commas (no spaces).
  3. Example: https://design.webutuo.com

This allows you to test directly inside the WebTuyo Designer using preview mode.


7. Deploy Your Worker

  1. Click “Create and Deploy.”
  2. Once deployment is complete, go to Settings and copy your worker address.

8. Configure WebTuyo

  1. Open the WebTuyo Designer.
  2. Edit the “URL” inside the block’s data.
  3. Click Save.

9. Test the Integration

  1. Switch to preview mode — this step is important.
  2. Fill out the form and submit it.
  3. You should now receive the submitted form data directly in your Telegram account.

🎉 Final Notes

Everything is now set up!
Your Cloudflare Worker is connected to your Telegram bot, your form submissions are working, and your automation is ready to go.

Great job completing the setup!