This episode discusses file automation in n8n: handling files with S3, Google Drive, and FTP, manipulating documents, images, and CSV, as well as combining data pipelines with file transformations for complete report and media automation.

In episode 10 you linked workflows to databases: PostgreSQL, MySQL, MongoDB, and Redis, plus batch record processing and binary data management for uploads and downloads. Now we focus on one form of data that's often underappreciated yet everywhere: files.
This episode covers Working with Files, Documents & Media. We'll practice file handling automation with three popular storages — S3, Google Drive, and FTP — then manipulate CSV, documents, and images, and finally chain everything into a complete data pipeline with file transformations. By the end of this episode, your workflows can download, transform, and upload files automatically.
All file operations in n8n rest on one concept we already know from episodes 6 and 10: binary data. Every item can carry two keys — json for structured data and binary for file content.
When a node downloads or produces a file, the result is stored in the binary key along with metadata like fileName, mimeType, and size. Other nodes that need the file simply read that key. The entire file ecosystem in n8n — read, write, convert, upload — is an exchange of binary data between nodes.
{
"json": { "name": "laporan-bulanan.csv" },
"binary": {
"data": {
"fileName": "laporan-bulanan.csv",
"mimeType": "text/csv",
"data": "<base64>"
}
}
}With this understanding, all the file nodes below feel like variations of the same pattern: take binary from one node, transform in the middle, send to the next node.
File storage comes in three styles, all supported by native n8n nodes:
S3 node supports upload, download, list, and delete of bucket objects. Credentials are an Access Key and Secret Key, with region and bucket as operation parameters.FTP and SFTP nodes move files to internal servers, commonly used for file drops produced by legacy applications.FTP node (download laporan.zip)
-> Extract from File (unzip)
-> S3 node (upload file ke bucket)This pattern is very common in data migration: pull files from an old source, transform, then move to modern infrastructure. All three use centralized credentials, so switching environments is just a matter of switching profiles.
CSV is the simplest data exchange format — and the most frequently encountered. n8n provides the Extract from File node to read CSV into items and Convert to File to write items back into CSV.
name,email,orders
Budi,budi@example.com,12
Sari,sari@example.com,2
Dewi,dewi@example.com,7The typical flow: download CSV from S3 → Extract from File produces one item per row → transform with Set, Function, or IF filters → rewrite with Convert to File → upload the result. This is the pattern used to create periodic reports, sync data between teams, or process spreadsheet exports.
Cron (06:00) -> S3 download -> Extract CSV -> filter/transform
-> Convert to CSV -> Google Drive upload -> Slack notifyWith this combination, reports that were usually compiled manually can be produced automatically every morning.
Beyond CSV, n8n can manipulate documents and images through several approaches:
PDF node can convert text into PDFs and extract text from PDFs. Useful for creating automatic invoices or reading user-uploaded documents.Execute Command node, you can call CLI tools to resize, convert formats, or watermark images.magick input.png -resize 800x600 output.pngA real example: when a user uploads an avatar via webhook, the workflow shrinks it with ImageMagick, stores it in S3, then returns the URL via Respond to Webhook. You don't need a dedicated server for media processing — n8n handles it in a single workflow.
The real power comes when files and structured data complement each other. Let's chain everything into one complete pipeline:
Set and Function build aggregations, filter out irrelevant branches.Convert to File writes the results into CSV, then a PDF node composes an executive summary.SplitInBatches when there are thousands of rows.Info
The key to a healthy file pipeline is separating steps: one node one responsibility. Separate small nodes are easier to test, debug from the Executions tab, and modify without touching other parts.
The same pattern applies to many needs: bulk conversion from XLSX to CSV, product catalog watermarking, or creating ZIP archives from a set of documents. Once you master the binary data flow, creativity is the only limit.
Episode 11 closed the integration phase with comprehensive file skills: binary data as the universal language of files, handling automation with S3, Google Drive, and FTP, CSV as well as document and image manipulation, and chaining everything into data pipelines that turn raw data into share-ready reports and media.
Key takeaways:
binary key on items.Extract from File and Convert to File convert back and forth between CSV/JSON and items.In the next episode we move to the security side: security & credential management — storing sensitive credentials safely, managing environment variables and secrets, and best practices for locking down n8n's UI and API access. See you there!