How to route sessionID to a Postgres Chat Memory node?

I have two AI agents chained together, both using Postgres Chat Memory nodes.

The first AI agent executes perfectly, since it gets its SessionID from the chat trigger node right before it. But it doesn’t pass this SessionID onto the next agent, so that agent’s Postgres Chat Memory node gives me an error “No session ID found.”

I tried routing the session ID from the trigger node into the chat memory node through a Set node, but the Postgres Chat Memory node doesn’t accept input from the Set node.

I’ve been able to solve this with json, but is there a way to solve it without manually writing code?

1 Like

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 @xeroxelf,

Welcome to the community :tada:

To better understand your current setup, could you share your workflow? What’s your current workaround > “I’ve been able to solve this with json, but is there a way to solve it without manually writing code?”?

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


Also, have you tried using the ‘Take from previous node automatically’ option?
CleanShot 2024-10-08 at 13.20.05

1 Like

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