FlowCastle/Docs/Triggers: How Your Bot Starts

Triggers: How Your Bot Starts

The Starting Step block and every way a conversation can begin: commands, messages, buttons from other flows, deep links, events — and what Deploy does to your Telegram command menu.

5 min read·Last updated: 2026-08-19
The Starting Step block and every way a conversation can begin: commands, messages, buttons from other flows, deep links, events — and what Deploy does to your Telegram command menu.

Guide

  1. 1

    The Starting Step is where a flow begins

    Open any flow and the first block on the canvas is the Starting Step. It is the one block you cannot delete: a flow with no way in can never run.

    The block is a list of ways in. It shows a line like Triggers: /start, /help, Deep link: promo-…, an Add Trigger button, and — under When... — the other flows that jump into this one, each with an Open button.

    The Starting Step block on the canvas, listing its triggers and the flows that jump into it

    Click the block and the editor opens on the right. Every trigger is its own card — Trigger 1, Trigger 2 — with a Type menu at the top and its own Active switch at the bottom. A flow can have as many triggers as it needs, and turning one off does not touch the others.

    The trigger editor with the Type menu open, showing the available trigger types

  2. 2

    Slash commands: /start and your own

    Command is the type most flows use. The slash is already there as a fixed prefix, so in the Command field you type help, not /help.

    Commands are matched without case: /Help and /help are the same trigger. Stick to lowercase letters, digits and underscores, up to 32 characters — that is what Telegram accepts, and it also decides whether the command shows up in the bot's command menu.

    A Command trigger set to /help, with its Telegram source and variable mapping

    Under the command sits Telegram source: Private, Group, Channel. Leave it on private chats unless the bot is in a group. If you add Group, a Group message scope field appears with two options — Mentions, replies, and commands or All group messages. Catching all group messages also needs Group Privacy turned off for the bot in @BotFather; the editor shows you the exact steps.

  3. 3

    Any message, or one exact phrase

    Choose Message and you get Message Filter (optional). Leave it empty and the flow starts on any message the person sends. Fill it in and the flow starts only when the message matches that text exactly — this is your keyword entry point, so menu catches menu and nothing else.

    Every message and command trigger also has Save to Variables (optional). It maps what the trigger already knows — Message text, Command — onto a contact variable, so the very first thing a person typed is stored before your first message goes out.

  4. 4

    Buttons from another flow need no trigger

    A button does not need a trigger at all. Inside one flow, a button simply connects to the next block on the canvas. When the next step lives in a different flow, you drop in a Flow Link block and point it at that flow.

    That is why the Starting Step has a When... section: it lists every flow whose Flow Link jumps here, with an Open button to hop straight to it. Nothing is configured on the trigger side — the list is how you see, from the inside, who else can start this flow.

  5. 5

    Deep links: one link per campaign

    A Telegram deep link looks like t.me/yourbot?start=CODE. Tapping it opens the chat and hands your bot the code, so one bot can greet a paid-ads visitor, a partner's audience and a QR code on a flyer differently.

    Pick Deep link / start parameter, then answer Which links trigger this?:

    • Any start parameter — anything after ?start=
    • Starting with… — a Prefix such as promo-
    • Exactly… — one specific code

    Your link shows the finished link with a Copy button, so there is nothing to assemble by hand. The part after the prefix arrives as Start parameter; map it to a contact variable under Save to Variables (optional) and you can use {{promo_code}} in your messages. Variables go into message text as chips from the variable picker — you never type the braces yourself.

    A deep-link trigger with a promo- prefix, the generated link, and the start parameter saved to a variable

    Referral Link is the same mechanism, pre-configured: it catches links starting with ref-- and also looks up who invited the person.

  6. 6

    Events: new members and installed modules

    New chat member starts a flow when someone joins a group the bot is in — the usual home for a group welcome or a CAPTCHA.

    Installed modules add their own entries to the same Type menu, grouped under Installed modules. The Telegram module, for example, contributes a membership-change trigger and a channel-post trigger. Which triggers you see depends on what you have installed, and modules have their own guide later in this series.

  7. 7

    Deploy syncs your Telegram command menu

    Press Deploy and, once the bot is live, FlowCastle reads the bot's current command menu from Telegram, merges your command triggers into it, and writes it back. Nobody has to run /setcommands in BotFather.

    Four things worth knowing:

    • The merge is additive. Commands you set yourself in BotFather stay; a command that matches one of yours is replaced by yours; nothing is ever removed — including a command whose flow you deleted.
    • The description shown next to each command is the flow's name. Name your flows the way you want the menu to read.
    • Commands Telegram will not accept — uppercase, spaces, over 32 characters — are skipped from the menu. The trigger itself still works.
    • If the sync fails, the deploy still succeeds. The menu is cosmetic; the trigger is what makes the bot answer.
  8. 8

    When two triggers could match

    When several flows could handle the same /start, the most specific one wins:

    1. a deep link matching an exact code
    2. a deep link matching a prefix
    3. a deep link accepting any start parameter
    4. a plain /start command

    So a promo- link runs your campaign flow, and a bare /start still runs the welcome flow. You never have to reason about the order of your flows.

    The one case to watch is a tie. If two flows both trigger on /start, or both on the same custom command, one of them wins and the other never runs — quietly, with no warning in the editor. Give each command exactly one flow, and use a Flow Link when two paths need to share an entry point.

  9. 9

    Next up

    Your bot starts. Now teach it to listen and remember the answers: Ask Questions and Collect Answers.

Next Guide

Continue with
Ask Questions and Collect Answers
A two-question intake bot: turn on Wait for reply, pick a reply type, ask for a phone in one tap, and save every answer into a variable.

Related Guides

More guides to help you continue from this topic.