Hi everyone,
I’m currently building a workflow in n8n to ingest documents from an S3 bucket, embed them using the Cohere multilingual embedding model (via AWS Bedrock), and store the resulting vectors in a vector database.
However, I’ve encountered an issue: the output format of the Data Loader node (e.g., when loading documents from S3) does not seem to match the required input format of the Cohere embedding model. Specifically, the Cohere model expects an input structure like:
{
"texts": ["Document text here"],
"input_type": "search_document"
}
But the Data Loader node outputs documents in a format like:
{
"pageContent": "...",
"metadata": { ... }
}
It seems that n8n doesn’t natively support reshaping the output of the Data Loader node to match Cohere’s expected input format. Has anyone found a clean way to transform the document structure within n8n so it can be used directly with Cohere’s Bedrock embedding endpoint?
Any guidance, tips, or node configurations would be appreciated!
Thanks in advance.
Information on your n8n setup
- **n8n version: 1.82.3 **
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker
- Operating system: win11