🎪 One-Tap On-Site Event Runner Controls in Telegram
Getting non-technical stagehands and booth staff to run slash commands during noisy live events is a recipe for missed handoffs. Instead of making them type out updates while juggling gear, I spin up an ephemeral reply keyboard that turns the Telegram composer into a customized 4-button hardware pad. Staff tap once to claim zones or raise urgent flags, and the keyboard cleans itself up as soon as they sign out.
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Always pass your closing confirmation message directly into
#FlexGram
Getting non-technical stagehands and booth staff to run slash commands during noisy live events is a recipe for missed handoffs. Instead of making them type out updates while juggling gear, I spin up an ephemeral reply keyboard that turns the Telegram composer into a customized 4-button hardware pad. Staff tap once to claim zones or raise urgent flags, and the keyboard cleans itself up as soon as they sign out.
📁 Filename:
crew.js👨💻 Code:
sendReplyKeyboard(
"<b>Crew Mode active.</b> Tap a station button to log your position or hail the lead desk:",
[["📍 Main Stage", "📍 Expo Hall"], ["🚨 Tech Assist", "🏁 Drop Shift"]]
);
📁 Filename:
__message__.js👨💻 Code:
if (message === "🏁 Drop Shift") {
USER.deleteProp("station");
removeKeyboard("Shift ended. Custom keyboard dismissed.");
} else if (message === "🚨 Tech Assist") {
sendMessage(`🚨 <b>Urgent Alert:</b> Runner ${user.first_name} needs immediate backup at their post!`);
} else if (message.startsWith("📍")) {
USER.setProp("station", message.replace("📍 ", ""));
sendMessage(`Logged current post as <b>${message}</b>.`);
}📁 Filename:
status.js👨💻 Code:
const station = await USER.getProp("station").value();
if (!station) {
sendMessage("No active station logged. Send /crew to bring up your station pad.");
} else {
sendMessage(`👤 <b>Runner:</b> ${user.first_name}\n📍 <b>Active Post:</b> ${station}`);
}💡 Always pass your closing confirmation message directly into
removeKeyboard(text) so the custom input tray vanishes in the very same frame the user signs off.#FlexGram
🔥1
📢 Scheduled Maintenance Outage Broadcast Dispatcher
Blasting scheduled maintenance alerts across your entire user base shouldn't require third-party email tools or wrestling with Telegram API 429 rate limit spikes. With FlexGram, you can record subscriber chat targets directly to Firebase and let the built-in throttled broadcast engine safely push the warning out to everyone in sequence. Here is how I set up instant downtime dispatches for all platform subscribers.
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Setting your broadcast delay around 35ms to 50ms keeps your dispatch comfortably within Telegram rate limits while finishing large recipient queues quickly.
#FlexGram
Blasting scheduled maintenance alerts across your entire user base shouldn't require third-party email tools or wrestling with Telegram API 429 rate limit spikes. With FlexGram, you can record subscriber chat targets directly to Firebase and let the built-in throttled broadcast engine safely push the warning out to everyone in sequence. Here is how I set up instant downtime dispatches for all platform subscribers.
📁 Filename:
command/subscribe.js👨💻 Code:
const alertTarget = user.username ? `@${user.username}` : user.first_name;
await setDB(`subscribers/${user.id}`, { id: user.id, user: alertTarget });
sendMessage(`🔔 *Status Alerts Active*\nYou will receive real-time notifications before scheduled server maintenance.`);📁 Filename:
command/broadcast_maintenance.js👨💻 Code:
sendChatAction("typing");
const subs = await getDB("subscribers");
const userIds = subs ? Object.keys(subs) : [];
const notice = `⚠️ *System Maintenance Notice*\n\nDatabase migration starts in 15 minutes. Bot APIs will be briefly paused.`;
const buttons = [{ text: "Live Status Page", url: "https://status.example.com" }];
const report = await broadcast(userIds, notice, buttons, 40);
sendMessage(`📡 *Dispatch Complete*\nDelivered: *${report.sent}*\nFailed: *${report.failed}*`);💡 Setting your broadcast delay around 35ms to 50ms keeps your dispatch comfortably within Telegram rate limits while finishing large recipient queues quickly.
⚠️ Note: Lock broadcast_maintenance.js behind an admin ID check or private bot property so unauthorized users cannot trigger mass broadcasts.#FlexGram
😍1
👨🍳 Kitchen Expediter & Order Ticket Stepper in Telegram
Tablets in hot commercial kitchens get covered in grease and inevitably crack, so we swapped expensive kitchen display hardware for Telegram group chat order tickets. Staff receive new incoming tickets right in their line chat and step each order through preparation stages using instant inline callback buttons. The entire order card updates in place with
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Passing
#FlexGram
Tablets in hot commercial kitchens get covered in grease and inevitably crack, so we swapped expensive kitchen display hardware for Telegram group chat order tickets. Staff receive new incoming tickets right in their line chat and step each order through preparation stages using instant inline callback buttons. The entire order card updates in place with
editCallbackMessage without spamming notifications, popping an instant alert when a ticket is ready for runners.📁 Filename:
command/order.js👨💻 Code:
const ticketId = params || Math.floor(1000 + Math.random() * 9000);
const orderCard = `🍽 *Order #${ticketId}*\n*Items:* 2x Smash Burger, 1x Truffle Fries\n*Status:* ⏳ Queued`;
const buttons = [[{ text: "👨🍳 Claim Ticket", command: `/claim` }]];
sendMessage(orderCard, { buttons });
📁 Filename:
command/claim.js👨💻 Code:
if (!isCallback) return;
const chefName = user.username ? `@${user.username}` : user.first_name;
const updatedText = message.replace("⏳ Queued", `🔥 Prepping (Chef: ${chefName})`);
const buttons = [[{ text: "🔔 Mark Ready for Pickup", command: "/ready" }]];
answerCallback("You claimed this ticket!");
editCallbackMessage(updatedText, buttons);
📁 Filename:
command/ready.js👨💻 Code:
if (!isCallback) return;
const updatedText = message.replace(/🔥 Prepping.*?\)/, "✅ Ready for Runner");
const buttons = [[{ text: "📦 Handed Off / Archive", command: "/archive" }]];
answerCallback("Order is up! Runner alert dispatched.", true);
editCallbackMessage(updatedText, buttons);
📁 Filename:
command/archive.js👨💻 Code:
if (!isCallback) return;
answerCallback("Ticket archived");
deleteMessage(message_id);
💡 Passing
true as the second argument to answerCallback turns Telegram's subtle toast into an intrusive modal popup, perfect for loud line kitchens where runners need immediate visual confirmation.#FlexGram
👍1🙏1
🚀 Trigger and Monitor Headless Static Builds from Telegram
Whenever a client messages asking why their freshly edited CMS article isn't live yet, logging into cloud hosting dashboards from a phone browser is painfully slow. Wiring static site build webhooks directly into FlexGram lets you fire off builds and query status checks in one tap without leaving Telegram. The zero-import
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Always trigger
#FlexGram
Whenever a client messages asking why their freshly edited CMS article isn't live yet, logging into cloud hosting dashboards from a phone browser is painfully slow. Wiring static site build webhooks directly into FlexGram lets you fire off builds and query status checks in one tap without leaving Telegram. The zero-import
HTTP global handles webhook dispatching effortlessly.📁 Filename:
command/deploy.js👨💻 Code:
sendMessage("🚀 *Select build target:*", {
buttons: [
[{ text: "📦 Staging Rebuild", command: "/run_deploy staging" }],
[{ text: "⚡ Production Rebuild", command: "/run_deploy production" }]
]
});📁 Filename:
command/run_deploy.js👨💻 Code:
sendChatAction("typing");
const target = params || "staging";
const hookUrl = target === "production"
? "https://api.buildhost.com/v1/hooks/prod"
: "https://api.buildhost.com/v1/hooks/stage";
const res = HTTP.post({
url: hookUrl,
body: { trigger: "telegram", user: user.username || user.first_name }
});
USER.setProp("last_target", target);
sendMessage(`🔨 *${target.toUpperCase()}* build triggered.\nQueue ID: \`${res?.data?.id || "active"}\``, {
buttons: [{ text: "🔍 Check Live Status", command: "/build_status" }]
});📁 Filename:
command/build_status.js👨💻 Code:
sendChatAction("typing");
const target = await USER.getProp("last_target").value() || "staging";
const res = HTTP.get({ url: `https://api.buildhost.com/v1/status/${target}` });
const status = res?.data?.status || "deployed";
sendMessage(`📊 *Environment:* \`${target}\`\nStatus: *${status.toUpperCase()}*`, {
buttons: [
[{ text: "🔄 Refresh", command: "/build_status" }],
[{ text: "🚀 Deploy Menu", command: "/deploy" }]
]
});💡 Always trigger
sendChatAction("typing") right before running third-party HTTP calls so the user gets instant visual feedback while external webhooks process.⚠️ Note: Replace the mock buildhost API endpoints with your actual hosting provider's build hook and status URLs.
#FlexGram
🔥1
🪪 Self-Serve Data Center Access Badging and Audit Logging
Auditing physical contractor access into colocation server halls usually turns into a headache of paper logbooks and forgotten checkout times. With this workflow, visiting engineers select their assigned server hall from a clean reply keyboard, receive their entry credentials and compliance brief as a document, and get logged directly into Firebase. Once maintenance wraps up, checking out clears their session and records their exit timestamp instantly.
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Always call
#FlexGram
Auditing physical contractor access into colocation server halls usually turns into a headache of paper logbooks and forgotten checkout times. With this workflow, visiting engineers select their assigned server hall from a clean reply keyboard, receive their entry credentials and compliance brief as a document, and get logged directly into Firebase. Once maintenance wraps up, checking out clears their session and records their exit timestamp instantly.
📁 Filename:
command/visit.js👨💻 Code:
sendReplyKeyboard("Select your assigned server hall for today's maintenance:", [
["Hall Alpha (Racks 1-20)"],
["Hall Beta (Racks 21-40)"],
["Cage C (High-Density SAN)"]
])
waitForAnswer("/grant_access")📁 Filename:
command/grant_access.js👨💻 Code:
clearWait()
removeKeyboard("Target zone recorded.")
FLEX.setProperty("active_zone", message)
pushDB("audit_logs/colocation", {
engineer_id: user.id,
engineer_name: user.first_name,
zone: message,
action: "checkin",
timestamp: Date.now()
})
sendDocument("https://assets.internal.net/dc-compliance-pass.pdf", {
caption: `Access granted for *${message}*. Keep your digital pass accessible at all times.`,
parse_mode: "Markdown"
})
📁 Filename:
command/leave.js👨💻 Code:
const zone = await FLEX.getProperty("active_zone").value()
if (!zone) {
sendMessage("No active data hall check-in found for your account.")
return
}
FLEX.deleteProperty("active_zone")
pushDB("audit_logs/colocation", {
engineer_id: user.id,
engineer_name: user.first_name,
zone: zone,
action: "checkout",
timestamp: Date.now()
})
sendMessage(`Checked out of *${zone}*. Security gate has been notified.`, { parse_mode: "Markdown" })💡 Always call
removeKeyboard() right when consuming reply keyboard input so custom buttons don't linger on the technician's screen.⚠️ Note: EnsureFIREBASE_URLandFIREBASE_SECRETare configured so audit logs and user property states persist across server restarts.
#FlexGram
🔥1
💀 Surprise Code (Made for educational purposes)
Can simple JavaScript actually make your browser freeze or crash?. Check out the GitHub repo and test it yourself
🔗 GitHub: Visit Repo
⚠️ WARNING
❌ Don't run this on your main browser
❌ Don't run it on someone else's device
❌ It can freeze/crash your browser and make you lose unsaved work
✅ Test only on your own device
🧪 Try experimenting with a small number of tabs and see how your browser handles it.
What other crazy but safe browser experiments should I build 🤔?
Drop your ideas below 👇
❤1👍1
📦 Automated Office Parcel Reception & Shelf Staging
Front desk clipboards and lost courier notes become an absolute nightmare once your team scales past twenty people. Instead of building a bespoke mobile check-in app, you can give your reception team a lightning-fast reply keyboard workflow that records delivery shelf locations into Firebase and updates aggregate totals instantly. The floor staff taps one button to record the delivery bay, the persistent reply keyboard resets cleanly, and the intake queue updates in real time.
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Calling
#FlexGram
Front desk clipboards and lost courier notes become an absolute nightmare once your team scales past twenty people. Instead of building a bespoke mobile check-in app, you can give your reception team a lightning-fast reply keyboard workflow that records delivery shelf locations into Firebase and updates aggregate totals instantly. The floor staff taps one button to record the delivery bay, the persistent reply keyboard resets cleanly, and the intake queue updates in real time.
📁 Filename:
drop.js👨💻 Code:
sendReplyKeyboard("Select the arrival shelf zone for this parcel:", [
["Bay A - General", "Bay B - Secure Lockbox"],
["Bay C - Cold Storage", "Front Desk Holding"]
])
waitForAnswer("confirm_drop")📁 Filename:
confirm_drop.js👨💻 Code:
clearWait()
const zone = message
pushDB("deliveries/inbound", {
zone: zone,
logged_by: user.first_name,
received_at: Date.now()
})
BOT.add("inbound_parcel_count", 1)
removeKeyboard(`Logged parcel to *${zone}*! Inventory tally updated.`)
📁 Filename:
parcels.js👨💻 Code:
const count = await BOT.getProp("inbound_parcel_count").value() || 0
sendMessage(`🏢 *Facility Parcel Hub*\nTotal inbound packages processed: *${count}*`, {
buttons: [{ text: "Log New Drop", command: "/drop" }]
})💡 Calling
removeKeyboard directly with a message string removes the custom keypad layout and posts your confirmation text in one clean step.⚠️ Note: Ensure yourFIREBASE_URLandFIREBASE_SECRETare configured sopushDBwrites persist directly into your database.
#FlexGram
🥰1
🚐 Zero-Friction Morning Fleet Inspection & Mileage Intake
Depot drivers will skip vehicle walkaround sheets nine times out of ten if they have to fill out paper clipboards or download heavy native apps. Routing pre-trip logs right into Telegram lets drivers send odometer numbers, select condition tags off a custom reply keyboard, and strip the keyboard away the moment their route is approved. Everything syncs straight to the dispatch database before the van even exits the lot.
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Calling
#FlexGram
Depot drivers will skip vehicle walkaround sheets nine times out of ten if they have to fill out paper clipboards or download heavy native apps. Routing pre-trip logs right into Telegram lets drivers send odometer numbers, select condition tags off a custom reply keyboard, and strip the keyboard away the moment their route is approved. Everything syncs straight to the dispatch database before the van even exits the lot.
📁 Filename:
inspect.js👨💻 Code:
sendMessage(`Hey ${user.first_name}, let's log your morning pre-trip inspection. Reply with your current van odometer mileage:`)
waitForAnswer('record_mileage')📁 Filename:
record_mileage.js👨💻 Code:
TEMP.setProperty('van_odometer', message)
sendReplyKeyboard('Select vehicle exterior and tire condition:', [
['🟢 All Clear - Good to Go', '🟡 Minor Scuff / Dirty'],
['🔴 Maintenance Required']
])
waitForAnswer('finish_inspection')📁 Filename:
finish_inspection.js👨💻 Code:
const odo = await TEMP.getProp('van_odometer').value()
pushDB('fleet_inspections', {
driver: user.first_name,
driver_id: user.id,
mileage: odo,
condition: message,
timestamp: new Date().toISOString()
})
clearWait()
removeKeyboard(`Inspection submitted! Mileage: ${odo} km | Status: ${message}. Drive safe today!`)💡 Calling
removeKeyboard() immediately wipes custom reply buttons from the chat view so the driver's standard keyboard returns the second their submission finishes.⚠️ Note: Ensure your database rules allow authenticated REST writes from the bot backend to the fleet_inspections path.#FlexGram
👌1
🏗️ Subcontractor Jobsite Safety Muster & Daily Shift Sign-off
Subcontractors on active commercial build sites refuse to install bloated native apps just to clock in and confirm their morning hazard walkthrough. Wiring Telegram's persistent reply keyboards directly to Firebase lets field crews tap physical, chunky buttons without peeling off their work gloves. Workers punch in, their muster timestamps push directly into your database, and clocking out cleanly dismisses the custom keyboard from their screen.
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 When sending command strings inside reply keyboard rows, match each button text to an exact file in
#FlexGram
Subcontractors on active commercial build sites refuse to install bloated native apps just to clock in and confirm their morning hazard walkthrough. Wiring Telegram's persistent reply keyboards directly to Firebase lets field crews tap physical, chunky buttons without peeling off their work gloves. Workers punch in, their muster timestamps push directly into your database, and clocking out cleanly dismisses the custom keyboard from their screen.
📁 Filename:
shift.js👨💻 Code:
sendReplyKeyboard("👷 *Jobsite Check-in Active*\nSelect your shift status below:", [
["/checkin", "/safety_ok"],
["/signoff"]
], "Markdown");📁 Filename:
checkin.js👨💻 Code:
const stamp = new Date().toISOString();
pushDB("jobsite_logs", {
worker: user.first_name,
telegram_id: user.id,
event: "clock_in",
timestamp: stamp
});
sendMessage(`✅ Clock-in recorded for *${user.first_name}* at \`${stamp.slice(11, 19)} UTC\`.`, { parse_mode: "Markdown" });
📁 Filename:
safety_ok.js👨💻 Code:
pushDB("safety_audits", {
worker_id: user.id,
worker_name: user.first_name,
status: "ppe_verified",
timestamp: Date.now()
});
sendMessage("🦺 *Safety briefing acknowledged.* Morning PPE check logged.", { parse_mode: "Markdown" });📁 Filename:
signoff.js👨💻 Code:
pushDB("jobsite_logs", {
worker_id: user.id,
event: "clock_out",
timestamp: Date.now()
});
removeKeyboard("👋 Shift complete. Custom keyboard cleared. Drive safe!");💡 When sending command strings inside reply keyboard rows, match each button text to an exact file in
/command so taps route instantly without touching a fallback parser.⚠️ Note: SetFIREBASE_URLandFIREBASE_SECRETin your environment sopushDBcan persist log entries directly to your Realtime Database.
#FlexGram
👍1👌1
📜 Mobile Escrow Packet & Closing Pin Dispatcher
Mobile signing agents waste tons of time in parking lots wrestling with clunky document portals just to grab a buyer's signing sheet, an escrow officer's direct line, and a map pin. This automation lets an on-the-road notary text a single file reference to get an all-in-one dispatch bundle delivered natively inside Telegram. The bot pings the title API, streams the PDF closing document with
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
📁 Filename:
👨💻 Code:
💡 Firing
#FlexGram
Mobile signing agents waste tons of time in parking lots wrestling with clunky document portals just to grab a buyer's signing sheet, an escrow officer's direct line, and a map pin. This automation lets an on-the-road notary text a single file reference to get an all-in-one dispatch bundle delivered natively inside Telegram. The bot pings the title API, streams the PDF closing document with
sendDocument, pushes the title officer's phone card via sendContact, and drops an exact destination coordinate with sendLocation so the agent can launch navigation with a single tap.📁 Filename:
closing.js👨💻 Code:
sendMessage("Enter the 6-digit escrow file ID to retrieve your closing packet:", {
buttons: [{ text: "Cancel", command: "/cancel" }]
});
waitForAnswer("get_closing");📁 Filename:
get_closing.js👨💻 Code:
clearWait();
sendChatAction("upload_document");
const res = await HTTP.get({ url: `https://api.titleops.internal/files/${encodeURIComponent(message)}` });
if (!res || !res.data || !res.data.pdf_url) {
return sendMessage("Escrow file not found. Please verify the ID and run /closing again.");
}
pushDB("signings", { file: message, notary: user.id, at: Date.now() });
sendDocument(res.data.pdf_url, { caption: `*Escrow File #${message}* Ready for execution.` });
sendContact(res.data.officer_phone, res.data.officer_name);
sendLocation(res.data.lat, res.data.lng);
📁 Filename:
cancel.js👨💻 Code:
clearWait();
sendMessage("Request cancelled. Enter /closing whenever you are ready.");
💡 Firing
sendChatAction('upload_document') right before your HTTP call gives agents instant UI feedback in the Telegram header while third-party PDFs are being negotiated.⚠️ Note: Replace the title API URL with your actual document service endpoint and ensure it returns direct downloadable file URLs.
#FlexGram
👍1🔥1