Skip to main content

Understanding Flows

A flow is the complete journey your bot takes when responding to a user. It's a series of connected steps that run one after another.


What is a Flow?

Think of a flow like a conversation:

  1. Something triggers it → The user sends a command
  2. Your bot processes it → Maybe checks some conditions
  3. Something happens → The bot sends a response

Real-World Example

Let's say you want a bot that tells users if a store is open:

User asks: /hours
Bot checks: Is it between 9am and 5pm?
Bot responds: "We're open!" or "Sorry, we're closed"

This is a flow with:

  • 1 trigger (the /hours command)
  • 1 decision point (checking the time)
  • 2 possible outcomes (open or closed)

How Flows Run

When a user interacts with your bot:

  1. Telegram sends the message to BotGami
  2. BotGami finds the right flow based on triggers
  3. The flow runs step by step following the wires
  4. Actions are executed (messages sent, data saved, etc.)
Super Fast!

Most flows complete in under a second. Your users get instant responses.


Multiple Flows

Your bot can have many flows at once. Each one handles different situations:

FlowTriggerWhat It Does
Welcome/startGreets new users
Help/helpShows commands
Profile/profileShows user info
Supportany messageHandles questions

BotGami automatically picks the right flow based on what the user sends.


Pausing and Resuming

Some flows need to wait for user input:

When a flow asks a question, it pauses and remembers where it was. When the user replies, the flow picks up right where it left off.

This is how you build multi-step conversations!


Key Concepts

TermWhat It Means
TriggerWhat starts a flow (commands, messages, buttons)
NodeOne step in a flow (send message, ask question, etc.)
WireConnection between nodes (shows the path)
BranchWhen a flow splits into multiple paths

Next Steps