# Using Supabase as Chat Memory

**URL:** <https://community.n8n.io/t/using-supabase-as-chat-memory/185990>\
**Category:** Tips & Tricks\
**Created:** [September 10, 2025, 8:40pm UTC](https://community.n8n.io/t/using-supabase-as-chat-memory/185990 "2025-09-10T20:40:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![czm](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/czm/32/118781_2.png) [@czm](https://community.n8n.io/u/czm)\
**Post date:** [September 10, 2025, 8:40pm UTC](https://community.n8n.io/t/using-supabase-as-chat-memory/185990/1 "2025-09-10T20:40:02Z")

</div>

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.
