When scoping new dev projects, asking prospective clients to open external form links usually drops completion rates. By chaining short prompt handlers with temporary memory and command re-routing, you can run conversational intake forms straight inside Telegram. Inputs are captured step-by-step in temporary session state before persisting the completed brief directly to Firebase.
📁 Filename:
command/brief.js👨💻 Code:
export default async function () {
sendMessage("What is your estimated project budget?");
waitForAnswer("__brief_budget__");
}📁 Filename:
command/__brief_budget__.js👨💻 Code:
export default async function () {
await TEMP.setProp("budget", message);
sendMessage("Got it! Now briefly describe the core deliverables:");
waitForAnswer("__brief_desc__");
}📁 Filename:
command/__brief_desc__.js👨💻 Code:
export default async function () {
const budget = await TEMP.getProp("budget").value();
await USER.setProp("latest_brief", { budget, scope: message });
clearWait();
sendMessage(`Brief saved successfully!\n\n*Budget:* ${budget}\n*Scope:* ${message}`);
}💡 Always invoke
clearWait() at the final step of a conversation flow so subsequent user messages resume standard command routing.#FlexGram