Logic and timing
Conditions, loops, pauses, components and reminders.
Choosing a path¶
A condition selects a branch, a loop repeats steps for a list, and a component groups part of a flow. None of these replaces sending a message: connect the required action afterwards.
Pause is a short wait in the current run. A reminder is a separate future task. A schedule starts a new flow run at a chosen time.
Execution order โ ยท Scheduled starts โ
Condition¶
Compares values and chooses the Yes or No output.
- For each check, set the left value, operator and right value. Both values can be entered or connected independently.
- Combine checks with AND / OR. They are evaluated from top to bottom, without AND taking priority over OR. For example: (A OR B) AND C.
- Contains by lemma includes word forms. Open the small button beside the operator to inspect them. Use equals for an exact match.
Pause¶
Pauses the current run briefly before the next step.
- Enter the duration in seconds and connect the next block to the output.
- For a notification on a specific date, use Schedule reminder instead of a long pause.
Branch by messenger¶
Routes events from different messengers into separate branches.
- Choose the messengers and connect their outputs to the appropriate actions.
- Connect Telegram-only actions to the Telegram branch. This block selects a route; it does not connect a new messenger.
For each item¶
Runs the same branch for every item in a list.
- Supply a list, such as ${table_result.rows}, and name the current item, for example item. Use ${item.name} inside the loop.
- The Loop output leads to actions for one item; Done continues after all items. Do not connect the end of the branch back to the loop input.
Component¶
Groups part of a flow into a component with named inputs, outputs and parameters.
- Open its internal flow using the corner button. Configure the internal steps and the component's external connections.
- Connect only the required parameters and outputs from outside. Use the same button to return to the main flow; the internal steps stay inside the component.
Schedule reminder¶
Stores a one-off reminder and sends it at the chosen time without keeping the flow waiting.
- Set the date, time zone, text and destination chat. Keep the reminder ID if you may need to cancel it.
- Set a deduplication key to avoid creating the same reminder on repeated runs. Use Pause for a brief wait.
List reminders¶
Lists pending reminders.
- Name the result. With an event author, it lists that user's reminders; without an author, the source chat's reminders. With neither, it lists reminders for the whole bot.
- Build text to show the list or use an ID to cancel one task. Do not expose a bot-wide list to a user without checking access.
Cancel reminder¶
Cancels one previously created reminder.
- Supply its ID from the creation result or reminder list.
- Use the operation result to confirm cancellation. A message ID is not a reminder ID.
Cancel all reminders¶
Cancels pending reminders in the current run's context.
- With an event author, it cancels that user's reminders; without an author, the source chat's reminders. With neither, it affects all the bot's reminders.
- This is a bulk cancellation: check context and ask for confirmation. Use Cancel reminder with an ID for one task.