Helllo, Here’s exactly how to build this in n8n step by step.
-You don’t need to ask the user for their Telegram User ID, it’s already available automatically in every message via:
{{ $json.message.from.id }}
So you only need to collect 3 fields: First name, Last name, and Patronymic.
Each Telegram message triggers a fresh workflow execution, so n8n doesn’t remember what step the user was on. You need to store the conversation state somewhere external like Supabase / PostgreSQL and connect that to your agent bot.
Workflow Logic :
Telegram Trigger
↓
Lookup user state from DB (by Telegram ID)
↓
Switch node (based on step field)
step = 0 (new) → Send: “What is your first name?”
step = 1 Save first name → Send: "What is your last name?
step = 2 Save last name → Send: "What is your patronymic?
step = 3 Save patronymic + finalize record → Send: Thank you!
Nodes You’ll Need
Telegram Trigger — fires on every incoming message
And so if this is a industry grade automation, then add a text classifier which will validate the information and will output either Good or Bad , if bad the agent would ask all of those again in case of any mis information, and then just move forward, although using the n8n form is a very straight away approach without much effort, let me know what helps you.