Questions about Chatbot + SQL strucutre

I checked everywhere and didn’t find answers.

Describe the problem/error/question

I don’t know how to realize my idea, have you got an idea or an exemple ?

I’d like to have a chatbot that:

  • Access 2 PostgreSQL tables
  • Can modify one of them (Add or Modify)
  • Scalable to 1.6k persons (not at same time)
  • The business application is: shop managers are not giving informations to HQ about their future plans, it would be too time consuming. Everything is in their head. Thus giving them a chatbot to talk will make things possible. They talk => chatbot update database about future business state.
    I am connected to chatGPT4o and Supabase (for Postgre)

I have tried:

  • AI agent SQL but I can’t figure out how it works nor a source to show me
  • AI agent with 3 Postgre tools: consultDB1, consultDB2, modifyDB2
    - It struggles to modify correctly DB2 thus in don’t want to add a 4’th tool to add records
  • AI agent with 3 Postgre modules: consultDB1, consultDB2, modifyDB2
    - I didn’t succeed to get standard results out of the agent to trigger modules and then come back to chat

I am beginner, followed lessons and doing this as a proof of value only, thus no need for voice API now, just update the database.

What would you do ? have you got examples ?

Please share your workflow

I have tried/deleted to much and didn’t save it.

Information on your n8n setup

  • n8n version: 1.67.1.
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Pas trouvé donc je dirais “own”
  • Running n8n via: cloud
  • Operating system: windows10 home

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:

Hi @Garry_Jakubiak

Thanks for posting here and welcome to the community! :tada:

If you want the agent to have access to two tables you are probably better off using the Tool Agent and then do the right kind of prompt engineering to determine when to use which table and how.

Can you share which issues you’ve been having with that? It could just be a matter of getting the correct inputs.