Sanitized JSON Insert into Postgres

I’m trying to insert a JSONB into my database, which works correctly with the syntax below. However when I try to use the sanitized syntax using $1 it returns error invalid JSON:

image

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:

hello @Nicole_Reiter

How did the sanitized syntax look?

Like this:


Also the toggle “replace empty strings with NULL” was not working as expected

I suppose you can’t use type definitions ( :: ) in the Query Parameters.

Try to set them on the variables instead, e.g. $10::TIMESTAMPZ

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