From c356def7057be54717a28239ec74fe42e97114e8 Mon Sep 17 00:00:00 2001 From: EidanThen Date: Wed, 29 Jul 2026 19:13:06 +0000 Subject: [PATCH] Update glmway-workflow.json --- glmway-workflow.json | 61 +++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/glmway-workflow.json b/glmway-workflow.json index 071e85a..248d5d2 100644 --- a/glmway-workflow.json +++ b/glmway-workflow.json @@ -1,6 +1,6 @@ { "$json": { - "updatedAt": "2026-07-28T14:18:20.750Z", + "updatedAt": "2026-07-29T19:12:56.616Z", "createdAt": "2026-06-08T13:50:12.174Z", "id": "F1iPg8hktNAebZua", "name": "GLMWay", @@ -1993,8 +1993,8 @@ { "parameters": { "sendTo": "={{ $json.email }}", - "subject": "#TheGLMWay Evaluation", - "message": "=\n\n\n \n \n Thank you for participating #TheGLMWay\n\n\n
\n\n\n \n \n \n \n
\n

#TheGLMWay Evaluation

\n
\n \"GLM\n
\n \n
\n

\n Hi {{ $json.primerNombre }},\n

\n

\n Thank you for taking part in the #TheGLMWay session!

\n

\n To keep improving these sessions, we'd love to hear your thoughts on what was covered. Completing the evaluation will take less than 5 minutes.\n

\n \n
\n
\n \"Google\n

#TheGLMWay Evaluation

\n
\n \n \n Complete evaluation\n \n
\n
\n
\n\n", + "subject": "#TheGLMWay Quiz", + "message": "=\n\n\n \n \n Thank you for participating #TheGLMWay\n\n\n
\n\n\n \n \n \n \n
\n

#TheGLMWay Quiz

\n
\n \"GLM\n
\n \n
\n

\n Hi {{ $json.primerNombre }},\n

\n

\n Thank you for taking part in the #TheGLMWay session!

\n

\n To keep improving these sessions, we'd love to hear your thoughts on what was covered. Completing the quiz will take less than 5 minutes.\n

\n \n
\n
\n \"Google\n

#TheGLMWay Quiz

\n
\n \n \n Complete quiz\n \n
\n
\n
\n\n", "options": { "appendAttribution": false } @@ -2393,6 +2393,7 @@ "id": "f1bf8c51-43cf-41d4-93c4-1a1d0a0dac7a", "name": "Obtener fechas e instructores", "alwaysOutputData": false, + "retryOnFail": true, "credentials": { "googleSheetsOAuth2Api": { "id": "8Pp0ek3NPsEkyXfY", @@ -3460,7 +3461,7 @@ }, { "parameters": { - "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular falta 48h o 24h1\"\nconst sessionNode = $('Calcular falta 48h o 24h1').first();\nconst sesion = sessionNode?.json?.sesion || {}; // Leído desde la raíz del JSON\n\n// 2. Contar participantes y construir de forma dinámica la lista por país\nlet totalParticipantes = 0;\nlet listaParticipantesTexto = \"\";\n\nif (sesion.participantes) {\n Object.keys(sesion.participantes).forEach(pais => {\n const listaPais = sesion.participantes[pais];\n if (Array.isArray(listaPais) && listaPais.length > 0) {\n totalParticipantes += listaPais.length;\n \n // Añadir el encabezado del país\n listaParticipantesTexto += `
📍 ${pais} (${listaPais.length}):
`;\n \n // Listar cada participante de ese país\n listaPais.forEach(p => {\n listaParticipantesTexto += `• ${p.nombre} (${p.departamento || 'Sin Depto'} | ${p.division || 'Sin Division'})
`;\n });\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones de los coordinadores\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos3').all(); // Asegúrate de verificar si tu nodo se llama Unir datos3 o similar\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con formato Google Chat Card\nconst body = {\n text: `🔔 *Aviso para Coordinadores RRHH* \\nEstimados ${menciones}, aquí está el listado de personas inscritas para la sesión de mañana.`,\n cardsV2: [\n {\n cardId: \"session-reminder-hr\",\n card: {\n header: {\n title: `🎓 Capacitación #TheGLMWay de mañana`,\n },\n sections: [\n {\n header: \"📈 Resumen de Asistencia\",\n widgets: [\n {\n textParagraph: {\n text: `Total inscritos: ${totalParticipantes} personas
` + \n listaParticipantesTexto\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" + "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular falta 48h o 24h1\"\nconst sessionNode = $('Calcular falta 48h o 24h1').first();\nconst sesion = sessionNode?.json?.sesion || {}; // Leído desde la raíz del JSON\n\n// 2. Contar participantes y construir de forma dinámica la lista por país\nlet totalParticipantes = 0;\nlet listaParticipantesTexto = \"\";\n\nif (sesion.participantes) {\n Object.keys(sesion.participantes).forEach(pais => {\n const listaPais = sesion.participantes[pais];\n if (Array.isArray(listaPais) && listaPais.length > 0) {\n totalParticipantes += listaPais.length;\n \n // Añadir el encabezado del país\n listaParticipantesTexto += `
📍 ${pais} (${listaPais.length}):
`;\n \n // Listar cada participante de ese país\n listaPais.forEach(p => {\n listaParticipantesTexto += `• ${p.nombre} (${p.departamento || 'Sin Depto'} | ${p.division || 'Sin Division'})
`;\n });\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones de los coordinadores\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos3').all(); // Asegúrate de verificar si tu nodo se llama Unir datos3 o similar\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con formato Google Chat Card\nconst body = {\n text: `🔔 *Aviso para Coordinadores RRHH* \\nEstimados ${menciones}, aquí está el listado de personas inscritas para la capacitación de mañana.`,\n cardsV2: [\n {\n cardId: \"session-reminder-hr\",\n card: {\n header: {\n title: `🎓 Capacitación #TheGLMWay de mañana`,\n },\n sections: [\n {\n header: \"📈 Resumen de Asistencia\",\n widgets: [\n {\n textParagraph: {\n text: `Total inscritos: ${totalParticipantes} personas
` + \n listaParticipantesTexto\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, @@ -6005,37 +6006,16 @@ "recurrenceRules": [] }, "node:Termino evento": { - "lastTimeChecked": "2026-07-28T14:18:21Z" + "lastTimeChecked": "2026-07-29T19:12:51Z" } }, "meta": { "templateCredsSetupCompleted": true }, - "pinData": { - "Schedule Trigger1": [ - { - "json": { - "timestamp": "2026-07-18T02:00:24.005-04:00", - "Readable date": "July 18th 2026, 2:00:24 am", - "Readable time": "2:00:24 am", - "Day of week": "Saturday", - "Year": "2026", - "Month": "July", - "Day of month": "18", - "Hour": "02", - "Minute": "00", - "Second": "24", - "Timezone": "America/Santo_Domingo (UTC-04:00)" - }, - "pairedItem": { - "item": 0 - } - } - ] - }, - "versionId": "f47f660a-7466-454f-bf85-313015d279d0", - "activeVersionId": "f47f660a-7466-454f-bf85-313015d279d0", - "versionCounter": 6790, + "pinData": {}, + "versionId": "34e79650-8a3b-4556-adc6-c4093d68b741", + "activeVersionId": "34e79650-8a3b-4556-adc6-c4093d68b741", + "versionCounter": 6840, "triggerCount": 11, "shared": [ { @@ -6058,9 +6038,9 @@ ], "tags": [], "activeVersion": { - "updatedAt": "2026-07-28T14:18:22.000Z", - "createdAt": "2026-07-28T14:18:20.759Z", - "versionId": "f47f660a-7466-454f-bf85-313015d279d0", + "updatedAt": "2026-07-29T19:12:51.000Z", + "createdAt": "2026-07-29T19:11:01.237Z", + "versionId": "34e79650-8a3b-4556-adc6-c4093d68b741", "workflowId": "F1iPg8hktNAebZua", "nodes": [ { @@ -8048,8 +8028,8 @@ { "parameters": { "sendTo": "={{ $json.email }}", - "subject": "#TheGLMWay Evaluation", - "message": "=\n\n\n \n \n Thank you for participating #TheGLMWay\n\n\n
\n\n\n \n \n \n \n
\n

#TheGLMWay Evaluation

\n
\n \"GLM\n
\n \n
\n

\n Hi {{ $json.primerNombre }},\n

\n

\n Thank you for taking part in the #TheGLMWay session!

\n

\n To keep improving these sessions, we'd love to hear your thoughts on what was covered. Completing the evaluation will take less than 5 minutes.\n

\n \n
\n
\n \"Google\n

#TheGLMWay Evaluation

\n
\n \n \n Complete evaluation\n \n
\n
\n
\n\n", + "subject": "#TheGLMWay Quiz", + "message": "=\n\n\n \n \n Thank you for participating #TheGLMWay\n\n\n
\n\n\n \n \n \n \n
\n

#TheGLMWay Quiz

\n
\n \"GLM\n
\n \n
\n

\n Hi {{ $json.primerNombre }},\n

\n

\n Thank you for taking part in the #TheGLMWay session!

\n

\n To keep improving these sessions, we'd love to hear your thoughts on what was covered. Completing the quiz will take less than 5 minutes.\n

\n \n
\n
\n \"Google\n

#TheGLMWay Quiz

\n
\n \n \n Complete quiz\n \n
\n
\n
\n\n", "options": { "appendAttribution": false } @@ -8448,6 +8428,7 @@ "id": "f1bf8c51-43cf-41d4-93c4-1a1d0a0dac7a", "name": "Obtener fechas e instructores", "alwaysOutputData": false, + "retryOnFail": true, "credentials": { "googleSheetsOAuth2Api": { "id": "8Pp0ek3NPsEkyXfY", @@ -9515,7 +9496,7 @@ }, { "parameters": { - "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular falta 48h o 24h1\"\nconst sessionNode = $('Calcular falta 48h o 24h1').first();\nconst sesion = sessionNode?.json?.sesion || {}; // Leído desde la raíz del JSON\n\n// 2. Contar participantes y construir de forma dinámica la lista por país\nlet totalParticipantes = 0;\nlet listaParticipantesTexto = \"\";\n\nif (sesion.participantes) {\n Object.keys(sesion.participantes).forEach(pais => {\n const listaPais = sesion.participantes[pais];\n if (Array.isArray(listaPais) && listaPais.length > 0) {\n totalParticipantes += listaPais.length;\n \n // Añadir el encabezado del país\n listaParticipantesTexto += `
📍 ${pais} (${listaPais.length}):
`;\n \n // Listar cada participante de ese país\n listaPais.forEach(p => {\n listaParticipantesTexto += `• ${p.nombre} (${p.departamento || 'Sin Depto'} | ${p.division || 'Sin Division'})
`;\n });\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones de los coordinadores\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos3').all(); // Asegúrate de verificar si tu nodo se llama Unir datos3 o similar\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con formato Google Chat Card\nconst body = {\n text: `🔔 *Aviso para Coordinadores RRHH* \\nEstimados ${menciones}, aquí está el listado de personas inscritas para la sesión de mañana.`,\n cardsV2: [\n {\n cardId: \"session-reminder-hr\",\n card: {\n header: {\n title: `🎓 Capacitación #TheGLMWay de mañana`,\n },\n sections: [\n {\n header: \"📈 Resumen de Asistencia\",\n widgets: [\n {\n textParagraph: {\n text: `Total inscritos: ${totalParticipantes} personas
` + \n listaParticipantesTexto\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" + "jsCode": "// 1. Obtener datos de la sesión del nodo \"Calcular falta 48h o 24h1\"\nconst sessionNode = $('Calcular falta 48h o 24h1').first();\nconst sesion = sessionNode?.json?.sesion || {}; // Leído desde la raíz del JSON\n\n// 2. Contar participantes y construir de forma dinámica la lista por país\nlet totalParticipantes = 0;\nlet listaParticipantesTexto = \"\";\n\nif (sesion.participantes) {\n Object.keys(sesion.participantes).forEach(pais => {\n const listaPais = sesion.participantes[pais];\n if (Array.isArray(listaPais) && listaPais.length > 0) {\n totalParticipantes += listaPais.length;\n \n // Añadir el encabezado del país\n listaParticipantesTexto += `
📍 ${pais} (${listaPais.length}):
`;\n \n // Listar cada participante de ese país\n listaPais.forEach(p => {\n listaParticipantesTexto += `• ${p.nombre} (${p.departamento || 'Sin Depto'} | ${p.division || 'Sin Division'})
`;\n });\n }\n });\n}\n\n// 3. Obtener los contactId del nodo anterior para generar las menciones de los coordinadores\nlet menciones = \"\";\ntry {\n const itemsUnirDatos = $('Unir datos3').all(); // Asegúrate de verificar si tu nodo se llama Unir datos3 o similar\n const idsUnicos = [...new Set(\n itemsUnirDatos\n .map(item => item.json.contactId)\n .filter(id => id !== undefined && id !== null && id !== \"\")\n )];\n menciones = idsUnicos.map(id => ``).join(\" \");\n} catch (error) {\n menciones = \"\";\n}\n\n// 4. Construir cuerpo del mensaje con formato Google Chat Card\nconst body = {\n text: `🔔 *Aviso para Coordinadores RRHH* \\nEstimados ${menciones}, aquí está el listado de personas inscritas para la capacitación de mañana.`,\n cardsV2: [\n {\n cardId: \"session-reminder-hr\",\n card: {\n header: {\n title: `🎓 Capacitación #TheGLMWay de mañana`,\n },\n sections: [\n {\n header: \"📈 Resumen de Asistencia\",\n widgets: [\n {\n textParagraph: {\n text: `Total inscritos: ${totalParticipantes} personas
` + \n listaParticipantesTexto\n }\n }\n ]\n }\n ]\n }\n }\n ]\n};\n\nreturn [{ json: body }];" }, "type": "n8n-nodes-base.code", "typeVersion": 2, @@ -11997,15 +11978,15 @@ } }, "authors": "Eidan Then", - "name": "Version f47f660a", + "name": "Version 34e79650", "description": "", "autosaved": true, "workflowPublishHistory": [ { - "createdAt": "2026-07-28T14:18:22.112Z", - "id": 3540, + "createdAt": "2026-07-29T19:12:51.604Z", + "id": 3637, "workflowId": "F1iPg8hktNAebZua", - "versionId": "f47f660a-7466-454f-bf85-313015d279d0", + "versionId": "34e79650-8a3b-4556-adc6-c4093d68b741", "event": "activated", "userId": "de14e7e5-491b-4983-abb2-f88af42e92fd" }