Passing an Array of Values to HTTP Request Node in n8n as an Expression
Hey, I'm working in n8n and trying to pass an array of values to the JSON body of the HTTP Request node, but I keep getting a comma-separated string instead of an actual array.
I managed to fix it by adding square brackets and using .map() to wrap each item in quotes:
"keywords": [{{ $json.output.keywords.map(k => `"${k}"`) }}]
It works, but I'm wondering — is there a simpler or more elegant way to achieve this?
1
8 comments
Damian Dąbrowski
3
Passing an Array of Values to HTTP Request Node in n8n as an Expression
Snappy Community
skool.com/snappy
Faster than vibe coding. Private AI tools to ship real systems while others prompt. We build businesses, not demos.
Leaderboard (30-day)
Powered by