Learn how to build an efficient n8n workflow to handle bulk file uploads from a form, process binary data sequentially using an n8n loop, and save each file. Use this n8n template for advanced file management.
Download this n8n workflow template and start using it instantly.
This advanced n8n workflow addresses a common challenge in automation: efficiently handling multiple binary files submitted simultaneously via a single form event. When an n8n trigger receives multiple files, they are often grouped into a single array, which can complicate sequential operations.
This specific n8n template utilizes robust flow control techniques. It employs the Split Out Files n8n node to deconstruct the initial input item into individual items, followed by a custom loop (Loop Over Items). This n8n workflow demonstrates how to leverage the special {{$runIndex}} variable within the Read/Write File n8n node to correctly access dynamically named binary data fields (e.g., files0, files1), ensuring accurate saving and sequential processing for every uploaded file. This is a critical pattern for robust file management in n8n.
The n8n workflow executes through a five-step process designed for robust file splitting and looping:
Form - Load Multiple Files n8n trigger is submitted, capturing an array of files (configured here for JSON files).Split Out Files n8n node. This essential n8n node breaks the array into separate, individual items, ensuring that the required binary data is successfully carried forward for each file.Loop Over Items n8n node (configured as a Split in Batches of size 1). This guarantees strict sequential processing for every file item.Save Each File n8n node performs the write operation. A key configuration feature of this n8n node is the dynamic reference used for retrieving the binary data property: =files_{{$runIndex}}. The {{$runIndex}} variable provides the current loop count, enabling the n8n workflow to accurately retrieve and save the binary file associated with the specific item currently being processed.Continue Once n8n node (a No Operation node configured to run once). This step normalizes the output stream, ensuring only a single item continues downstream, regardless of the initial file count.To use this n8n template, follow these steps:
Form - Load Multiple Files n8n trigger node. Ensure the n8n workflow is active so the webhook URL is generated.Save Each File n8n node uses the local filesystem. Ensure your n8n environment has the necessary permissions to write files to the desired location. Form - Load Multiple Files (n8n Trigger):
Function: Starts the n8n workflow upon submission of a web form.
Key Configuration: Configured to accept multiple file inputs (files) and restricts input types to .json.
Split Out Files (n8n Node):
Function: Transforms the single incoming item containing an array of files into multiple separate items, enabling item-by-item processing.
Key Configuration: Field To Split Out is set to files; Include Binary Data is checked, which is essential for preserving file content.
Loop Over Items (n8n Node - Split In Batches):
Function: Manages the sequential execution flow, processing each file item one at a time.
Key Configuration: Acts as a crucial flow control mechanism in this n8n workflow.
Save Each File (n8n Node - Read/Write File):
Function: Saves the binary content of the current file item to the local file system.
Key Configuration: The Data Property Name is dynamically set to =files{{$runIndex}} to accurately retrieve the binary data corresponding to the current item's position in the loop. The File Name is set to out{{ $json.files.filename }}.
Continue Once (n8n Node - NoOp):
Function: This utility n8n node ensures that only a single data item continues down the n8n workflow path after the loop concludes, streamlining subsequent operations.
Key Configuration: Set to Execute Once.
Automate meeting note summarization and task extraction using an n8n workflow with AI (Anthropic/OpenAI) and Notion. Sync transcripts to Google Drive and manage tasks automatically.

Automate local document analysis using an n8n workflow leveraging local AI models like Ollama. This powerful n8n template extracts text, runs an AI Agent, and saves sophisticated reports directly to your disk.

Automate large document processing with this specialized n8n workflow. It uses SubworkflowAI to handle file splitting and polling, then utilizes the Google Gemini VLM for accurate OCR transcription.

Build an advanced multimodal Telegram chatbot using n8n that processes text, audio, images, videos, and various document types (PDF, CSV, HTML, XLSX). This n8n workflow uses PostgreSQL for state management and Gemini AI for intelligent analysis and chat memory.

Automate massive parallel processing of prompts using the Azure OpenAI Batch API. This n8n workflow template handles file upload, polling, and result parsing for high-throughput AI tasks.

Automate OCR document ingestion from Google Drive into a Pinecone vector database using an advanced n8n workflow. This n8n template handles complex Arabic text cleaning, metadata extraction, and OpenAI embeddings for building scalable RAG knowledge bases.








































