How to organize a registration dialogue&

Describe the problem/error/question

Hi there, I need organize the particular flow:

  1. user sends /start command to my telegram bot
  2. n8n responds with “Please provide your city, or something else” and must remember the context THAT FROM NOW WE WAIT FOR THIS PERSONAL INFO - this is the main issue
  3. user send it’s city - for Example London
  4. n8n retrieves context, understands that it is waiting the city name. Then it get city name and query me backend to register user

so the main issue is how to keep context and distinguish the regular messages (I already have this flow to respond to user via open ai agent) from cases when it exactly waits for city from the user input

Please share your workflow

Information on your n8n setup

  • n8n version: 1.74.4
  • Running n8n via ( n8n cloud:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

why not keep a database or google sheet with entries for each person, and the information still needed for them?

We’ve created a new category for help with designing workflows, and I’ve moved your question there: Help me Build my Workflow. Find out how this category works by reading this topic.

Hi! Thank you! What is the best choice of database you would recommend? I guess that google sheet has a high io time.
Maybe there are some in memory caches (like redis or memcached) from scratch. It’s worth to mention that this database call will arise on every telegram message

Depends on your needs/setup. If you’re on n8n cloud and you are going to receive massive amounts of messages 3k+ a day, it might be a good idea to look at self hosting as the execution cost can increase a lot.

If you’re only receiving a modest mount of messages and are on cloud I like supabase.

The other advantage of self host is you can host a Postgres DB locally. And yes if you wanted to add a caching layer like redis that is possible.

This would probably be most easily completed with a docker compose file.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.