Update glmway-workflow.json

This commit is contained in:
2026-07-29 19:13:06 +00:00
parent e3e2e38ba1
commit c356def705
+21 -40
View File
@@ -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": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Thank you for participating #TheGLMWay</title>\n</head>\n<body style=\"margin: 0; padding: 0; background-color: #f4f4f4; font-family: Roboto;\">\n <div style=\"max-width: 600px; margin: 40px auto; background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden;\">\n<!-- Header -->\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #2d3748;\">\n <tr>\n <td align=\"left\" style=\"padding: 22px 20px 22px 28px;\">\n <p style=\"color: #ffffff; font-size: 17px; font-weight: bold; margin: 0; white-space: nowrap;\">#TheGLMWay Evaluation</p>\n </td>\n <td width=\"180\" align=\"right\" style=\"padding: 22px 28px 22px 0;\">\n <img src=\"https://dbit.digitalcompass.agency/storage/v1/object/public/public-assets/GLM_completo.png\" \n alt=\"GLM Logo\" \n style=\"height: 60px; width: auto;\">\n </td>\n </tr>\n</table>\n <!-- Body -->\n <div style=\"padding: 24px 28px;\">\n <p style=\"color: #555555; font-size: 15px; margin: 0 0 16px;\">\n Hi <strong style=\"color: #111111;\">{{ $json.primerNombre }}</strong>,\n </p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">\n Thank you for taking part in the <strong>#TheGLMWay</strong> session!</p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 20px;\">\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 </p>\n <!-- Encuesta -->\n <div style=\"background-color: #f9f9f9; border-radius: 8px; border: 1px solid #e0e0e0; padding: 18px 22px; margin-bottom: 22px;\">\n <div style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 10px;\">\n <img src=\"https://www.gstatic.com/images/branding/product/2x/forms_48dp.png\" alt=\"Google Forms\" width=\"20\" style=\"vertical-align: middle;\">\n <p style=\"font-size: 16px; font-weight: bold; color: #111111; margin: 0; display: inline-block; vertical-align: middle; margin-left: 8px;\">#TheGLMWay Evaluation</p>\n </div>\n \n <a href=\"https://docs.google.com/forms/d/e/1FAIpQLSf61KpkDr2bRN7AnPBd7HNl8jYfLWLzr2geJON25UcG3GQ-MA/viewform?usp=header\"\n style=\"display: inline-block; background-color: #2d3748; color: #ffffff; font-size: 15px; font-weight: bold; padding: 9px 20px; border-radius: 6px; text-decoration: none;\">\n Complete evaluation\n </a>\n </div>\n </div>\n </div>\n</body>\n</html>",
"subject": "#TheGLMWay Quiz",
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Thank you for participating #TheGLMWay</title>\n</head>\n<body style=\"margin: 0; padding: 0; background-color: #f4f4f4; font-family: Roboto;\">\n <div style=\"max-width: 600px; margin: 40px auto; background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden;\">\n<!-- Header -->\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #2d3748;\">\n <tr>\n <td align=\"left\" style=\"padding: 22px 20px 22px 28px;\">\n <p style=\"color: #ffffff; font-size: 17px; font-weight: bold; margin: 0; white-space: nowrap;\">#TheGLMWay Quiz</p>\n </td>\n <td width=\"180\" align=\"right\" style=\"padding: 22px 28px 22px 0;\">\n <img src=\"https://dbit.digitalcompass.agency/storage/v1/object/public/public-assets/GLM_completo.png\" \n alt=\"GLM Logo\" \n style=\"height: 60px; width: auto;\">\n </td>\n </tr>\n</table>\n <!-- Body -->\n <div style=\"padding: 24px 28px;\">\n <p style=\"color: #555555; font-size: 15px; margin: 0 0 16px;\">\n Hi <strong style=\"color: #111111;\">{{ $json.primerNombre }}</strong>,\n </p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">\n Thank you for taking part in the <strong>#TheGLMWay</strong> session!</p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 20px;\">\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 </p>\n <!-- Encuesta -->\n <div style=\"background-color: #f9f9f9; border-radius: 8px; border: 1px solid #e0e0e0; padding: 18px 22px; margin-bottom: 22px;\">\n <div style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 10px;\">\n <img src=\"https://www.gstatic.com/images/branding/product/2x/forms_48dp.png\" alt=\"Google Forms\" width=\"20\" style=\"vertical-align: middle;\">\n <p style=\"font-size: 16px; font-weight: bold; color: #111111; margin: 0; display: inline-block; vertical-align: middle; margin-left: 8px;\">#TheGLMWay Quiz</p>\n </div>\n \n <a href=\"https://docs.google.com/forms/d/e/1FAIpQLSf61KpkDr2bRN7AnPBd7HNl8jYfLWLzr2geJON25UcG3GQ-MA/viewform?usp=header\"\n style=\"display: inline-block; background-color: #2d3748; color: #ffffff; font-size: 15px; font-weight: bold; padding: 9px 20px; border-radius: 6px; text-decoration: none;\">\n Complete quiz\n </a>\n </div>\n </div>\n </div>\n</body>\n</html>",
"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 += `<br><b>📍 ${pais} (${listaPais.length}):</b><br>`;\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'})<br>`;\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 => `<users/${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: `<b>Total inscritos:</b> ${totalParticipantes} personas<br>` + \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 += `<br><b>📍 ${pais} (${listaPais.length}):</b><br>`;\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'})<br>`;\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 => `<users/${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: `<b>Total inscritos:</b> ${totalParticipantes} personas<br>` + \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": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Thank you for participating #TheGLMWay</title>\n</head>\n<body style=\"margin: 0; padding: 0; background-color: #f4f4f4; font-family: Roboto;\">\n <div style=\"max-width: 600px; margin: 40px auto; background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden;\">\n<!-- Header -->\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #2d3748;\">\n <tr>\n <td align=\"left\" style=\"padding: 22px 20px 22px 28px;\">\n <p style=\"color: #ffffff; font-size: 17px; font-weight: bold; margin: 0; white-space: nowrap;\">#TheGLMWay Evaluation</p>\n </td>\n <td width=\"180\" align=\"right\" style=\"padding: 22px 28px 22px 0;\">\n <img src=\"https://dbit.digitalcompass.agency/storage/v1/object/public/public-assets/GLM_completo.png\" \n alt=\"GLM Logo\" \n style=\"height: 60px; width: auto;\">\n </td>\n </tr>\n</table>\n <!-- Body -->\n <div style=\"padding: 24px 28px;\">\n <p style=\"color: #555555; font-size: 15px; margin: 0 0 16px;\">\n Hi <strong style=\"color: #111111;\">{{ $json.primerNombre }}</strong>,\n </p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">\n Thank you for taking part in the <strong>#TheGLMWay</strong> session!</p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 20px;\">\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 </p>\n <!-- Encuesta -->\n <div style=\"background-color: #f9f9f9; border-radius: 8px; border: 1px solid #e0e0e0; padding: 18px 22px; margin-bottom: 22px;\">\n <div style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 10px;\">\n <img src=\"https://www.gstatic.com/images/branding/product/2x/forms_48dp.png\" alt=\"Google Forms\" width=\"20\" style=\"vertical-align: middle;\">\n <p style=\"font-size: 16px; font-weight: bold; color: #111111; margin: 0; display: inline-block; vertical-align: middle; margin-left: 8px;\">#TheGLMWay Evaluation</p>\n </div>\n \n <a href=\"https://docs.google.com/forms/d/e/1FAIpQLSf61KpkDr2bRN7AnPBd7HNl8jYfLWLzr2geJON25UcG3GQ-MA/viewform?usp=header\"\n style=\"display: inline-block; background-color: #2d3748; color: #ffffff; font-size: 15px; font-weight: bold; padding: 9px 20px; border-radius: 6px; text-decoration: none;\">\n Complete evaluation\n </a>\n </div>\n </div>\n </div>\n</body>\n</html>",
"subject": "#TheGLMWay Quiz",
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Thank you for participating #TheGLMWay</title>\n</head>\n<body style=\"margin: 0; padding: 0; background-color: #f4f4f4; font-family: Roboto;\">\n <div style=\"max-width: 600px; margin: 40px auto; background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden;\">\n<!-- Header -->\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #2d3748;\">\n <tr>\n <td align=\"left\" style=\"padding: 22px 20px 22px 28px;\">\n <p style=\"color: #ffffff; font-size: 17px; font-weight: bold; margin: 0; white-space: nowrap;\">#TheGLMWay Quiz</p>\n </td>\n <td width=\"180\" align=\"right\" style=\"padding: 22px 28px 22px 0;\">\n <img src=\"https://dbit.digitalcompass.agency/storage/v1/object/public/public-assets/GLM_completo.png\" \n alt=\"GLM Logo\" \n style=\"height: 60px; width: auto;\">\n </td>\n </tr>\n</table>\n <!-- Body -->\n <div style=\"padding: 24px 28px;\">\n <p style=\"color: #555555; font-size: 15px; margin: 0 0 16px;\">\n Hi <strong style=\"color: #111111;\">{{ $json.primerNombre }}</strong>,\n </p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">\n Thank you for taking part in the <strong>#TheGLMWay</strong> session!</p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.8; margin: 0 0 20px;\">\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 </p>\n <!-- Encuesta -->\n <div style=\"background-color: #f9f9f9; border-radius: 8px; border: 1px solid #e0e0e0; padding: 18px 22px; margin-bottom: 22px;\">\n <div style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 10px;\">\n <img src=\"https://www.gstatic.com/images/branding/product/2x/forms_48dp.png\" alt=\"Google Forms\" width=\"20\" style=\"vertical-align: middle;\">\n <p style=\"font-size: 16px; font-weight: bold; color: #111111; margin: 0; display: inline-block; vertical-align: middle; margin-left: 8px;\">#TheGLMWay Quiz</p>\n </div>\n \n <a href=\"https://docs.google.com/forms/d/e/1FAIpQLSf61KpkDr2bRN7AnPBd7HNl8jYfLWLzr2geJON25UcG3GQ-MA/viewform?usp=header\"\n style=\"display: inline-block; background-color: #2d3748; color: #ffffff; font-size: 15px; font-weight: bold; padding: 9px 20px; border-radius: 6px; text-decoration: none;\">\n Complete quiz\n </a>\n </div>\n </div>\n </div>\n</body>\n</html>",
"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 += `<br><b>📍 ${pais} (${listaPais.length}):</b><br>`;\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'})<br>`;\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 => `<users/${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: `<b>Total inscritos:</b> ${totalParticipantes} personas<br>` + \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 += `<br><b>📍 ${pais} (${listaPais.length}):</b><br>`;\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'})<br>`;\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 => `<users/${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: `<b>Total inscritos:</b> ${totalParticipantes} personas<br>` + \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"
}