If n8n Gmail Trigger attachments are missing, inspect the trigger’s Binary output before changing the next node. Check Simplify and Download Attachments in your installed version, then match the actual binary property name to the receiving node. If the file disappears later, trace the first node that stops passing it through.
This guide helps small teams diagnose invoice and document intake without guessing whether a filename, message ID or file payload is missing. Examples are illustrative, and the acceptance worksheet contains proposed checks rather than results from a tested n8n installation.
Where does the attachment disappear?
Start with one email and one harmless test PDF that you control. Use a workflow copy with customer replies, accounting writes and other consequential actions disabled. Record the mailbox, message ID, n8n version and relevant node versions.
Inspect the trigger’s output, then the input immediately before the failing node. A subject line and filename can look convincing while the file itself is absent. Diagnose retrieval, transport and extraction as separate stages.
| Observed evidence | Investigate first | Do not assume |
|---|---|---|
| No execution for the test email | Publishing, polling and message filters | The PDF extraction node is responsible |
| Message metadata appears, but no Binary output | Simplify and attachment download settings | A filename means the file was downloaded |
| Binary exists at intake, but not before upload | The intervening transformations | Gmail authentication must be broken |
| Binary exists under a different key | The destination’s input field name | Every node uses the name data |
| The correct file reaches the extractor, but text is empty | Document content and extraction capability | The attachment was never received |
If no execution starts, use our separate Gmail Trigger production troubleshooting guide. This article starts where an email arrives but its attachment does not reach the intended destination.
Which Gmail Trigger settings should you check?
The Gmail Trigger reference explains that Simplify is enabled by default and returns message IDs, labels and headers. That simplified metadata should not be mistaken for a downloaded file.
In the current official Gmail Trigger source reviewed for this guide, attachment options are hidden while Simplify is enabled. Download Attachments defaults to off. The attachment prefix defaults to attachment_, followed by an index starting at zero. These controls can differ across installed releases; compare your node’s actual settings.
- Open the Gmail Trigger in the controlled workflow copy.
- Turn Simplify off if it hides the attachment options in your version.
- Under Options, enable Download Attachments.
- Check the Attachment Prefix rather than assuming its value.
- Run a controlled test and inspect the actual Binary properties returned.
For a prefix of attachment_, the first file may be exposed as attachment_0. Use the observed result, particularly when a message includes several files or inline images. If production is the target, publish the intended configuration and test a fresh matching email there too.
What if the workflow starts with a Gmail Get Message node?
Fetching a message is different from starting with a trigger. n8n’s Gmail message operations reference describes Message → Get, its Message ID parameter and its Simplify option. Inspect that node’s output and available attachment settings instead of copying trigger instructions blindly.
When retrieving a specific message, map the actual message ID from the intended mailbox. Do not substitute the subject or assume a conversation ID identifies the same resource. Confirm that you retrieved the right email before investigating its files.
For a custom Gmail API implementation, Google provides a separate attachment retrieval method requiring the message ID and attachment ID. A reference to an attachment is not itself its downloaded bytes. Prefer the supported node configuration when it meets your needs; adding raw API calls introduces more mapping and authentication work.
Why does the next node say binary field data is missing?
A common mismatch is straightforward: the file exists under attachment_0, while the next node expects data. Inspect the binary property names on the receiving node’s input, then configure that node to read the correct one.
The Extract From File reference defines Input Binary Field as the name of the field containing the binary file; its default is data. For a PDF actually stored under attachment_0, select the appropriate PDF operation and enter attachment_0 as that field name.
That is a property name, not a filename such as invoice.pdf, a message ID or an object containing the entire binary payload. For other destination nodes, read their own parameter description. Renaming a field elsewhere will not help unless the downstream mapping also agrees.
How do you handle several attachments without dropping files?
Define which files the business process accepts before designing the loop. A fictional invoice mailbox might receive one invoice, an explanatory image and a signature logo in the same message. Selecting the first binary property without inspecting it can send the wrong file to extraction.
n8n’s Split Out reference includes support for binary inputs and an Include Binary option. Use the documentation for your installed version to configure the split, then inspect the resulting items. Confirm the output’s actual file key before mapping the next node.
Keep the message ID and an attachment identifier or other appropriate file identity alongside each item. Two files called invoice.pdf are not necessarily the same attachment. Count the accepted files and destination records so a successful workflow status does not hide a skipped second document.
If a later transformation creates new items, verify that those items retain the required binary data and message context. Compare immediately before and after that transformation. Do not infer retention simply because the JSON fields look correct.
What if the PDF arrives but extraction is empty?
First establish that the receiving node has the intended file under the configured key. Then inspect the document using an approved viewer. A PDF made from scanned pages can need OCR, whereas a text-bearing PDF may support direct text extraction. Password protection, corruption and unsupported content can require a separate handling path.
Do not treat an empty extraction as a valid invoice. Route missing required fields to review before creating payments, changing records or sending a reply. Preserve the original file in approved storage long enough for an authorized reviewer to investigate.
n8n’s file-handling overview distinguishes file-processing nodes and points to binary storage configuration for self-hosted deployments. If the execution reports a file-not-found or storage error, retain that exact redacted error and investigate storage separately from field mapping.
How should you test and secure attachment intake?
Use this original acceptance worksheet with files you control. The intended results are checks to complete, not claims that this workflow has passed them.
| Controlled case | Check | Evidence |
|---|---|---|
| One ordinary PDF | Correct file reaches the destination | Message ID, binary key and destination record |
| Two allowed attachments | Both are evaluated; neither is silently lost | Accepted count and per-file result |
| PDF plus signature image | The selection rule chooses intended documents | Selected file identity and reason |
| Message with no attachment | Explicit no-file route | Review or skip decision |
| Scanned or protected PDF | Empty or failed extraction triggers review | Extraction result and review state |
| Same message processed again | No unintended second destination action | File/action identity and completion record |
Treat incoming documents as untrusted data. Restrict accepted types and sizes, avoid executing embedded content and limit who can retrieve stored files. Do not upload confidential customer attachments to public scanning services without authorization.
If an AI step reads the extracted text, keep its action permissions separate from instructions found inside the document. Use our AI automation security checklist for access and recovery controls. For repeated intake, see our guide to Gmail Trigger duplicate processing before replaying a backlog.
Frequently asked questions
Is attachment_0 the filename?
No. It is an example binary property name. The file can have a separate filename, and your configured prefix or node output may use a different property name.
Should I reconnect Gmail when a binary field is missing?
Start with output and mapping checks when the message was retrieved successfully. Investigate authorization when the actual credential-dependent operation returns an access error, rather than reconnecting as a default fix.
Does downloading an attachment automatically extract its text?
No. Retrieving the file and extracting usable content are separate stages. Inspect and validate each stage before allowing the result to drive a business action.
About this guide: Prepared by Junaid S. for Upstanding Hackers, reviewed 4 December 2026 against linked n8n and Google sources. Examples are illustrative; no installation-specific testing claim is made. See our editorial policy.
