Large File Uploader for Kommo-AmoCRM with Automatic Chunking - n8n Workflow

Use this powerful n8n workflow to reliably upload large files to Kommo-AmoCRM by automatically splitting them into manageable chunks using advanced n8n node configurations and custom scripting.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • CRM administrators who frequently upload large media or document files that exceed standard API limits.

  • Technical teams requiring resilient file upload n8n templates for integration with Kommo-AmoCRM or similar services.

  • Developers learning how to implement advanced file handling and chunking logic within an n8n workflow using JavaScript code nodes.

Overview

Uploading very large files to CRM systems like Kommo-AmoCRM often fails due to API payload limits. This robust n8n workflow solves this critical issue by implementing automatic file chunking logic. When triggered, the n8n automation first checks the file size and then initiates an upload session. If the file is too large for a single upload, the custom JavaScript logic in the n8n node segments the file into smaller, acceptable parts. The workflow then iterates through these chunks, uploading them one by one, ensuring even the largest files are successfully processed and stored in your CRM. This n8n workflow saves significant manual effort and increases data reliability.

How it Works

This n8n workflow operates in several key stages to manage large file uploads:


  1. Trigger and Validation (input): The n8n workflow begins when externally triggered (using an Execute Workflow Trigger node), expecting a file input. The hasFile n8n node immediately checks if the necessary file data is present, stopping with an error if no file is found.

  2. Size Calculation: The file is converted to a standard n8n file object (Convert to File). A subsequent Code n8n node (getFileSizeInBytes) calculates the file's exact size in bytes.

  3. Session Creation: An HTTP Request n8n node (createSession) is executed to initialize the multi-part upload session with the Kommo-AmoCRM API.

  4. Error Check: The merged data (session details and file size) passes to the isGraterThenMax If n8n node. This checks if the file size exceeds a predefined maximum overall limit. If it does, the n8n trigger path fails (No free disk space).

  5. Chunking Logic: If the file is within the maximum limit, the Code n8n node (SplitFileToChunks) takes over, using custom JavaScript to physically segment the binary file data into smaller, manageable chunks. These parts are then converted back into n8n file objects (Convert parts to File).

  6. Looping and Upload: The Loop Over File Chunks n8n node (Split In Batches) iterates through every generated chunk. For each chunk, the getUrl n8n node prepares the specific upload endpoint URL, and the loadFile HTTP Request n8n node performs the actual chunk upload.

  7. Completion: Once all chunks are uploaded, the final result n8n node gathers and limits the output data, signaling the completion of this complex n8n workflow.

Installation Guide

To implement this n8n workflow, follow these steps:


  1. Import: Copy the provided JSON and import it directly into your n8n instance via the 'New' menu -> 'Import from JSON'. This creates the full file chunking n8n template.

  2. Credentials: You will need to configure the credentials for the HTTP Request n8n node (specifically createSession and loadFile) to authorize requests with your Kommo-AmoCRM account. This typically involves setting up a custom API key or OAuth authentication.

  3. Code Node Review: Review the JavaScript logic within the getFileSizeInBytes and SplitFileToChunks n8n node instances. Ensure the chunk size parameters and maximum file limits specified in these code blocks align with current Kommo-AmoCRM API documentation or your desired operational limits.

  4. Activation: Note that this particular n8n workflow is designed to be a sub-workflow, triggered by another main process (using the Execute Workflow Trigger as the entry point). Save and activate the n8n trigger to make it available for execution.

Node Details

Execute Workflow Trigger (input): Serves as the primary entry point for this sub-n8n workflow, waiting for data (including the file) to be passed from a parent n8n automation.
Convert to File: Standard n8n node used to ensure the incoming file data is correctly formatted as a binary file object, mandatory for file processing n8n node instances.
Code (getFileSizeInBytes): Custom n8n node script that calculates the byte size of the file input. Essential for determining if chunking is required.
HTTP Request (createSession): This n8n node makes the initial API call to Kommo-AmoCRM to start a new multi-part upload session, receiving a session ID or specific upload URL.
If (isGraterThenMax): A core logic n8n node that checks the file size against an absolute maximum upload limit, preventing execution if the file is excessively large.
Code (SplitFileToChunks): The crucial n8n node containing the custom logic to split the single large file into multiple smaller binary files (chunks), necessary for this n8n workflow.
Split In Batches (Loop Over File Chunks): This flow control n8n node iterates sequentially over the list of file chunks created by the previous step.
HTTP Request (loadFile): Performs the actual upload of a single chunk to the Kommo-AmoCRM endpoint, using parameters set up in the preceding n8n nodes, completing the core task of the n8n template.

Related n8n Workflows

Paid

Nodes: 14 Nodes
Updated: December 26 2025
View all
Created by

Backend typescript developer. I specialize in integrations of amoCRM, Common, Telegram, AI

Featured*