Error in sub-node Postgres, please help

After the agent, the memory node gives an error. It should receive the session ID, thanks to which it analyzes the correspondence with a specific user to form a response and record this response. I am sure that I correctly pass the session ID Key to the string, but no matter what I do, the error still pops up. I tried to solve the problem with AI, but without success. Please help.
Here is a link to download my workflow, the code doesn’t fit in this post workflow — Яндекс Диск

error name - Error in sub-node Postgres
Chat Memory"
Got unexpected type: undefined

Information on your n8n setup

  • n8n version: 1.95.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): browser
  • Operating system: windows 10
![2025-06-19_15-28-17|690x290](upload://n9ZBj33uv4gJ3UkewEe4Mjirkyg.png)
![2025-06-19_15-28-33|690x343](upload://5h9GLucDBB399ez5OyUQwJrh7gI.png)
![2025-06-19_15-46-44|689x174](upload://60OcjUtY43uyF6bb4EFFKAbmLnK.png)

For security and safety reasons, please avoid sharing external download links. You can select only the nodes surrounding your ai agent and paste those in the code block to reduce the size limitation