Hi n8n community! ![]()
I’m building a custom node and running into a frustrating issue with expressions inside collection fields not being evaluated properly.
The Problem
When I have a collection field like this:
{
displayName: "Basic Information",
name: "updateBasicGroup",
type: "collection",
options: [
{
displayName: "Description",
name: "description",
type: "string",
default: "",
}
]
}
And users enter expressions like {{ Date.now() }} in the Description field (using fx mode), the expression doesn’t get evaluated. Instead, the literal string "{{ Date.now() }}" gets passed to my routing logic.
What I’ve Tried
- Standard routing body:
body: { description: "={{$parameter.updateBasicGroup?.description}}" }- expressions stay as literal strings - Complex Object.assign expressions: Still doesn’t evaluate collection field expressions
- routing.send approach:
send: { type: "body", property: "updateBasicGroup.description" }- this works but only sends one field (I need multiple fields in the request)
Current Workaround
The only solution I found is moving fields out of collections:
// This works - expressions evaluate properly
{
displayName: "Description",
name: "description",
type: "string",
displayOptions: { show: { operation: ["update"] } }
}
// Routing
routing: {
request: {
body: { description: "={{$parameter.description}}" }
}
}
Questions
- Is this a known limitation that expressions in collection fields don’t evaluate?
- Are there any workarounds to make expressions work inside collections?
- What’s the recommended pattern for custom nodes that need multiple optional fields with expression support?
Moving every field out of collections defeats the purpose of having organized, collapsible field groups and especially for my case, where I also have an update node with lots of parameters, would not really work. Any guidance would be greatly appreciated!
Environment:
- n8n version: 1.111.0
- Custom node with TypeScript
- Using routing configuration
Thanks in advance! ![]()
