Sending emails automatically from workflows is a common use case in n8n, but what if you need to include an attachment like a PDF, CSV file, or image? Whether you're generating reports, sending invoices, or sharing exported data, knowing how to send email with attachments in n8n can greatly enhance your automation workflows. In this step-by-step guide, we’ll show you how to build an n8n workflow that sends an email with one or more file attachments—without writing a single line of code.
Why Send Email With Attachments in n8n?
n8n is a flexible workflow automation tool that allows you to connect thousands of apps and services. One of its most helpful features is the ability to send dynamic emails through nodes like Send Email, Gmail, or Outlook.
Here are some real-world examples where sending attachments is essential:
- Automatically email weekly reports from Airtable or Google Sheets as CSV
- Send invoices generated from a database in PDF format
- Forward uploaded files from a form to clients
- Share daily logs or alerts from server monitoring tools
With that in mind, let’s go through how to send email with attachments in n8n with a full working example.
Prerequisites
Before you begin, make sure you have the following:
- A working instance of n8n (cloud or self-hosted)
- An email credential set up (SMTP, Gmail, or Outlook)
- A file to attach (from another node, input, or a static URL)
If you don’t have n8n installed yet, follow this install n8n on Windows guide or check our Docker setup tutorial to get started quickly.
Step-by-Step: How to Send Email With Attachments in n8n
Let’s build a sample workflow where we read a file from a public URL (for demonstration), attach it, and send it via email.
Step 1: Create a New Workflow
Open your n8n editor and create a new blank workflow. Give it a name like “Send Email With Attachment.”
Step 2: Add an HTTP Request Node (Optional File Fetch)
This node can fetch the file you want to attach if it’s available online.
- Node Name: Get File
- Method: GET
- URL: Paste any public file URL (e.g., a PDF or image)
- Response Format: File
Once you run this node, it should output binary data.
Step 3: Add the Email Node
From the node panel, drag in the “Email” node (or Gmail/Outlook depending on your setup).
Basic Settings:
- Resource: Send Email
- From Email: (your configured credential)
- To Email: Enter a valid recipient email
- Subject: Example with Attachment
- Text: See attachment.
Add Attachment:
- Under the Attachments section:
- Toggle “Add Attachment” to true
- In “Property Name,” type:
data(or whatever your binary field is named, usually shown inHTTP Requestoutput) - Keep “File Name” empty if you want to retain the original or provide a static one like
report.pdf
Tip: Make sure the “Binary Property” matches the key from the previous node's output. You can also verify this by expanding the node output and checking the binary field name.
Example Use Case: Sending Airtable CSV Data as Email Attachment
Here’s a common real-life automation scenario:
- Get records from Airtable
- Format them as CSV
- Attach and send via email
Nodes needed:
- Airtable node
- Spreadsheet File node (to convert JSON to CSV)
- Email node
This use case is also covered in our Airtable integration with n8n guide, where you can link dynamic data with actions like generating files or emails.
Common Attachment Formats n8n Supports
n8n can send various types of file attachments depending on your workflow. Here’s a quick overview:
| File Type | Use Case Example | Notes |
|---|---|---|
| Invoices, reports | Needs to be generated via external service or custom node | |
| CSV | Export of tabular data (e.g., from Airtable, Google Sheets) | Generated via Spreadsheet File node |
| Image (PNG, JPG) | Photo submissions, alerts | Can be fetched using HTTP node or uploaded directly |
| JSON | Raw API response logs | Can be attached as a debug file |
Tips for Sending Emails With Multiple Attachments
If you want to attach multiple files:
- Use multiple binary properties and set them in the Email node attachments section
- Alternatively, merge binary data using the
Mergenode (mode: Merge By Index) - Ensure filenames are unique to avoid blocking by email services
For complex multi-email workflows, check out the guide to create an email automation agent in n8n, which explains setting up loops, scheduling, and conditional logic.
Workflow Error Handling Tips
When sending attachments, things can sometimes go wrong—especially with file size limits or missing data. To handle issues gracefully:
- Set retry logic using the node’s
Settings - Add a conditional node to check if the file exists before sending
- Include a backup email notification if file fetch fails
Learn more on mastering error handling in n8n to make your flows more robust.
FAQ
How do I send multiple attachments in one email?
You can use the Email node's “Attachments” field to add multiple binary properties. Make sure each file has a unique property name and file name. You may use the Merge or Set node to organize this.
Can I send dynamically generated files like PDFs or CSV?
Yes. You can use nodes like Spreadsheet File to create CSVs or integrate with APIs like PDFMonkey to generate PDFs. Feed their output as binary data to the Email node.
What’s the file size limit for email attachments in n8n?
The limit depends on your email provider. For example, Gmail usually allows attachments up to 25MB. If your file exceeds this, consider using cloud storage and sharing a link instead.
Do I need credentials to send email from n8n?
Yes. Configure the Email node with SMTP details or use dedicated integrations like Gmail, Microsoft Outlook, or SendGrid. Without credentials, n8n cannot send outbound emails.
Why is my attachment not appearing in the email?
Double-check the binary field name and ensure the preceding node outputs binary data. If your property name doesn't match or the format is incorrect, the attachment will be skipped.
Sending attachments in n8n opens up massive potential for streamlining communication and workflows. Whether you’re automating reports, sending invoices, or sharing form data, this feature brings power and simplicity to your hands. Now that you've mastered how to send email with attachments in n8n, start building those smarter workflows today.
Copy-paste templates.
Beginner friendly.