Create backup: GLM - Limpieza de temporales IR Nicaragua
This commit is contained in:
@@ -0,0 +1,360 @@
|
|||||||
|
{
|
||||||
|
"updatedAt": "2026-07-16T16:21:03.344Z",
|
||||||
|
"createdAt": "2026-07-13T15:33:52.678Z",
|
||||||
|
"id": "4WrHnfh80M7Zewjw",
|
||||||
|
"name": "GLM - Limpieza de temporales IR Nicaragua",
|
||||||
|
"description": "Elimina los archivos y recursos temporales creados durante el cálculo de IR, evitando acumulaciones innecesarias en Google Drive después de finalizar el procesamiento.",
|
||||||
|
"active": true,
|
||||||
|
"isArchived": false,
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"rule": {
|
||||||
|
"interval": [
|
||||||
|
{
|
||||||
|
"triggerAtHour": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "5db07430-0c71-417b-a5d3-3f3aa123051d",
|
||||||
|
"name": "Limpieza diaria 2 AM",
|
||||||
|
"type": "n8n-nodes-base.scheduleTrigger",
|
||||||
|
"typeVersion": 1.3,
|
||||||
|
"position": [
|
||||||
|
0,
|
||||||
|
352
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"url": "https://www.googleapis.com/drive/v3/files",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleDriveOAuth2Api",
|
||||||
|
"sendQuery": true,
|
||||||
|
"queryParameters": {
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "q",
|
||||||
|
"value": "name contains 'TMP_IR_NIC_' and trashed = false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fields",
|
||||||
|
"value": "files(id,name,createdTime)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pageSize",
|
||||||
|
"value": "1000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "orderBy",
|
||||||
|
"value": "createdTime"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"timeout": 120000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "b30e32d6-1080-43d2-a24a-0649b8ae9c38",
|
||||||
|
"name": "Buscar temporales IR antiguos",
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.2,
|
||||||
|
"position": [
|
||||||
|
240,
|
||||||
|
352
|
||||||
|
],
|
||||||
|
"notesInFlow": true,
|
||||||
|
"retryOnFail": true,
|
||||||
|
"maxTries": 3,
|
||||||
|
"credentials": {
|
||||||
|
"googleDriveOAuth2Api": {
|
||||||
|
"id": "g23xdGLZRzBGqKgH",
|
||||||
|
"name": "Isaac - Google Drive"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notes": "Selecciona la misma credencial OAuth2 de Google Drive del workflow principal."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "'use strict';\nconst cutoff = Date.now() - 24 * 60 * 60 * 1000;\nconst files = Array.isArray($json.files) ? $json.files : [];\nreturn files.filter((f) => f.id && f.createdTime && new Date(f.createdTime).getTime() < cutoff).map((f) => ({ json: { fileId: f.id, name: f.name, createdTime: f.createdTime } }));\n"
|
||||||
|
},
|
||||||
|
"id": "701b29aa-506a-45b8-b1f1-4eeff80326ee",
|
||||||
|
"name": "Filtrar temporales mayores de 24h",
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
512,
|
||||||
|
352
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"method": "DELETE",
|
||||||
|
"url": "=https://www.googleapis.com/drive/v3/files/{{ $json.fileId }}",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleDriveOAuth2Api",
|
||||||
|
"options": {
|
||||||
|
"timeout": 120000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "0be129cf-e394-4147-a083-c71b1b440fb0",
|
||||||
|
"name": "Eliminar temporales antiguos",
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.2,
|
||||||
|
"position": [
|
||||||
|
768,
|
||||||
|
352
|
||||||
|
],
|
||||||
|
"notesInFlow": true,
|
||||||
|
"retryOnFail": true,
|
||||||
|
"maxTries": 3,
|
||||||
|
"credentials": {
|
||||||
|
"googleDriveOAuth2Api": {
|
||||||
|
"id": "g23xdGLZRzBGqKgH",
|
||||||
|
"name": "Isaac - Google Drive"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"onError": "continueRegularOutput",
|
||||||
|
"notes": "Selecciona la misma credencial Google Drive."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": {
|
||||||
|
"Limpieza diaria 2 AM": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Buscar temporales IR antiguos",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Buscar temporales IR antiguos": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Filtrar temporales mayores de 24h",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Filtrar temporales mayores de 24h": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Eliminar temporales antiguos",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"executionOrder": "v1",
|
||||||
|
"binaryMode": "separate",
|
||||||
|
"availableInMCP": true
|
||||||
|
},
|
||||||
|
"staticData": {
|
||||||
|
"node:Limpieza diaria 2 AM": {
|
||||||
|
"recurrenceRules": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": null,
|
||||||
|
"versionId": "91bdbc93-f663-4f81-b412-fc3f305e8580",
|
||||||
|
"activeVersionId": "91bdbc93-f663-4f81-b412-fc3f305e8580",
|
||||||
|
"versionCounter": 10,
|
||||||
|
"triggerCount": 1,
|
||||||
|
"shared": [
|
||||||
|
{
|
||||||
|
"updatedAt": "2026-07-13T15:33:52.681Z",
|
||||||
|
"createdAt": "2026-07-13T15:33:52.681Z",
|
||||||
|
"role": "workflow:owner",
|
||||||
|
"workflowId": "4WrHnfh80M7Zewjw",
|
||||||
|
"projectId": "PJpTANzTXIFibWsW",
|
||||||
|
"project": {
|
||||||
|
"updatedAt": "2026-04-22T14:25:09.686Z",
|
||||||
|
"createdAt": "2026-04-22T14:22:54.790Z",
|
||||||
|
"id": "PJpTANzTXIFibWsW",
|
||||||
|
"name": "Isaac Aracena <iaracena@gomezleemarketing.com>",
|
||||||
|
"type": "personal",
|
||||||
|
"icon": null,
|
||||||
|
"description": null,
|
||||||
|
"creatorId": "0a88c0b1-928e-4412-896e-c5d1c99b2029"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [],
|
||||||
|
"activeVersion": {
|
||||||
|
"updatedAt": "2026-07-13T15:55:37.000Z",
|
||||||
|
"createdAt": "2026-07-13T15:55:27.405Z",
|
||||||
|
"versionId": "91bdbc93-f663-4f81-b412-fc3f305e8580",
|
||||||
|
"workflowId": "4WrHnfh80M7Zewjw",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"rule": {
|
||||||
|
"interval": [
|
||||||
|
{
|
||||||
|
"triggerAtHour": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "5db07430-0c71-417b-a5d3-3f3aa123051d",
|
||||||
|
"name": "Limpieza diaria 2 AM",
|
||||||
|
"type": "n8n-nodes-base.scheduleTrigger",
|
||||||
|
"typeVersion": 1.3,
|
||||||
|
"position": [
|
||||||
|
0,
|
||||||
|
352
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"url": "https://www.googleapis.com/drive/v3/files",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleDriveOAuth2Api",
|
||||||
|
"sendQuery": true,
|
||||||
|
"queryParameters": {
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "q",
|
||||||
|
"value": "name contains 'TMP_IR_NIC_' and trashed = false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fields",
|
||||||
|
"value": "files(id,name,createdTime)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pageSize",
|
||||||
|
"value": "1000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "orderBy",
|
||||||
|
"value": "createdTime"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"timeout": 120000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "b30e32d6-1080-43d2-a24a-0649b8ae9c38",
|
||||||
|
"name": "Buscar temporales IR antiguos",
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.2,
|
||||||
|
"position": [
|
||||||
|
240,
|
||||||
|
352
|
||||||
|
],
|
||||||
|
"notesInFlow": true,
|
||||||
|
"retryOnFail": true,
|
||||||
|
"maxTries": 3,
|
||||||
|
"credentials": {
|
||||||
|
"googleDriveOAuth2Api": {
|
||||||
|
"id": "g23xdGLZRzBGqKgH",
|
||||||
|
"name": "Isaac - Google Drive"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notes": "Selecciona la misma credencial OAuth2 de Google Drive del workflow principal."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "'use strict';\nconst cutoff = Date.now() - 24 * 60 * 60 * 1000;\nconst files = Array.isArray($json.files) ? $json.files : [];\nreturn files.filter((f) => f.id && f.createdTime && new Date(f.createdTime).getTime() < cutoff).map((f) => ({ json: { fileId: f.id, name: f.name, createdTime: f.createdTime } }));\n"
|
||||||
|
},
|
||||||
|
"id": "701b29aa-506a-45b8-b1f1-4eeff80326ee",
|
||||||
|
"name": "Filtrar temporales mayores de 24h",
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
512,
|
||||||
|
352
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"method": "DELETE",
|
||||||
|
"url": "=https://www.googleapis.com/drive/v3/files/{{ $json.fileId }}",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleDriveOAuth2Api",
|
||||||
|
"options": {
|
||||||
|
"timeout": 120000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "0be129cf-e394-4147-a083-c71b1b440fb0",
|
||||||
|
"name": "Eliminar temporales antiguos",
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.2,
|
||||||
|
"position": [
|
||||||
|
768,
|
||||||
|
352
|
||||||
|
],
|
||||||
|
"notesInFlow": true,
|
||||||
|
"retryOnFail": true,
|
||||||
|
"maxTries": 3,
|
||||||
|
"credentials": {
|
||||||
|
"googleDriveOAuth2Api": {
|
||||||
|
"id": "g23xdGLZRzBGqKgH",
|
||||||
|
"name": "Isaac - Google Drive"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"onError": "continueRegularOutput",
|
||||||
|
"notes": "Selecciona la misma credencial Google Drive."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": {
|
||||||
|
"Limpieza diaria 2 AM": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Buscar temporales IR antiguos",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Buscar temporales IR antiguos": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Filtrar temporales mayores de 24h",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Filtrar temporales mayores de 24h": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Eliminar temporales antiguos",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"authors": "Isaac Aracena",
|
||||||
|
"name": "Version 91bdbc93",
|
||||||
|
"description": "",
|
||||||
|
"autosaved": true,
|
||||||
|
"workflowPublishHistory": [
|
||||||
|
{
|
||||||
|
"createdAt": "2026-07-13T15:55:37.637Z",
|
||||||
|
"id": 2843,
|
||||||
|
"workflowId": "4WrHnfh80M7Zewjw",
|
||||||
|
"versionId": "91bdbc93-f663-4f81-b412-fc3f305e8580",
|
||||||
|
"event": "activated",
|
||||||
|
"userId": "0a88c0b1-928e-4412-896e-c5d1c99b2029"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user