Files
SLACK_COORD_RELATORIO/coordenador/n8n/nodes/build-sql-legado.node.js
T
Gustavo Santos e322cec92b chore: import coordenador (subtree)
git-subtree-dir: coordenador
git-subtree-mainline: facbe2e340
git-subtree-split: ce7af94d55
2026-10-01 14:25:55 -03:00

12 lines
412 B
JavaScript

const config = $('Config - Coordenador GLPI v2').first().json;
const glpiBaseUrl = String(config.glpi_base_url || '').replace(/\/$/, '').replace(/'/g, "''");
const queryTemplate = /* __SQL_LEGADO_V1_VERBATIM__ */;
const query = queryTemplate
.replaceAll('{DIAS_SEM_INTERACAO_ALERTA}', '2')
.replaceAll('{HORAS_SLA_RISCO}', '8')
.replaceAll('{GLPI_BASE_URL}', glpiBaseUrl);
return [{ json: { query } }];