Using Supabase as Chat Memory

I’ve spent a few hours banging my head against the (lack of) documentation, so I thought I’d share.

Your supabase table needs two columns: message and session_id (note the underscore). I went ahead and left the auto-id and createdAt columns.

Add a “Postgres Chat Memory” node to your AI Agent

To set up your credentials,

  1. go to your project in supabase, and click the “connect” button at the top.

  2. go to the Connection String tab

  3. scroll down to “Session Pooler” > click View parameters

  4. copy the host directly to your n8n connection window (no protocol or port)

  5. copy the database to your connection (usually postgres)

  6. copy the user to your connection

  7. enter your db pwd in the connection window (if you don’t remember that, there’s a link right under the session pooler section you were just copying from)

  8. test your connection, it should be green.

    then you can go post on this issue :confused:
    No Explanation For Error - #2 by mk_n8n