Issue with
Edit Fields
node and JSON structure in HTTP Request
(payload expects object)
Hi n8n community
I’m building a workflow to upload multiple PDF documents into a vector database using Qdrant. My flow is as follows:
- Read PDFs from disk
- Extract text
- Generate embeddings
- Use
Edit Fields
to build the structure{ id, vector, payload }
- Send a POST request to Qdrant via an
HTTP Request
node
The problem
The issue occurs in the Edit Fields
and/or HTTP Request
node.
The payload
field expects an object, but it throws an error like:
rust
CopiarEditar
'payload' expects an object but got '{ "nombre_documento": "{{ $json["text"].slice(0,50) }}", "contenido": "{{ $json["text"] }}" }'
I tried using JSON.stringify
and other expressions but still got the same issue.
What I need help with
What is the correct way to structure the payload
field as a valid JSON object so that the HTTP Request
sends it correctly to Qdrant?
Versions
- n8n:
1.90.2
- Qdrant:
v1.7.0
(self-hosted)
Screenshots
Optional: Sample Workflow
Thanks in advance for your help!