Postgres Chat Memory Node Issue After Update to 1.66.0

Hi everyone,

After updating n8n from version 1.5x to 1.66.0, I’ve encountered an issue with the Postgres Chat Memory node in my workflow. I haven’t made any changes to the workflow itself, so it seems clear that the update introduced the problem.

Here’s what’s happening:

  1. I get the following error:

“connect ‘Postgres Chat Memory’ to ‘Webhook’”
It seems to be related to the Session ID expression (
{{ $node[“Webhook”].json[“body”][‘DIALOG_ID’] }} ).

  1. What’s strange is that when I test the workflow using pinned input data from the webhook, and I test the workflow node-by-node, the workflow runs perfectly. However, when the same data is passed directly via the webhook during an actual execution, the workflow fails every time with the above error.

  2. As a temporary workaround, I replaced the Postgres Chat Memory node with the Window Buffer Memory node, using the same Session ID expression, and everything works fine.

This suggests there might have been a breaking change in the Postgres Chat Memory node behavior with the recent update.

Does anyone have insights into what might have changed in version 1.66.0, or how I can resolve this issue?

Thanks in advance for your help!

Here you have the workflow:

The failure:

Information on my n8n setup

  • n8n version: 1.66.0
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system: Windows 11

Hey @szatzger,

That is odd, Out of interest what happens if you set the expression to use $('Webhook').first().json.body.DIALOG_ID as the expression value instead?

Hi Jon,

Thank you so much for taking the time to help me personally. The expression you suggested worked perfectly, though I still don’t fully understand why it does. :slight_smile:

I really appreciate your support!

Best regards,
Akos

1 Like

Hi @Jon ,

Thanks again for your help earlier!

Unfortunately, I’ve noticed another issue after the recent update. Tools connected to an Agent that rely on data from the Postgres node, which should be passed through the Workflow Tool, are no longer working since the update.

I’ve tried using the expression you suggested earlier, but sadly it doesn’t work in this case.

I’m attaching a screenshot of the error message from one of the workflows for reference. The expressions appear to be correct, but the workflow still fails with an error.

Do you have any idea what might have gone wrong, or how I can fix this?

Thanks in advance for your help!

Best regards,
szatzger

it looks to be the same thing, What is the error when you update the syntax?

Hi @Jon

Thank you for your response!

I’m experiencing issues with two nodes after the update: Webscrape and CRM Summary. I’ve highlighted these nodes in red squares in the attached workflow for easier reference. While I’ve tried to adjust the workflow, I may have set up the value expressions incorrectly.

Here are the specific issues I’m encountering:

  1. Webscrape Node:
  • The extra workflow inputs are not being passed to the called workflow.
  • Could you clarify the correct syntax I should use in the Workflow Tool to ensure all inputs are correctly passed to the called workflow?
  1. CRM Summary Node:
  • I get the following error:

“The connection cannot be established, this usually occurs due to an incorrect host (domain) value.”

  • Do you have any idea what might cause this, and how to ensure the connection is set up correctly?

I would greatly appreciate any guidance on the correct syntax or setup for those nodes.

Thank you so much for your help!

Best regards,
szatzger

Hi Jon,

I went through all the expressions and realized I needed to update the parameters in the Workflow Tool node to this format:

{{ $('Postgres').item.json.language }}

However, in the Postgres Chat Memory node, I had to use the same expression without curly braces:

$('Webhook').first().json.body.DIALOG_ID 

I’m not entirely sure why the system behaves this way, but the important thing is that everything is now working. (I’m never updating again. :slight_smile: )

Thank you so much for your help!

Best regards,
szatzger

1 Like

Hey @szatzger,

That is fantastic news, The .item format will use the paired / linked item and the .first() will always use the first item. The Postgres chat memory node should need the curly braces as well so that it can resolve the expression and won’t just use the string so it might be worth adding that in.

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