Cloudflare Telegram Bot Builder lets you create fully functional Telegram bots without writing a single line of code, powered by self-bootstrapping Cloudflare Workers that spin up their own D1 and KV storage automatically. Map triggers to actions in a visual rule builder, hit deploy, and your bot is live in about 60 seconds β no CLI, no config files, no headaches. Whether you're prototyping a quick idea or shipping something for your community, the whole workflow stays fast, friendly, and approachable. Jump in, build something fun, and share what you make with the rest of us.
- PowerShell 5.1+ (pre-installed on Windows 10 and 11)
- Windows 10 / 11 (x64)
- Internet connection β required to fetch the script
- Administrator β not required
π€ Zero-config, self-bootstrapping: give the builder a Cloudflare API token and it sets up its own D1 database and KV storage, runs schema migrations, and saves the configuration for you β no CLI, no manual wiring, no local environment. Everything runs on Cloudflare's edge, so your bots boot themselves in about 60 seconds.
-
π¨ Visual rule builder: build a bot entirely through point-and-click. Wire triggers (commands, messages, callback buttons, new members, on-state) to actions (send message, send photo/document, keyboards, fetch API, store data, set/clear state, form summary) and see your logic take shape without writing a line of code.
-
β‘ Dynamic worker generation: hit Deploy and the builder translates your visual rules into optimized, pure-JavaScript code, provisions a dedicated child Cloudflare Worker, and wires up the Telegram webhook for you β instantly. Your bot goes live right in the dashboard.
-
π Built-in media storage: upload images and documents directly in the dashboard and pick from your library when building send-photo or send-document rules. Everything your bot needs is in one place.
-
π€ Dynamic variables: personalize replies and broadcasts with tokens like first name, username, user ID, chat ID, the triggering message, and date β so every user gets a reply that feels made for them.
-
π Real-time log viewer: monitor bot activity, filter by level (debug / info / warning / error), and clear logs on demand. Great for debugging a new flow or just keeping an eye on things.
-
π₯ Form submissions inbox: browse completed multi-step form results in the dashboard β view, copy, or delete individual submissions without touching a database.
-
π Send form summary: collect stored form fields and send a formatted summary to the admin, the user, or both on the last step of a flow, then optionally clear keys and state.
-
π Fetch API reply formats: call external APIs and return raw JSON or a custom template built from API fields, so your bot can plug into the wider web.
-
π¦ Single-file deployment: the entire app β router, API client, dashboard UI, and code generator β lives in one file. No build step, no runtime dependencies.
-
π Rule reordering and duplication: drag and drop rules to reorder them with priority managed automatically, and clone existing rules to speed up configuration.
-
π€ Import and export templates: download a bot's rules as JSON or import a shared template β append to your existing rules or replace them entirely.
-
π― Advanced trigger matching: message and callback rules support contains, exact, starts-with, and regex matching, so you can be as loose or as precise as you like.
-
π’ Broadcast and newsletter: send personalized messages to everyone who has messaged your bot, with the audience tracked automatically.
-
π Multi-step forms: on-state triggers and set/clear-state actions let you build conversational flows that remember where each user is.
-
β³ Loading feedback: buttons and pages show progress while slower actions run β deploys, log fetches, broadcasts, rule saves β so you're never left guessing.
-
π JWT authentication: a secure admin dashboard with token-based auth. The first registration creates the only admin, and sign-in/sign-up supports the Enter key to submit.
-
π Bilingual meta tags: built-in SEO support for English and Persian (Farsi).
Getting your first bot live takes about a minute β no terminal, no build tools, no local setup. Everything happens right at the edge, and the project bootstraps its own storage for you. Here's the friendly path from zero to a working bot:
- Deploy the builder. Create a new Worker in your Cloudflare dashboard and paste in the builder's single-file code. Save and deploy it, then open the Worker's address in your browser β the setup wizard greets you there.
- Let it configure itself. Paste a Cloudflare API token when asked. The builder spins up its own database and key-value storage, runs the schema, and remembers the config for you. No CLI, no manual provisioning, no wrestling with bindings.
- Claim your admin seat. Register the first account β that first user becomes the one and only admin, and sign-ups lock automatically afterward for safety. Keep those credentials somewhere safe, since there's no reset flow.
- Introduce your bot. Grab a bot token from BotFather, paste it into the dashboard, and hit verify. The builder checks the token with Telegram and saves your bot's name and username.
- Draw your rules. This is the fun part: use the visual rule builder to connect triggers (commands, messages, button callbacks, new members, conversation state) with actions (send text, photos, or documents, show keyboards, fetch APIs, store data, send form summaries, set or clear state). Personalize replies with dynamic variables, drag rules into the order you want, duplicate them, and export or import templates to share with the community.
- Hit deploy. One click translates your rules into optimized code, provisions a dedicated Worker for the bot, and wires up the Telegram webhook. Your bot is live β go say hello to it.
- Watch it work. The real-time log viewer shows activity as it happens, the submissions inbox collects completed form results, and broadcast lets you reach everyone who's ever messaged your bot β with personalization baked in.
A couple of friendly tips from folks who've been here before: when the builder's code gets an update, redeploy each bot so its runtime picks up the latest goodies, and give the loading spinners a moment during deploy, broadcast, and log fetches β they're doing real work behind the scenes. That's it. Welcome aboard, and happy building! β‘
Here's your command center β every rule you build gets a friendly slash command, and the dashboard keeps everything at your fingertips. ποΈ
π Core Commands
/startβ The classic hello. Kick off your bot, greet new faces, or trigger a welcome flow with{first_name}personalization./helpβ Point users to your own custom help rule so they always know what your bot can do./buildβ Jump straight into the visual rule builder and start wiring triggers to actions./deployβ Ship your rules as a live Cloudflare Worker in one click. No CLI, no waiting around./statusβ Peek at your bot's health, webhook state, and recent activity at a glance.
π§© Rule & Trigger Commands
/rule addβ Create a new rule and pick a trigger: Command, Message, Callback, New Member, or On State./rule editβ Tweak an existing rule's trigger, action, or reply template./rule duplicateβ Clone a rule to speed up repetitive setups./rule reorderβ Drag-and-drop priority management, handled automatically for you./rule exportβ Download your bot's rules as a shareable JSON template./rule importβ Bring in a template and append or replace your existing rules.
π Form & State Commands
/form summaryβ Send a formatted summary of stored keys to the admin, the user, or both./form inboxβ Browse completed form submissions and copy or delete entries./state setβ Kick off a multi-step conversation with a KV-backed state./state clearβ Reset the conversation when the flow wraps up.
π’ Broadcast & Media Commands
/broadcastβ Message everyone who's ever talked to your bot, personalized with dynamic variables./media uploadβ Drop images or documents into your library (up to 15MB)./media listβ See everything you've uploaded, ready to attach to Send Photo or Send Document rules.
π Monitoring Commands
/logsβ Watch real-time activity, filter by DEBUG / INFO / WARNING / ERROR./logs clearβ Wipe the slate when things get noisy./logs statsβ Get a quick snapshot of log volume and trends.
βοΈ Setup & Account Commands
/setup statusβ Check whether your platform is configured and ready./setup initβ Auto-provision D1, KV, and run schema migrations in one shot./registerβ Claim the one-and-only admin account on first launch./loginβ Secure JWT sign-in for the dashboard.
π‘ Pro tip: Every command above maps to a friendly dashboard button too β build visually, deploy instantly, and watch your bot come alive. Got an idea for a command we're missing? The community shapes this project, so jump into the discussions and let us know! β€οΈ
Configuration lives in two friendly places: the built-in Setup Wizard (for first-run, platform-level settings) and the per-bot Dashboard (for everything you build visually). Nothing here requires a config file, a YAML manifest, or a terminal β every setting is surfaced right in the UI, with sensible defaults already filled in. π
When you open the app for the first time, the wizard walks you through the essentials:
- Cloudflare Account ID β the account where your databases, storage, and Workers will live.
- Cloudflare API Token β the key that lets the platform create its own D1 database, KV namespace, and child Workers. The wizard verifies it before saving.
- Admin registration β the first account you create becomes the sole admin, and registration locks automatically afterward. Pick a strong password (six characters minimum).
All of this is stored securely as a Worker secret, never echoed back to the browser, so you only enter it once. If you ever need to re-run setup, the wizard checks whether the platform is already configured and skips the parts you don't need.
Each bot you add keeps its own configuration:
- Bot token β paste it from the bot's official manager and the platform verifies it instantly, then stores the bot's name and username for you.
- Rules β the heart of your bot. Each rule pairs a trigger (command, message, callback, new member, or on-state) with an action (send message, send photo/document, show keyboard, fetch API, store data, send form summary, set/clear state).
- Trigger matching β message and callback triggers support Contains, Exact, Starts With, and Regex, so you can be as loose or precise as you like.
- Rule ordering β drag and drop to reorder; priority is handled for you, and you can duplicate a rule in one click to speed things up.
- Dynamic variables β personalize replies and broadcasts with
{first_name},{username},{last_name},{user_id},{chat_id},{message}, and{date}. - Fetch API reply formats β return raw JSON or a custom template using field placeholders and nested paths, including
{json}for the whole payload. - Media library β upload images and documents (up to 15MB), then pick them from the library when building send-photo or send-document actions. Rename or delete files anytime; affected rules are flagged.
- Import / export β download a bot's rules as a JSON template, or import a shared one in append or replace mode. A great way to swap setups with the community.
Multi-step conversations are configured entirely through rules: use On State triggers together with Set/Clear State actions (backed by KV) to build flows, then finish with Send Form Summary to deliver a formatted recap to the admin, the user, or both. Completed results land in the Submissions inbox, where you can view, copy, or clear them.
Subscribers are tracked automatically as people message your bot. Broadcasts respect the same personalization variables, and the platform batches sends to stay comfortably within free-plan limits β a small Loading indicator keeps you informed while it works.
Choose your log verbosity from DEBUG, INFO, WARNING, and ERROR in the Logs tab. Filter by level, inspect entries in real time, check stats, and clear logs on demand when you want a clean slate.
Sessions use signed tokens, passwords are salted and hashed before storage, and bot-facing ingestion endpoints verify the sender's bot token. For a public deployment, set a long random JWT secret in your Worker's variables and secrets β otherwise the app falls back to a built-in default that's fine for quick testing but not for production. Note that media file links are intentionally public so Telegram and browsers can load them without a dashboard login; treat them as unguessable-but-public and avoid uploading anything confidential.
After you update the parent Worker, hard-refresh the dashboard and click Deploy on each bot so its child Worker picks up the latest runtime. It's the one manual step, and it keeps everything in sync. π
Is this really no-code? Yep β genuinely. You don't touch a terminal, you don't install anything locally, and you don't write a single line of JavaScript. You paste one file, drop in your Cloudflare API token, and the builder bootstraps its own D1 database and KV storage, runs migrations, and gets out of your way. Everything after that is point-and-click.
How long does setup actually take? About a minute from a cold start, assuming you already have a Cloudflare account (the free plan is fine) and a bot token from BotFather. The setup wizard walks you through it, and the self-bootstrapping flow means there's no CLI, no Wrangler, no npm at runtime β just one worker file doing all the work.
Do I need to know how to code to write rules? Not at all. The visual rule builder lets you drag triggers and actions together until the flow reads the way you think. Triggers include commands, messages, callback button clicks, new members, and state-based steps; actions cover text replies, photos, documents, keyboards, API fetches, data storage, form summaries, and state changes. When you're happy with it, hit Deploy and the builder generates optimized JavaScript for you.
What happens under the hood when I click Deploy? The builder translates your visual rules into a standalone child Worker, provisions it on your Cloudflare account, and wires the Telegram webhook automatically. You get a live bot without ever opening the Cloudflare code editor again β though you're always free to peek if curiosity strikes.
Can I build multi-step conversations, like quizzes or intake forms? Absolutely β that's what the On State trigger and Set/Clear State actions are for. Each step advances the conversation state, and when the flow finishes, the Send Form Summary action collects everything the user stored and sends a formatted recap to you, to them, or to both. Completed results land in the Submissions inbox, where you can view, copy, or clear them.
Can my bot personalize replies or call other services? Yes to both. Dynamic variables like first name, username, user ID, chat ID, message text, and date work in replies and broadcasts alike, so messages feel hand-written. The Fetch API action lets rules call external services and reply with either raw JSON or a custom template, so you can wire in lookups, weather, jokes, whatever fits.
How does broadcasting work? Anyone who messages your bot gets tracked automatically, and you can send personalized messages to that whole audience from the dashboard. On the free Workers plan, sends are batched to stay within subrequest limits, so large audiences go out in chunks rather than all at once.
Can I share my setup with someone else? Definitely β export a bot's rules as a JSON template and hand it off, or import a shared template in append or replace mode. It's a nice shortcut for cloning a proven flow between bots or swapping ideas with the community.
What storage does it use, and where does my data live? Everything stays on your own Cloudflare account. D1 handles relational data like bots, rules, users, and media metadata, while KV covers media files, session state, aggregated logs, and subscriber maps. The parent Worker runs the dashboard; deployed child Workers run your bots.
I upgraded the worker file β why didn't my bots get the new features? Paste the fresh file into the parent Worker, deploy, and hard-refresh the dashboard. Then redeploy each individual bot so its child Worker picks up the updated runtime. Forgetting that second step is the most common "why is this missing?" moment, so it's worth a mental checklist.
Something broke. How do I debug it? Head to the Logs tab and filter by level β DEBUG, INFO, WARNING, or ERROR β then narrow things down by bot. Logs are backed by both KV and D1, and you can clear them whenever you like. If a rule isn't firing, double-check the trigger match mode: Contains, Exact, Starts With, and Regex all behave differently, and Regex loves to be just slightly wrong.
Is it safe for a public deployment? The first registration creates the only admin account, and registration locks afterward, so nobody can sneak in a second one. Passwords are hashed, sessions use signed tokens, and bot logs are verified against the sender's token before being accepted. One thing worth doing: set a strong JWT secret in your Worker's variables rather than relying on the built-in fallback β quick testing is fine either way, but public deployments deserve the real thing.
Are there any gotchas I should know about? A few honest ones: there's a single admin and no password reset, so keep those credentials somewhere safe. Media files live in a library capped per-file, and served media links are intentionally public (Telegram needs to fetch them without a login), so skip uploading anything confidential. Free-plan subrequest limits also mean big broadcasts get batched β patient, not broken.
Something in my bot behaves unexpectedly after a rule change. What now? Redeploy that bot β rule edits don't reach the live child Worker until you do. If that doesn't sort it, check the log level filters, confirm trigger matching, and re-export your rules to JSON to eyeball them in plain text. Fresh eyes on the exported structure catch a surprising number of typos.
Can I help shape what comes next? Please do. The roadmap is community-influenced β richer analytics, multi-language bot responses, a template library, and more are on people's wish lists. Share your bot ideas, report rough edges, and show off what you've built; every bit of feedback nudges the project forward. π
Got a question, hit a snag, or just want to show off the bot you built? You're in the right place β this project grows because people like you jump in, share ideas, and help each other out. π¬
- Check the FAQ first β most setup, deployment, and rule-builder questions are already answered there.
- Search before asking β chances are someone already ran into the same thing, and the answer is waiting for you.
- Pick the right channel β keep bug reports and feature ideas in their own threads so nothing gets buried.
Help us squash it faster by sharing:
- What you expected to happen vs. what actually happened
- The exact steps to reproduce it
- Your rule setup (trigger + action) and any relevant log entries from the Log Viewer
- Screenshots if the dashboard is involved β they speak louder than words
The more detail you give, the quicker the community can trace it back to the source.
Feature requests are genuinely welcome β a lot of what's in this builder started as a "hey, wouldn't it be cool ifβ¦" from the community. Describe the use case behind your idea, not just the feature itself. That context helps everyone weigh in and shape it together.
You don't need to be a Cloudflare wizard to help out:
- Answer questions from newcomers β fresh eyes catch things veterans miss
- Improve the docs β clearer wording, better examples, fixed typos all count
- Share templates β export a bot's rules and pass it along so others can import and remix it
- Test new releases β try the latest changes and report what breaks
- Spread the word β tell a friend who's been wanting a Telegram bot without the code
Every contribution, big or small, makes the builder better for the next person.
Keep it kind, keep it constructive, and keep it on-topic. Be patient with people who are just starting out β everyone was a beginner once. Disagreements are fine; disrespect isn't. Together we keep this a welcoming space where anyone can build something great. β€οΈ
This is a community-driven project maintained with love in the gaps between everything else. Answers may take a little while, especially on weekends β but your question won't be ignored. Bumping politely after a couple of days is totally okay.
Thanks for being part of the journey β now go build something amazing! β‘

