Hi guys, I’m new to n8n and I’ve used ChatGPT to create the following synopsis to ease diagnosis.
Describe the problem/error/question
Symptom: The Read CSV node reports Success but emits 0 items, so the next node never runs.
Upstream proof it’s a real file: The previous node outputs 8 items, each with binary data (filename input.csv, mime text/csv, sizes ~12–15.4 MB).
Flow (trimmed):
CKAN Meta → IF CKAN OK → CSV list → Download CSV (file) → Stamp CSV metadata (Function) → Read CSV → Filter PSV rows → …
What is the error message (if any)?
No error. Read CSV shows “Success (0 items)”.
Please share your workflow
Node settings (as in my export / editor):
-
Download CSV (HTTP Request)
-
responseFormat: file -
options.ignoreResponseCode: true(kept from original build)
-
-
Stamp CSV metadata (Function)
- Stamps
fileName(ends with.csv) andmimeType = text/csv, then forwards items.
- Stamps
-
Read CSV (node label “Read CSV”; Operation Extract From CSV)
-
Input Binary Field:
data -
Delimiter:
, -
Encoding:
UTF-8 -
Header Row: on
-
Include Empty Cells: on
-
-
Filter PSV rows (Function) follows Read CSV.
Share the output returned by the last node
-
When it fails (always): Read CSV → Success (0 items), so downstream nodes don’t run.
-
Upstream (always): 8 binary items present; each shows
File Name: input.csv,Mime Type: text/csv, size 12–15.4 MB.
What I’ve tried so far
-
Pinned Read CSV settings explicitly (binary field
data, delimiter,, UTF-8, header on). -
Manually opened the source files outside n8n (CSV with consistent headers).
-
Checked upstream output in n8n (binary present for all 8 items).
Hypotheses now (and what I plan to try; looking for best-practice advice)
-
Compression/encoding mismatch despite
.csv+text/csv:-
If the server returns gzip (magic bytes
1F 8B) or zip (PK) while named.csv, Read CSV would parse nothing and silently return 0. -
If the file is UTF-16 LE (common in some exports) but I set
UTF-8, parsing can fail.
-
Concrete checks I’m about to run:
-
Binary → Text probe
-
Add Move Binary Data (Binary to Text; binary=
data; encodingutf8) and inspect first 2 KB. -
If it’s gibberish or starts with
PK/\x1F\x8B, it’s compressed; if readable but shows odd nulls, tryutf16le.
-
-
If compressed: insert Compression → Decompress (gzip/zip) on
data, then feed the result into Read CSV. -
If UTF-16: set Read CSV → Encoding = utf16le, or convert to UTF-8 with Binary→Text (utf16le) then Text→Binary (utf8) before Read CSV.
-
Alternative reader: swap Read CSV → Spreadsheet File (Operation: Read from file, File format: CSV, Binary property:
data). In my experience this is more tolerant of BOM/CRLF.
Extra hardening I’ll add either way
-
In Download CSV, turn off
ignoreResponseCode(or gate with an IF onstatusCode <= 399; else throw). -
In Stamp CSV metadata, drop items without
binary.dataso the parser never gets empties:const out = []; for (const i of items) { const b = i.binary?.data; if (!b) continue; // only forward real files const fromUrl = (i.json.url || '').split('/').pop() || 'input.csv'; b.fileName = /\.csv$/i.test(fromUrl) ? fromUrl : `${fromUrl}.csv`; b.mimeType = 'text/csv'; out.push(i); } return out; -
Add a tiny guard after the CSV reader:
if (items.length === 0) throw new Error('CSV parsed 0 rows'); return items;
Information on your n8n setup
-
n8n version: n8n Cloud – Latest Beta (I’ve tried latest stable)
-
Database: Cloud-managed (default)
-
EXECUTIONS_PROCESS: default (
own,main) -
Running via: n8n Cloud
-
OS: n/a (Cloud)
Questions for the community
-
Is it expected that Read CSV returns Success (0 items) on compressed/UTF-16 input without error?
-
On Cloud, is Spreadsheet File → Read from file (CSV) preferred for robustness?
-
Any cleaner built-in way to auto-detect compression/encoding on file inputs before parsing?
If a minimal repro would help, I can post one.
Workflow section:
{
“nodes”: [
{
“parameters”: {
“url”: “https://ckan.publishing.service.gov.uk/api/3/action/package_show?id=traffic-commissioners-goods-and-public-service-vehicle-operator-licence-records”,
“jsonParameters”: true,
“options”: { “ignoreResponseCode”: true }
},
“id”: “6ab86082-dc06-442b-9c46-8878dc17df0e”,
“name”: “CKAN Meta”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 1,
“position”: [-224, 224]
},
{
“parameters”: {
“conditions”: {
“number”: [{ “value1”: “={{$json.statusCode}}”, “operation”: “smallerEqual”, “value2”: 399 }]
}
},
“id”: “5118ae30-9574-4794-b6d1-d98a4b79f5ed”,
“name”: “IF CKAN OK”,
“type”: “n8n-nodes-base.if”,
“typeVersion”: 1,
“position”: [-48, 224]
},
{
“parameters”: {
“functionCode”: “const res=items[0].json.result||{};const list=(res.resources||).filter(r=>/\.csv$/i.test(r.url||‘’));if(!list.length) throw new Error(‘No plain .csv resources found.’);return list.map(r=>({json:{url:r.url}}));”
},
“id”: “eceef7e2-d04a-45b7-b32c-37cb7f030231”,
“name”: “CSV list”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [144, 224]
},
{
“parameters”: {
“url”: “={{$json[“url”]}}”,
“responseFormat”: “file”,
“jsonParameters”: true,
“options”: { “fullResponse”: true, “ignoreResponseCode”: false }
},
“id”: “6d1a3027-b363-462d-bf1b-1081178776c5”,
“name”: “Download CSV”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 1,
“position”: [448, 224]
},
{
“parameters”: {
“functionCode”: “const out = ;\nfor (const i of items) {\n const b = i.binary?.data;\n if (!b) continue; // drop non-files\n const fromUrl = (i.json.url || ‘’).split(‘/’).pop() || ‘input.csv’;\n b.fileName = /\.csv$/i.test(fromUrl) ? fromUrl : ${fromUrl}.csv;\n b.mimeType = ‘text/csv’;\n out.push(i);\n}\nreturn out;\n”
},
“id”: “68de533d-78f8-48e3-abd8-2e76712e7ca1”,
“name”: “Stamp CSV metadata”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [640, 224]
},
{
“parameters”: {
“binaryPropertyName”: “data”,
“options”: {
“delimiter”: “,”,
“encoding”: “utf-8”,
“headerRow”: true,
“includeEmptyCells”: true
}
},
“id”: “e7b8c564-f4bb-4073-9f3a-9e5f1edc003e”,
“name”: “Read CSV”,
“type”: “n8n-nodes-base.extractFromFile”,
“typeVersion”: 1,
“position”: [864, 224]
}
],
“connections”: {
“CKAN Meta”: { “main”: [[{ “node”: “IF CKAN OK”, “type”: “main”, “index”: 0 }]] },
“IF CKAN OK”: { “main”: [[{ “node”: “CSV list”, “type”: “main”, “index”: 0 }]] },
“CSV list”: { “main”: [[{ “node”: “Download CSV”, “type”: “main”, “index”: 0 }]] },
“Download CSV”: { “main”: [[{ “node”: “Stamp CSV metadata”, “type”: “main”, “index”: 0 }]] },
“Stamp CSV metadata”: { “main”: [[{ “node”: “Read CSV”, “type”: “main”, “index”: 0 }]] },
“Read CSV”: { “main”: [] }
}
}

