Mover archivos automáticamente
Este es unFile Managementflujo de automatización del dominio deautomatización que contiene 19 nodos.Utiliza principalmente nodos como If, GoogleDrive, ManualTrigger, SplitInBatches. Organizador automático de archivos de Google Drive: clasificar PDF, imágenes y documentos por tipo
- •Credenciales de API de Google Drive
Nodos utilizados (19)
Categoría
{
"id": "Kg8UgSiA0utYWQ0J",
"meta": {
"instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
"templateCredsSetupCompleted": true
},
"name": "Auto move files",
"tags": [],
"nodes": [
{
"id": "ebf3a973-602f-4a01-8a74-6df55ad6d113",
"name": "Si es imagen",
"type": "n8n-nodes-base.if",
"notes": "🖼️ IMAGE FILE DETECTION\n\nChecks if the uploaded file is an image:\n\n• Examines the file's MIME type\n• Looks for 'image/' in the MIME type\n• Supports: JPG, PNG, GIF, WebP, SVG, etc.\n• TRUE path: Routes to 'Move to Images'\n• FALSE path: File continues to next filter\n\nExample MIME types: image/jpeg, image/png",
"position": [
400,
976
],
"parameters": {
"options": {
"ignoreCase": true,
"looseTypeValidation": false
},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "3e4622cc-91f0-4cbd-bd55-e3ad4e28f32b",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{$binary.data.mimeType}}",
"rightValue": "image/jpeg"
}
]
}
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "13e7f0a2-8dde-4e42-a94f-1f81353c95e9",
"name": "Si es PDF",
"type": "n8n-nodes-base.if",
"notes": "📄 PDF FILE DETECTION\n\nChecks if the uploaded file is a PDF document:\n\n• Looks for exact MIME type 'application/pdf'\n• Only matches PDF files\n• TRUE path: Routes to 'Move to PDFs'\n• FALSE path: File continues to next filter\n\nThis ensures only genuine PDF files are moved to the PDF folder.",
"position": [
256,
576
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "18052dba-fa6b-4fd4-ac5f-f6abb10575b9",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{$binary.data.mimeType}}",
"rightValue": "application/pdf"
}
]
}
},
"typeVersion": 2
},
{
"id": "e5331e89-34c7-4e63-b542-0d44b7e1aa42",
"name": "Mover a Imágenes",
"type": "n8n-nodes-base.googleDrive",
"notes": "📁 MOVE IMAGE FILES\n\nMoves detected image files to the Images folder:\n\n• Uses the file ID from the trigger\n• Moves file to designated Images folder\n• Maintains file properties and permissions\n• Removes file from upload folder\n\nReplace 'YOUR_FOLDER_ID_IMAGES' with your actual Images folder ID.",
"position": [
672,
1328
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json['id'] }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1_ecL9heszdG2vACtpfHsVEe4OAs89DzM",
"cachedResultUrl": "https://drive.google.com/drive/folders/1_ecL9heszdG2vACtpfHsVEe4OAs89DzM",
"cachedResultName": "images_check"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "d456c42b-604e-4a1d-ac7b-cea42c35a004",
"name": "Mover a PDFs",
"type": "n8n-nodes-base.googleDrive",
"notes": "📄 MOVE PDF FILES\n\nMoves detected PDF files to the PDFs folder:\n\n• Uses the file ID from the trigger\n• Moves file to designated PDFs folder\n• Maintains file properties and permissions\n• Removes file from upload folder\n\nReplace 'YOUR_FOLDER_ID_PDFS' with your actual PDFs folder ID.",
"position": [
608,
752
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json['id'] }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1dHG2GI5WF3bg-Bw9ydD5fC_P5GqvdBFG",
"cachedResultUrl": "https://drive.google.com/drive/folders/1dHG2GI5WF3bg-Bw9ydD5fC_P5GqvdBFG",
"cachedResultName": "pdf_check"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "49fdce70-3f51-4edd-81fd-7c6f655b6c62",
"name": "Si es documento",
"type": "n8n-nodes-base.if",
"notes": "📋 DOCUMENT FILE DETECTION\n\nChecks if the uploaded file is a document:\n\n• Looks for 'application/' OR 'text/' MIME types\n• Catches: Word docs, Excel, PowerPoint, text files\n• Excludes PDFs (handled separately)\n• TRUE path: Routes to 'Move to Documents'\n• FALSE path: File stays in upload folder\n\nExamples: .docx, .xlsx, .pptx, .txt, .rtf",
"position": [
-48,
304
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "5ed7c752-f41d-496d-a003-56c95572b629",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{$binary.data.mimeType}}",
"rightValue": "application/json"
}
]
}
},
"typeVersion": 2
},
{
"id": "6b1feaf3-4e3b-427c-9e82-7e5df72f284c",
"name": "Mover a Documentos",
"type": "n8n-nodes-base.googleDrive",
"notes": "📋 MOVE DOCUMENT FILES\n\nMoves detected document files to the Documents folder:\n\n• Uses the file ID from the trigger\n• Moves file to designated Documents folder\n• Handles Word, Excel, PowerPoint, text files\n• Maintains file properties and permissions\n\nReplace 'YOUR_FOLDER_ID_DOCUMENTS' with your actual Documents folder ID.",
"position": [
528,
288
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json['id'] }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1KUO_jw0WCQR1lDwlkvTk1XP_0PoLb3RR",
"cachedResultUrl": "https://drive.google.com/drive/folders/1KUO_jw0WCQR1lDwlkvTk1XP_0PoLb3RR",
"cachedResultName": "json_check"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "35df71bd-e674-4dc6-bbac-4ca6ae319d04",
"name": "Descargar archivo",
"type": "n8n-nodes-base.googleDrive",
"position": [
-512,
304
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{$json['id']}}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "358f6aba-5ac4-48c3-980a-296a75cae6fd",
"name": "Recorrer elementos",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-496,
912
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "42c75b0e-47eb-442a-a842-e3e2fbe75d71",
"name": "Al hacer clic en 'Ejecutar flujo'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-944,
912
],
"parameters": {},
"typeVersion": 1
},
{
"id": "fb6d583c-79e8-433e-916c-e71da9352e4b",
"name": "Buscar archivos y carpetas",
"type": "n8n-nodes-base.googleDrive",
"position": [
-720,
912
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "1CcHp9tPoC-f7-umMjLdUU-Y7GedKLQkx",
"cachedResultUrl": "https://drive.google.com/drive/folders/1CcHp9tPoC-f7-umMjLdUU-Y7GedKLQkx",
"cachedResultName": "Indore"
}
},
"options": {},
"resource": "fileFolder",
"returnAll": true
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "gQtjXVGUgZru29qC",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "c7a7346e-0529-4191-a7cb-c56f02781d2a",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-832,
672
],
"parameters": {
"height": 224,
"content": " Search files and folders (Google Drive)\n\nPurpose: Finds all files in a specific Google Drive folder\nFunction: Searches the \"Particular\" folder (ID:) for files to process\n\nOutput: Returns a list of all files found in that folder"
},
"typeVersion": 1
},
{
"id": "ed19e989-a464-48cd-9b27-43d9850df4de",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
704
],
"parameters": {
"color": 3,
"width": 272,
"height": 192,
"content": "Loop Over Items (Split in Batches)\n\nPurpose: Processes files one by one\nFunction: Takes the list of files and processes each file individually through the workflow\n\nFlow: Creates a loop that continues until all files are processed"
},
"typeVersion": 1
},
{
"id": "107bb7f1-ff82-4b04-8e4b-9beea97d479a",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-752,
48
],
"parameters": {
"color": 2,
"width": 272,
"height": 224,
"content": "Download file (Google Drive)\n\nPurpose: Downloads file metadata and binary data\n\nFunction: Retrieves the file's MIME type and other properties needed for classification\nCritical: This step gets the file information needed for the conditional nodes"
},
"typeVersion": 1
},
{
"id": "57ee82da-1948-4185-abf4-dc8bd251c125",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-144,
-16
],
"parameters": {
"color": 4,
"width": 304,
"height": 288,
"content": " If Document (Conditional Node)\n\nPurpose: Detects JSON document files\n\nLogic: Checks if MIME type equals \"application/json\"\nTrue Path: Routes to \"Move to Documents\"\n\nFalse Path: Continues to next filter (PDF check)\n\nNote: Despite the name, this specifically looks for JSON files"
},
"typeVersion": 1
},
{
"id": "775c6f0f-3dbc-4e29-a7a3-97fd13a08afd",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
432,
16
],
"parameters": {
"color": 6,
"height": 240,
"content": "Move to Documents (Google Drive)\n\nPurpose: Relocates JSON files to Documents folder\nTarget Folder: \"Your folder\" folder (ID:)\n\nAction: Moves file from source location to Documents folder\nAfter Move: Returns to loop for next file"
},
"typeVersion": 1
},
{
"id": "e96270c2-507a-4ac7-aa62-0aaf28ed3c2c",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
608
],
"parameters": {
"color": 5,
"height": 304,
"content": "If PDF (Conditional Node)\n\nPurpose: Detects PDF files\n\nLogic: Checks if MIME type exactly equals \"application/pdf\"\n\nTrue Path: Routes to \"Move to PDFs\"\n\nFalse Path: Continues to image check\n\nPrecision: Only matches genuine PDF files"
},
"typeVersion": 1
},
{
"id": "f92b7dcb-e767-42da-899d-2bff7130b60e",
"name": "Nota adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
512
],
"parameters": {
"color": 3,
"height": 272,
"content": "Move to PDFs (Google Drive)\n\nPurpose: Relocates PDF files to PDFs folder\n\nTarget Folder: \"Your folder\" folder (ID:)\n\nAction: Moves file from source location to PDFs folder\n\nAfter Move: Returns to loop for next file"
},
"typeVersion": 1
},
{
"id": "17fd8e38-d636-496f-a1d7-ec413148a2bc",
"name": "Nota adhesiva7",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
1120
],
"parameters": {
"color": 7,
"height": 368,
"content": "If Image (Conditional Node)\n\nPurpose: Detects image files\n\nLogic: Checks if MIME type equals \"image/jpeg\" (though notes suggest broader image support)\n\nTrue Path: Routes to \"Move to Images\"\n\nFalse Path: File remains unprocessed\n\nCoverage: Handles JPG files (could be expanded for PNG, GIF, etc.)"
},
"typeVersion": 1
},
{
"id": "8c58f9d7-5c77-4d2a-83f9-061c2ac30810",
"name": "Nota adhesiva8",
"type": "n8n-nodes-base.stickyNote",
"position": [
832,
1312
],
"parameters": {
"color": 5,
"height": 272,
"content": "Move to Images (Google Drive)\n\nPurpose: Relocates image files to Images folder\n\nTarget Folder: \"Your folder\" folder (ID:)\n\nAction: Moves file from source location to Images folder\n\nAfter Move: Returns to loop for next file"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d08c53f6-2f34-4ffb-acb7-02d2fa36e73b",
"connections": {
"13e7f0a2-8dde-4e42-a94f-1f81353c95e9": {
"main": [
[
{
"node": "d456c42b-604e-4a1d-ac7b-cea42c35a004",
"type": "main",
"index": 0
}
],
[
{
"node": "ebf3a973-602f-4a01-8a74-6df55ad6d113",
"type": "main",
"index": 0
}
]
]
},
"ebf3a973-602f-4a01-8a74-6df55ad6d113": {
"main": [
[
{
"node": "e5331e89-34c7-4e63-b542-0d44b7e1aa42",
"type": "main",
"index": 0
}
],
[]
]
},
"49fdce70-3f51-4edd-81fd-7c6f655b6c62": {
"main": [
[
{
"node": "6b1feaf3-4e3b-427c-9e82-7e5df72f284c",
"type": "main",
"index": 0
}
],
[
{
"node": "13e7f0a2-8dde-4e42-a94f-1f81353c95e9",
"type": "main",
"index": 0
}
]
]
},
"d456c42b-604e-4a1d-ac7b-cea42c35a004": {
"main": [
[
{
"node": "358f6aba-5ac4-48c3-980a-296a75cae6fd",
"type": "main",
"index": 0
}
]
]
},
"35df71bd-e674-4dc6-bbac-4ca6ae319d04": {
"main": [
[
{
"node": "49fdce70-3f51-4edd-81fd-7c6f655b6c62",
"type": "main",
"index": 0
}
]
]
},
"e5331e89-34c7-4e63-b542-0d44b7e1aa42": {
"main": [
[
{
"node": "358f6aba-5ac4-48c3-980a-296a75cae6fd",
"type": "main",
"index": 0
}
]
]
},
"358f6aba-5ac4-48c3-980a-296a75cae6fd": {
"main": [
[],
[
{
"node": "35df71bd-e674-4dc6-bbac-4ca6ae319d04",
"type": "main",
"index": 0
}
]
]
},
"6b1feaf3-4e3b-427c-9e82-7e5df72f284c": {
"main": [
[
{
"node": "358f6aba-5ac4-48c3-980a-296a75cae6fd",
"type": "main",
"index": 0
}
]
]
},
"fb6d583c-79e8-433e-916c-e71da9352e4b": {
"main": [
[
{
"node": "358f6aba-5ac4-48c3-980a-296a75cae6fd",
"type": "main",
"index": 0
}
]
]
},
"42c75b0e-47eb-442a-a842-e3e2fbe75d71": {
"main": [
[
{
"node": "fb6d583c-79e8-433e-916c-e71da9352e4b",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Gestión de archivos
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Rahul Joshi
@rahul08Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.
Compartir este flujo de trabajo