The error indicates that the Extract From File node cannot find the binary field attachment_0 in its input item.
Since attachment_0 is visible in the Binary tab, I would suggest the following checks:
Re-execute the previous Split Out2 node and inspect its output.
Confirm that the item passed to Extract From File2 contains the binary property attachment_0.
Make sure the Input Binary Field value matches the actual binary property name exactly.
If the binary data is missing after the Split Out node, check the Split Out configuration to ensure the attachment data is preserved.
If the issue persists, could you share the output of Split Out2 in JSON and Binary views? That would help identify where the binary field is being lost.
If you look at my workflow, you can see that the “Extract from File” node already receives a PDF file as input from its previous node.
However, what I don’t quite understand is why I need to additionally specify the “Input Binary Field” field in the “Extract from File” node, even though the PDF file is already being passed.
Can someone explain to me why this field is required and what value I need to enter there?
Hi @Tanushree1! The PDF is passed to the node as binary data. An item can contain more than one file, so Input Binary Field tells Extract From File which file to read.
In your screenshot, the binary field is named attachment_0, so that’s the value to enter. I can also see why this is confusing: the file appears in the input, but the error says the field is missing.
Could you clear Input Binary Field, type attachment_0 again without any spaces, and execute the node once more? If it still fails, please share a fresh screenshot of the input and error after that run.
That error just means the item reaching Extract From File has no file attached under the name attachment_0 — the node reads file bytes from binary data, not from the JSON fields, so the Input Binary Field tells it which binary property to read.
Quick way to pin it down: open the node just before Extract From File and check its output — switch to the binary view and see if attachment_0 is actually there. If it’s missing, the file got lost one step earlier (often at the Split Out step), so re-run that node and check again before Extract runs. If the binary property is there but under a different name, copy that exact name into Input Binary Field.
Once the item going into Extract actually carries the file, the error should clear.
Thanks for checking that — that rules out a typo in the field name, so the next check is what Extract from File itself actually receives, rather than what Split Out shows.
Open the Extract from File node and look at its own input panel, on the binary tab. That shows the exact item going into the node, which can differ from Split Out’s displayed output if that output is pinned or from an older run.
If attachment_0 is missing from Extract’s input, the file is getting lost at the Split Out step — Split Out splits the JSON items, and the binary file doesn’t always travel with each split item. As a test, connect the node before Split Out straight into Extract and run it: if that works, Split Out is where the file is lost, and the file path needs to reach Extract unsplit.
If attachment_0 IS there in Extract’s input and it still errors, clear any pinned data on both nodes and re-execute the full workflow from the start — a stale pinned output is the usual culprit then. If it’s still failing after that, a screenshot of Extract’s own input panel would pin it down.
Quick pin: Split Out often keeps JSON but drops binary. Open Extract From File → Input panel → Binary tab. If attachment_0 is missing there (even when Split Out showed it), the file was lost at the split.
Test: connect the node before Split Out straight into Extract, set Input Binary Field to exactly attachment_0 (no spaces), clear pinned data, re-run from the start. If that works, either skip splitting the binary item, or Aggregate/Merge so each item that reaches Extract still carries the PDF.
Once extraction works: Gmail label → PDF only → extract → validate totals → Sheets (or your DB) + Slack on fails is a solid invoice path. I packaged that pattern as an importable workflow if useful: n8n Workflow: Gmail Invoice PDF → Google Sheets + Slack (early bird). Happy to answer follow-ups either way.
I want to automatically save all invoices that arrive in my email inbox as PDF files in my EcoDMS invoice archive.
Which node should I use for this in n8n? Is an HTTP Request node sufficient, or do I need a different node to transfer the PDF files correctly to EcoDMS?
I’ve already set up an HTTP Request node for logging in to EcoDMS. The login works, but I’m not yet sure exactly how to upload and archive the invoice PDFs afterwards.
Since I’m still a beginner with n8n, I would really appreciate your help and concrete tips on how to implement this.
@Tanushree1 an HTTP Request node is enough. There’s no built-in ecoDMS node, but its REST API takes the PDF as a normal multipart upload, so you can send the binary straight from your Gmail/IMAP step.
Upload node (HTTP Request):
Method: POST
URL:http://YOUR-ECODMS-HOST:8180/api/uploadFile/false (false = not a versioned document; use your own host and port)
Authentication: Generic Credential Type → Basic Auth, with the same ecoDMS user and password you use for your login call
Send Body: on
Body Content Type: Form-Data
Body parameter: Parameter Type n8n Binary File, Name file, Input Data Field Name attachment_0
ecoDMS answers with the new document ID (docID). Keep it, because you need it if you want to set classification fields later.
Things that usually trip people up:
Connect to the archive first. The API wants a GET http://YOUR-ECODMS-HOST:8180/api/connect/1 (1 = your archive ID) before anything else. If your login node already does that and the upload still returns 401/unauthorized, put Basic Auth on the upload node too rather than relying on the login node alone.
One PDF per item. If an email has several attachments, they arrive as attachment_0, attachment_1, … on one item. Only attachment_0 gets uploaded with the setup above. Add a Code node that turns each PDF into its own item with the same field name:
// Code node (Run Once for All Items): one item per PDF attachment, always named "file"
const out = [];
for (const item of $input.all()) {
for (const [key, bin] of Object.entries(item.binary || {})) {
if (bin.mimeType === 'application/pdf') {
out.push({ json: { ...item.json, sourceField: key }, binary: { file: bin } });
}
}
}
return out;
Then set the upload node’s Input Data Field Name to file. This also skips logos and signature images, which tend to arrive as attachments too.
3. Don’t upload twice. Mark the email as read or add a label after a successful upload, so the next poll doesn’t archive the same invoice again.
Optional, setting classification: ecoDMS fills the date fields itself. If you want folder, document type or status set automatically, call GET /api/documentInfo/{docID}, change the values in that JSON (it expects the IDs of folders and types, not their names), and send the whole object back with POST /api/classifyDocument. I’d get the plain upload working first and do this as a second step.