From bbc76684c7f1aaec26009dcd653b6c9ad099f7cb Mon Sep 17 00:00:00 2001 From: Isaac_Aracena Date: Sun, 28 Jun 2026 04:00:26 +0000 Subject: [PATCH] Update backup: Tablero CDC - Sync Tarifario Sheet a Supabase --- ...o-cdc-sync-tarifario-sheet-a-supabase.json | 58 +++++++++++++++---- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/tablero-cdc-sync-tarifario-sheet-a-supabase.json b/tablero-cdc-sync-tarifario-sheet-a-supabase.json index 24e8d35..f99fe70 100644 --- a/tablero-cdc-sync-tarifario-sheet-a-supabase.json +++ b/tablero-cdc-sync-tarifario-sheet-a-supabase.json @@ -1,5 +1,5 @@ { - "updatedAt": "2026-06-21T01:53:57.071Z", + "updatedAt": "2026-06-25T03:30:17.313Z", "createdAt": "2026-06-20T14:15:17.560Z", "id": "7eyfZEkGuDSUodDX", "name": "Tablero CDC - Sync Tarifario Sheet a Supabase", @@ -359,6 +359,22 @@ ], "id": "1a45e645-65af-4727-bf4f-15c7000ba2a2", "name": "Schedule Trigger" + }, + { + "parameters": { + "content": "## 💵 SYNC TARIFARIO CDC → SUPABASE\n\nEste flujo sincroniza automáticamente el tarifario editable desde Google Sheets hacia Supabase para que la app Tablero CDC use el catálogo actualizado.\n\nFrecuencia:\n- Cada 8 horas.\n\nProceso:\n1. Lee el Sheet “Catálogo Tarifario App”.\n2. Normaliza sección, categoría, servicio, tipo de trabajo y niveles.\n3. Convierte “monto/rango” en reference, reference_min y reference_max.\n4. Genera códigos únicos cuando faltan.\n5. Hace upsert en Supabase: tablero_cdc_tariff_catalog.\n6. Escribe de vuelta en el Sheet los códigos base generados.\n\nReglas importantes:\n- No sincroniza filas vacías.\n- Cada fila debe tener categoría, servicio y al menos un nivel con monto/rango.\n- Si hay códigos duplicados o secciones inválidas, el flujo se detiene para proteger el catálogo.\n- El Sheet es la fuente humana editable; Supabase es la fuente usada por la app.", + "height": 640, + "width": 1408, + "color": 5 + }, + "type": "n8n-nodes-base.stickyNote", + "typeVersion": 1, + "position": [ + -64, + -432 + ], + "id": "23c63e0a-2e95-4ec5-b075-d08ae68754fc", + "name": "Sticky Note" } ], "connections": { @@ -424,15 +440,17 @@ }, "staticData": { "node:Schedule Trigger": { - "recurrenceRules": [] + "recurrenceRules": [ + 16 + ] } }, "meta": { "templateCredsSetupCompleted": true }, - "versionId": "806aa39c-41e1-4c6a-8d58-60fb431346a1", - "activeVersionId": "806aa39c-41e1-4c6a-8d58-60fb431346a1", - "versionCounter": 94, + "versionId": "4ea3c2ee-0518-4a55-8c9a-ccffb26f471a", + "activeVersionId": "4ea3c2ee-0518-4a55-8c9a-ccffb26f471a", + "versionCounter": 116, "triggerCount": 1, "shared": [ { @@ -455,9 +473,9 @@ ], "tags": [], "activeVersion": { - "updatedAt": "2026-06-21T01:54:00.000Z", - "createdAt": "2026-06-21T01:53:57.073Z", - "versionId": "806aa39c-41e1-4c6a-8d58-60fb431346a1", + "updatedAt": "2026-06-25T03:30:22.000Z", + "createdAt": "2026-06-25T03:30:17.315Z", + "versionId": "4ea3c2ee-0518-4a55-8c9a-ccffb26f471a", "workflowId": "7eyfZEkGuDSUodDX", "nodes": [ { @@ -812,6 +830,22 @@ ], "id": "1a45e645-65af-4727-bf4f-15c7000ba2a2", "name": "Schedule Trigger" + }, + { + "parameters": { + "content": "## 💵 SYNC TARIFARIO CDC → SUPABASE\n\nEste flujo sincroniza automáticamente el tarifario editable desde Google Sheets hacia Supabase para que la app Tablero CDC use el catálogo actualizado.\n\nFrecuencia:\n- Cada 8 horas.\n\nProceso:\n1. Lee el Sheet “Catálogo Tarifario App”.\n2. Normaliza sección, categoría, servicio, tipo de trabajo y niveles.\n3. Convierte “monto/rango” en reference, reference_min y reference_max.\n4. Genera códigos únicos cuando faltan.\n5. Hace upsert en Supabase: tablero_cdc_tariff_catalog.\n6. Escribe de vuelta en el Sheet los códigos base generados.\n\nReglas importantes:\n- No sincroniza filas vacías.\n- Cada fila debe tener categoría, servicio y al menos un nivel con monto/rango.\n- Si hay códigos duplicados o secciones inválidas, el flujo se detiene para proteger el catálogo.\n- El Sheet es la fuente humana editable; Supabase es la fuente usada por la app.", + "height": 640, + "width": 1408, + "color": 5 + }, + "type": "n8n-nodes-base.stickyNote", + "typeVersion": 1, + "position": [ + -64, + -432 + ], + "id": "23c63e0a-2e95-4ec5-b075-d08ae68754fc", + "name": "Sticky Note" } ], "connections": { @@ -872,15 +906,15 @@ } }, "authors": "Isaac Aracena", - "name": "Version 806aa39c", + "name": "Version 4ea3c2ee", "description": "", "autosaved": true, "workflowPublishHistory": [ { - "createdAt": "2026-06-21T01:54:00.165Z", - "id": 1683, + "createdAt": "2026-06-25T03:30:22.254Z", + "id": 1861, "workflowId": "7eyfZEkGuDSUodDX", - "versionId": "806aa39c-41e1-4c6a-8d58-60fb431346a1", + "versionId": "4ea3c2ee-0518-4a55-8c9a-ccffb26f471a", "event": "activated", "userId": "0a88c0b1-928e-4412-896e-c5d1c99b2029" }