// guides · n8n error index

n8n Email Trigger attachments: fix attachment_0 and "none was found", 12 tests

Why n8n's Email Trigger (IMAP) attachments don't reach the next node: Download Attachments off, attachment_0 vs data, several files, unread rules, Command failed. Exact messages and fixes from 12 real runs on n8n 2.43.7.

Updated 2026-10-22 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. Turn on Download Attachments

    In the Email Trigger (IMAP) node, keep Format on Simple and switch on Download Attachments. It is off by default, and without it no file reaches the next node.

  2. Find the field name

    Run it once and open the output's Binary tab. The first file is attachment_0, the next attachment_1, unless you changed Property Prefix Name.

  3. Point the next node at it

    Set Input Binary Field (Extract from File, Write Files, Drive upload, HTTP Request) to attachment_0 instead of data.

  4. Split when there can be several files

    Emails can carry several files, or none, and several emails can arrive in one run. Use the Code node below to make one item per attachment under data.

  5. Re-test with an unread email

    The trigger only fetches unread emails and marks them read. Mark your test email unread again, or send a new one.

What we saw in 12 real runs

On 22 October 2026 we ran n8n 2.43.7 with the Email Trigger (IMAP) node, version 2.1, against our own IMAP server (Dovecot 2.4) and dropped test emails with CSV attachments into 8 folders, one workflow per folder. The next node was Extract from File (CSV). Each row is what n8n really did.

What we didWhat n8n showedFix
Email Trigger with Download Attachments off, then Extract from File (CSV) on dataThis operation expects the node's input data to contain a binary file 'data', but none was found [item 0]. The email item had no binary at all.Turn on Download Attachments in the Email Trigger. It is off by default and only shows when Format is Simple.
Download Attachments on, next node still reads dataThe item has no binary field 'data' [item 0]. The file was there, as attachment_0 (order2.csv).Set Input Binary Field in the next node to attachment_0. That run then extracted both CSV rows.
Next node set to attachment_0Worked: 2 rows per CSV.This is the setting most workflows need.
Email with two CSV files, next node on attachment_0Only the first file is read; the second sits in attachment_1.Split the attachments into one item each with the Code node below. Our run turned 1 email into 2 items and 4 CSV rows.
Email where a picture comes before the CSVattachment_0 was the picture (pic.png), the CSV was attachment_1.The number follows the order inside the email, not the file type. Split first, then filter on fileName.
Option Property Prefix Name set to file_The file came out as file_0, and a node on attachment_0 failed with The item has no binary field 'attachment_0' [item 0].Use the prefix you set plus the number: file_0.
Format Resolved instead of SimpleNo Download Attachments switch, but the file still came out as attachment_0 and the CSV extracted.Fine to use; the JSON layout changes (headers become an object), so check your later expressions.
Two new emails at once, one without an attachment, next node on dataOne execution with 2 items; the whole run failed on the first item.n8n can hand you several emails in one run. Split attachments with the Code node (an email with no file simply gives 0 items) or add an IF node.
Email with no attachment, next node on attachment_0...a binary file 'attachment_0', but none was found [item 0]Same fix: the Code split, or an IF that checks the email has a file.
An unread email that was already in the folder before we published the workflowNot picked up at activation, but it came in together with the next new email.Old unread mail can show up later. Mark it read first, or tighten Custom Email Rules, for example ["UNSEEN", ["SINCE", "22-Oct-2026"]].
An email that was already marked readNever triggered. After each run n8n also marked the new emails as read.The default rule is ["UNSEEN"] and Action is Mark as Read. To re-test, mark the email unread again.
Wrong password / SSL on a port without SSLPublishing failed with There was a problem activating the workflow: "Command failed", and with SSL on port 1143: ...SSL routines:tls_validate_record_header:wrong version number."Command failed" was our wrong password: check the user and app password. "wrong version number" means SSL/TLS is on but the port is plain IMAP: use 993 with SSL on, or turn SSL off.

Why it says attachment_0 and not data

Most file nodes in n8n (Extract from File, Write Files to Disk, Google Drive upload, HTTP Request with a file) read the binary field data by default. The Email Trigger (IMAP) node writes each attachment as attachment_0, attachment_1 and so on. So the default setup fails until you change one side. Two different messages tell you which case you are in:

Handle any number of attachments

This Code node turns each attachment into its own item with the file under data, so the next node works with its default settings. We ran it on an email with two CSV files (2 items out) and on one with none (0 items out, the run ends quietly):

// Code node, "Run Once for All Items": one item per attachment, each as binary 'data'
const out = [];
for (const item of $input.all()) {
  for (const key of Object.keys(item.binary ?? {})) {
    out.push({
      json: { fileName: item.binary[key].fileName, subject: item.json.subject },
      binary: { data: item.binary[key] },
    });
  }
}
return out;

To keep only some files, put an IF or Filter node after it on {{ $json.fileName }}, for example ends with .csv or .pdf. We did not run that filter step itself.

Good to know

What we didn't test

FAQ

Why does n8n say "binary file 'data', but none was found" after the Email Trigger (IMAP)?

Either Download Attachments is off (it is off by default) or the email had no attachment. In our test, turning Download Attachments on gave the file as attachment_0.

What is attachment_0 in n8n?

It is the binary field where the Email Trigger (IMAP) node puts the first attachment of an email; the second is attachment_1. Set the next node's Input Binary Field to attachment_0, or change the prefix with Property Prefix Name.

How do I process every attachment of an email in n8n?

Split them with a Code node that outputs one item per key in item.binary, each as binary 'data'. In our run one email with two CSV files became two items and every row was extracted.

Why doesn't my n8n Email Trigger fire for some emails?

By default it only fetches unread emails and marks them read after each run. In our tests an email that was already read never triggered, and an old unread one came in with the next new email.

What does "Command failed" mean when activating an n8n IMAP trigger?

In our test it was a wrong password: n8n could not log in to the IMAP server, so publishing the workflow failed. Check the user name and use an app password if your provider needs one.

Related guides

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.