---
title: "Flow Nodes"
id: "1831"
type: "page"
slug: "nodes"
published_at: "2026-09-20T23:47:10+00:00"
modified_at: "2026-10-22T16:38:23+00:00"
url: "https://xedant.com/agents/chatbot/docs/nodes/"
markdown_url: "https://xedant.com/agents/chatbot/docs/nodes.md"
excerpt: "The dialog scenario consists of steps — nodes. Each node does something: shows a message,…"
---

# Flow Nodes

[https://xedant.com/agents/chatbot/docs/nodes/.md](https://xedant.com/agents/chatbot/docs/nodes/.md)

The dialog scenario consists of steps — nodes. Each node does something: shows a message, asks a question, checks a condition, calls AI or hands the conversation to a human. Nodes are connected by arrow transitions, and each decides for itself where to go next: straight ahead, by outcome (“ok” or “no”) or by each button separately.

There are 18 node types in total. A node’s menu changes with its type, and right on the canvas you immediately see how it will look.

## Messages

- **Message** — text to the client with variable substitution and buttons. If there is too much text, it splits into several messages by itself, along line boundaries. You can attach a picture or a file — then the text becomes its caption.
- **Media** — a picture, video or document from the bot’s media library (or a link to a file on the internet). Handy for showing a product, a diagram, a price list or instructions.

## Input and logic

- **Input** — a question to the client with answer validation and a retry count. The answer is saved into a variable. If validation fails several times in a row, the conversation goes down the “exceeded” branch — for example, to an operator. Ready-made validators exist: phone, email, number.
- **Condition** — checks a variable with “yes” and “no” branches. The “no” branch is mandatory: the dialog must always know where to go if the condition did not hold.
- **Set variables** — writes a value into a dialog variable. The value can be text, a number or another variable — useful for remembering the client’s choice and coming back to it later.
- **Jump** — a transition to another node or into another flow. Useful for not repeating the same piece of scenario twice.
- **Random** — a different reaction to the same answer. Each branch can have a weight: the higher it is, the more often the branch is chosen.
- **Delay** — wait before continuing (for example, ten minutes or until tomorrow morning). The delay survives a server restart, and if the client writes earlier, the delay is cancelled and the conversation goes the usual way.
- **Stop** — ends the dialog, optionally with a farewell message. A new message from the same person starts the conversation anew.
- **Note** — a memo on the canvas. It takes no part in the dialog; it is there so you do not forget what was intended here.

## AI

- **AI chat** — the model’s answer in free form. You can “ground” the answer on documents: then AI answers only from your knowledge base and attaches sources, and if there is no answer in the base it goes down the “no answer” branch instead of inventing one. There is a fallback too: if the first answer fails, a model from the fallback list replies.
- **AI task** — pull the data you need out of the client’s reply and lay it out into variables. You define the fields (name, phone, city), their type and whether they are required — AI returns ready values, not free text.
- **AI agent** — a model with a set of tools and instructions for a specific task. The agent itself decides when to send a message, search the knowledge base, change a variable, jump to another node or call an operator. This makes the conversation more flexible, while you set the frame and the limits.

## Data and external systems

- **KB search** — find a matching piece in your documents. The “no answer” branch is mandatory here: you always decide what happens when nothing was found.
- **HTTP request** — call an external system: your CRM, warehouse, delivery service. The response can be spread across variables, and branches set by response code (success, client error, server error, rate limit exceeded).
- **Script** — run your own Python script: calculate, check an order, reach somewhere a plain request cannot. Details in the [Scripts](/agents/chatbot/docs/scripts) section.

## Operator

- **Handoff** — call a human. The bot falls silent, and the conversation reaches the operator with a short summary and the last few replies — the operator does not need to re-read everything from the beginning. A notification with a link to the conversation is also sent to the service Telegram chat.
- **Notify admin** — send a message to you, not the client: about a new lead, an unusual case, an order total. The message arrives in the service chat.

## Special flows

Besides the main scenario there are three special flows — short “what to do if” scripts. They are defined once and work for the whole bot:

- **the error flow** — runs when unrecognized or unexpected input arrives. Usually a polite “didn’t get that” and a menu button.
- **the timeout flow** — runs when the client is silent for too long (half an hour, say). Once per conversation.
- **the end flow** — what to do when the conversation closes: say goodbye, ask for a rating, tag the client.

## What starts a dialog

- **the first incoming message** — the usual conversation start; the “/start” command starts everything anew, with clean variables;
- **commands** — short slash-prefixed words like “/start”;
- **whole keywords** — when the message exactly matches a word from the list (case-insensitive);
- **links with data** — following a link like “/start booking”: the conversation starts at the right node, and the passed data lands in variables (convenient for ads from different platforms);
- **schedules** — running a scenario by days of the week and time;
- **incoming web requests** — an external system sends data to an address with a secret, and the scenario starts (a website lead, for example);
- **join requests** — if the bot administers a group, a join request can be answered with a greeting.

## Variables and substitution

In any text and in any AI request you can substitute a variable’s value: the name is written in double curly braces. Conversation variables come first (they can be nested — then the name is written with dots), then the system ones: first name, last name, username, chat id, language and the client’s message text.

If a value is empty, the substitution is removed neatly. For example, the text “Hello, {{first_name}}!” for a guest without a name turns into just “Hello!” — no dangling comma, no extra spaces.

How to answer from documents and what to do about gaps in knowledge — in the [Knowledge Base](/agents/chatbot/docs/knowledge)
 section. How models and conversation rules are configured — in [Models & Prompts](/agents/chatbot/docs/models)
. Assembling nodes into a dialog is helped by the [Flow Studio](/agents/chatbot/docs/studio)
.

[← Back to the documentation index](/agents/chatbot/docs)
