The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "62edf095-a02a-4b8d-a7b1-e194ae0d3652",
"name": "On clicking 'execute'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-660,
1100
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1e10875b-f54b-43a8-a7a2-43d4fcbf248d",
"name": "n8n",
"type": "n8n-nodes-base.n8n",
"position": [
-300,
1220
],
"parameters": {
"filters": {},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "1f5caabb-d76b-4744-be76-97e9abea1ddc",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-100,
1220
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "755e0803-c5c0-48a7-9c0c-44f8d5718d0b",
"name": "create new folder",
"type": "n8n-nodes-base.googleDrive",
"position": [
-480,
1220
],
"parameters": {
"name": "=Workflow Backups {{ $now.format('cccc t dd-MM-yyyy') }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1hnHubRgcstU8OgV8BPwPNivfTZT5g2Wf",
"cachedResultUrl": "https://drive.google.com/drive/folders/1hnHubRgcstU8OgV8BPwPNivfTZT5g2Wf",
"cachedResultName": "Workflow Backups"
},
"resource": "folder"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "22874532-6d87-4a72-bb51-dd8c6e03c0c1",
"name": "Convert to File",
"type": "n8n-nodes-base.convertToFile",
"position": [
120,
1320
],
"parameters": {
"options": {
"format": true,
"fileName": "={{ $json.name + \".json\" }} "
},
"operation": "toJson"
},
"typeVersion": 1.1
},
{
"id": "0b0155f1-15bc-4580-af6e-7dec3b0d5737",
"name": "Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
300,
1320
],
"parameters": {
"name": "={{ $('Loop Over Items').item.json.name + \".json\" }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('create new folder').item.json.id }}"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "c7b73036-1831-4dd6-8dd9-fef1356a184c",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-660,
1360
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 4
}
]
}
},
"typeVersion": 1.2
},
{
"id": "666dcf95-928c-4270-808f-755a9771a410",
"name": "Filter",
"type": "n8n-nodes-base.filter",
"position": [
300,
1120
],
"parameters": {
"options": {
"ignoreCase": true
},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "538fc29d-2693-4c62-9848-bdcaf8566909",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.id }}",
"rightValue": "={{ $('create new folder').item.json.id }}"
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "f6f44cbe-a98e-4a49-8c4c-59ebe02db9e5",
"name": "delete folder",
"type": "n8n-nodes-base.googleDrive",
"position": [
480,
1120
],
"parameters": {
"options": {
"deletePermanently": true
},
"resource": "folder",
"operation": "deleteFolder",
"folderNoRootId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "d96a009f-08d3-4f0d-9f70-f9e0de9b9f91",
"name": "Get folders",
"type": "n8n-nodes-base.googleDrive",
"position": [
120,
1120
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "1hnHubRgcstU8OgV8BPwPNivfTZT5g2Wf",
"cachedResultUrl": "https://drive.google.com/drive/folders/1hnHubRgcstU8OgV8BPwPNivfTZT5g2Wf",
"cachedResultName": "Workflow Backups"
}
},
"options": {},
"resource": "fileFolder"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
}
],
"connections": {
"n8n": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Filter": {
"main": [
[
{
"node": "delete folder",
"type": "main",
"index": 0
}
]
]
},
"Get folders": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Google Drive": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"delete folder": {
"main": [
[]
]
},
"Convert to File": {
"main": [
[
{
"node": "Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Get folders",
"type": "main",
"index": 0
}
],
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "create new folder",
"type": "main",
"index": 0
}
]
]
},
"create new folder": {
"main": [
[
{
"node": "n8n",
"type": "main",
"index": 0
}
]
]
},
"On clicking 'execute'": {
"main": [
[
{
"node": "create new folder",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleDriveOAuth2Apin8nApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
How this works
This workflow streamlines the organisation of files in Google Drive by automatically filtering and sorting them into scheduled folders based on specific criteria, saving hours of manual sorting for busy teams handling large document libraries. It suits content managers, project coordinators, or anyone overwhelmed by unstructured files in shared drives, ensuring important documents are always accessible without endless searches. The key step involves the splitInBatches node looping through files, applying a filter to match conditions like date or type, then creating targeted folders via Google Drive integration for seamless archiving.
Use this workflow when you need regular, automated tidying of Google Drive folders, such as weekly categorisation of incoming reports or monthly archiving of project files, to maintain order without constant oversight. Avoid it for one-off clean-ups or if your files require complex AI-driven analysis, as it relies on simple rule-based filtering. Common variations include adjusting the scheduleTrigger for daily runs or integrating additional filters for metadata like file size or owner.
About this workflow
Schedule Filter. Uses manualTrigger, n8n, splitInBatches, googleDrive. Event-driven trigger; 10 nodes.
Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Automatically backs up all workflows to Google Drive daily. Triggers daily at 11 PM (or manually on demand) Creates a timestamped backup folder in Google Drive Fetches all workflows from your n8n inst
This template creates a nightly backup of all n8n workflows and saves them to a Google Drive folder. Each night, the previous night's backups are moved to an “n8n_old” folder and renamed with the corr
Code Itemlists. Uses stickyNote, moveBinaryData, googleDrive, itemLists. Scheduled trigger; 33 nodes.
This workflow is perfect for n8n users who want to automatically backup all their workflows 💾 to Google Drive with zero manual effort. Perfect for teams managing multiple workflows or anyone who value
While Google Drive is accessible and easy to use, file listings via API are limited to either all files in the entire Drive or all files in a specific folder. This also means that the n8n triggers for