Group Google Drive images into numbered batch folders with a set batch size

Go to Workflow
1 views
Built by Oliver Oliver
Created on July 24, 2026

Description

Quick overview
This workflow organizes Google Drive images by copying them from a named source folder into newly created, numbered batch subfolders under a destination parent folder, using a configurable batch size and folder-name prefix.

How it works
Runs when you manually execute the workflow in n8n.
Reads configuration values for the source folder name, destination parent folder ID, batch name prefix, and batch size.
Searches Google Drive for the source folder by name and lists all image files inside it.
Groups the images into fixed-size batches and skips any leftover files that do not fill a complete batch.
For each batch, creates a new subfolder in Google Drive under the destination parent folder using the configured prefix and a zero-padded sequence number.
Copies each image from the batch into its corresponding new subfolder in Google Drive.

Setup
Connect a Google Drive OAuth2 credential for the Google Drive nodes.
In the configuration step, set the exact source folder name, the destination parent folder ID where batch folders should be created, the batch name prefix, and the batch size.
Ensure the source folder contains image files and that your Google Drive account has permission to create folders and copy files into the destination parent folder.

Nodes Used (2)

Code
n8n-nodes-base.code
Google Drive
n8n-nodes-base.googleDrive