Getting invalid JSON, despite JSON being valid when i hard-code the output of the expression

Describe the problem/error/question

Please have a look at the image below.
When I run this node as is, I get a JSON error message in n8n. However, if I “hard-code” the output of the marked field, it works perfectly.

I’ve been banging my head against the wall trying to figure out what the issue is, but can’t figure it out. Any input would be highly appreciated!

What is the error message (if any)?

ERROR: JSON parameter need to be an valid JSON

Hi @E_S, welcome to the community!

I am sorry you are having trouble. Could you provide the information requested in the question template here on the forum?

Different n8n nodes validate JSON in different ways. So for a problem like this, it would be very helpful to have a workflow that can reproduce your problem, as well as knowing the version of n8n you’re currently running.