Describe the problem/error/question
I’m trying to combine a static metadata output with each item in a list of text chunks generated from a PDF. I want to send the combined result to an OpenAI node for summarization.
- The metadata is a single object (OpenAI completion).
- The chunks are generated dynamically using a
Code
node. - I want each chunk to include the same metadata.
I’ve tried using a Merge
node with Multiplex mode, and also attempted to do this in a Code
node, but the metadata keeps showing up as undefined inside the OpenAI prompt node.
What is the error message (if any)?
No runtime errors, but metadata
is not appearing in the OpenAI node — it shows up red in expressions like {{ $json.metadata }}
even though it’s visible in the input of the previous node.
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version: Version 1.98.1
- Database (default: SQLite): none
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: windows 10