From 34bcb132f3f19d31c7993a6c47eff097cb81c4c3 Mon Sep 17 00:00:00 2001 From: Automacao GLPI Date: Thu, 1 Oct 2026 14:23:59 -0300 Subject: [PATCH] chore: remove superseded legacy workflows Co-Authored-By: Claude Sonnet 5.5 --- Resumo Diario GLPI - MVP.n8n.json | 133 ------- Resumo Diario GLPI - Real Slack.n8n.json | 444 ----------------------- 2 files changed, 577 deletions(-) delete mode 100644 Resumo Diario GLPI - MVP.n8n.json delete mode 100644 Resumo Diario GLPI - Real Slack.n8n.json diff --git a/Resumo Diario GLPI - MVP.n8n.json b/Resumo Diario GLPI - MVP.n8n.json deleted file mode 100644 index 9186b2d..0000000 --- a/Resumo Diario GLPI - MVP.n8n.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "name": "Resumo Diário GLPI - MVP", - "nodes": [ - { - "parameters": {}, - "id": "manual-trigger", - "name": "Manual Trigger", - "type": "n8n-nodes-base.manualTrigger", - "typeVersion": 1, - "position": [ - 260, - 300 - ] - }, - { - "parameters": { - "assignments": { - "assignments": [ - { - "id": "chamados-simulados", - "name": "chamados", - "type": "array", - "value": "=[{\"id\":101,\"cliente\":\"Cliente A\",\"categoria\":\"VPN\",\"status\":\"Aberto\",\"prioridade\":\"Média\",\"data_abertura\":\"2026-07-04 08:20\",\"data_fechamento\":null},{\"id\":102,\"cliente\":\"Cliente B\",\"categoria\":\"Impressora\",\"status\":\"Fechado\",\"prioridade\":\"Baixa\",\"data_abertura\":\"2026-07-04 09:10\",\"data_fechamento\":\"2026-07-04 10:30\"},{\"id\":103,\"cliente\":\"Cliente A\",\"categoria\":\"VPN\",\"status\":\"Pendente\",\"prioridade\":\"Alta\",\"data_abertura\":\"2026-07-04 11:00\",\"data_fechamento\":null},{\"id\":104,\"cliente\":\"Cliente C\",\"categoria\":\"Acesso remoto\",\"status\":\"Fechado\",\"prioridade\":\"Média\",\"data_abertura\":\"2026-07-04 13:45\",\"data_fechamento\":\"2026-07-04 15:00\"},{\"id\":105,\"cliente\":\"Cliente A\",\"categoria\":\"VPN\",\"status\":\"Aberto\",\"prioridade\":\"Alta\",\"data_abertura\":\"2026-07-04 16:10\",\"data_fechamento\":null}]" - } - ] - }, - "options": {} - }, - "id": "set-dados-simulados", - "name": "Set - Dados simulados", - "type": "n8n-nodes-base.set", - "typeVersion": 3.4, - "position": [ - 500, - 300 - ] - }, - { - "parameters": { - "jsCode": "const chamados = $input.first().json.chamados || [];\n\nfunction contarPorCampo(lista, campo) {\n return lista.reduce((acc, item) => {\n const valor = item[campo] || 'Não informado';\n acc[valor] = (acc[valor] || 0) + 1;\n return acc;\n }, {});\n}\n\nfunction ordenarContagem(objeto) {\n return Object.entries(objeto)\n .sort((a, b) => b[1] - a[1])\n .reduce((acc, [chave, valor]) => {\n acc[chave] = valor;\n return acc;\n }, {});\n}\n\nconst statusAbertosOuPendentes = ['Aberto', 'Novo', 'Processando', 'Pendente'];\nconst statusFechados = ['Fechado', 'Solucionado', 'Encerrado'];\nconst prioridadesAltas = ['Alta', 'Muito alta', 'Crítica'];\n\nconst totalChamados = chamados.length;\n\nconst abertosOuPendentes = chamados.filter(c =>\n statusAbertosOuPendentes.includes(c.status)\n).length;\n\nconst fechados = chamados.filter(c =>\n statusFechados.includes(c.status)\n).length;\n\nconst pendentes = chamados.filter(c =>\n !statusFechados.includes(c.status)\n).length;\n\nconst altaPrioridadePendentes = chamados.filter(c =>\n prioridadesAltas.includes(c.prioridade) &&\n !statusFechados.includes(c.status)\n).length;\n\nconst porCategoria = ordenarContagem(contarPorCampo(chamados, 'categoria'));\nconst porCliente = ordenarContagem(contarPorCampo(chamados, 'cliente'));\nconst porPrioridade = ordenarContagem(contarPorCampo(chamados, 'prioridade'));\nconst porStatus = ordenarContagem(contarPorCampo(chamados, 'status'));\n\nreturn [\n {\n json: {\n data_relatorio: new Date().toISOString(),\n total_chamados: totalChamados,\n chamados_abertos_ou_pendentes: abertosOuPendentes,\n chamados_fechados: fechados,\n chamados_pendentes: pendentes,\n chamados_alta_prioridade_pendentes: altaPrioridadePendentes,\n chamados_por_categoria: porCategoria,\n chamados_por_cliente: porCliente,\n chamados_por_prioridade: porPrioridade,\n chamados_por_status: porStatus,\n chamados_detalhados: chamados\n }\n }\n];" - }, - "id": "code-calcular-indicadores", - "name": "Code - Calcular indicadores", - "type": "n8n-nodes-base.code", - "typeVersion": 2, - "position": [ - 760, - 300 - ] - }, - { - "parameters": { - "resource": "chat", - "operation": "message", - "model": "gpt-4o-mini", - "messages": { - "values": [ - { - "role": "system", - "content": "Você é um analista de infraestrutura gerando um resumo diário de suporte para a equipe técnica. Use apenas os dados fornecidos. Não invente números, clientes, categorias ou chamados. Gere um resumo em português do Brasil, objetivo, profissional e fácil de entender." - }, - { - "role": "user", - "content": "Estrutura obrigatória:\n\n1. Resumo geral do dia\n2. Chamados abertos, fechados e pendentes\n3. Categorias mais recorrentes\n4. Clientes com maior volume\n5. Chamados de maior atenção\n6. Recomendações para o próximo dia\n\nDados do dia:\n\n{{ JSON.stringify($json) }}\n\nO resultado deve ser algo pronto para enviar no grupo, e-mail ou relatório." - } - ] - }, - "options": { - "temperature": 0.2 - } - }, - "id": "openai-gerar-resumo", - "name": "OpenAI - Gerar resumo", - "type": "n8n-nodes-base.openAi", - "typeVersion": 1, - "position": [ - 1020, - 300 - ], - "credentials": { - "openAiApi": { - "id": "", - "name": "OpenAI account" - } - } - } - ], - "pinData": {}, - "connections": { - "Manual Trigger": { - "main": [ - [ - { - "node": "Set - Dados simulados", - "type": "main", - "index": 0 - } - ] - ] - }, - "Set - Dados simulados": { - "main": [ - [ - { - "node": "Code - Calcular indicadores", - "type": "main", - "index": 0 - } - ] - ] - }, - "Code - Calcular indicadores": { - "main": [ - [ - { - "node": "OpenAI - Gerar resumo", - "type": "main", - "index": 0 - } - ] - ] - } - }, - "active": false, - "settings": { - "executionOrder": "v1" - }, - "versionId": "", - "meta": { - "templateCredsSetupCompleted": false - }, - "tags": [] -} diff --git a/Resumo Diario GLPI - Real Slack.n8n.json b/Resumo Diario GLPI - Real Slack.n8n.json deleted file mode 100644 index c340d8a..0000000 --- a/Resumo Diario GLPI - Real Slack.n8n.json +++ /dev/null @@ -1,444 +0,0 @@ -{ - "name": "Resumo Diário GLPI - Real Slack", - "nodes": [ - { - "parameters": {}, - "id": "manual-trigger-real", - "name": "Manual Trigger", - "type": "n8n-nodes-base.manualTrigger", - "typeVersion": 1, - "position": [ - 180, - 320 - ] - }, - { - "parameters": { - "assignments": { - "assignments": [ - { - "id": "glpi-url", - "name": "glpi_url", - "type": "string", - "value": "https://SEU-GLPI-AQUI" - }, - { - "id": "glpi-app-token", - "name": "glpi_app_token", - "type": "string", - "value": "COLE_SEU_APP_TOKEN_AQUI" - }, - { - "id": "glpi-user-token", - "name": "glpi_user_token", - "type": "string", - "value": "COLE_SEU_USER_TOKEN_AQUI" - }, - { - "id": "slack-webhook-url", - "name": "slack_webhook_url", - "type": "string", - "value": "https://hooks.slack.com/services/SEU/WEBHOOK/AQUI" - }, - { - "id": "range-tickets", - "name": "range_tickets", - "type": "string", - "value": "0-999" - }, - { - "id": "data-alvo", - "name": "data_alvo", - "type": "string", - "value": "" - }, - { - "id": "openai-api-key", - "name": "openai_api_key", - "type": "string", - "value": "COLE_SUA_OPENAI_API_KEY_AQUI" - }, - { - "id": "openai-model", - "name": "openai_model", - "type": "string", - "value": "gpt-5.5" - }, - { - "id": "page-size", - "name": "page_size", - "type": "number", - "value": 1000 - }, - { - "id": "page-count", - "name": "page_count", - "type": "number", - "value": 2 - } - ] - }, - "options": {} - }, - "id": "config-glpi-slack", - "name": "Config - GLPI e Slack", - "type": "n8n-nodes-base.set", - "typeVersion": 3.4, - "position": [ - 420, - 320 - ] - }, - { - "parameters": { - "url": "={{ $json.glpi_url.replace(/\\/$/, '') + '/apirest.php/initSession' }}", - "sendHeaders": true, - "headerParameters": { - "parameters": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "App-Token", - "value": "={{ $json.glpi_app_token }}" - }, - { - "name": "Authorization", - "value": "={{ 'user_token ' + $json.glpi_user_token }}" - } - ] - }, - "options": {} - }, - "id": "http-init-session", - "name": "HTTP - GLPI initSession", - "type": "n8n-nodes-base.httpRequest", - "typeVersion": 4.2, - "position": [ - 680, - 320 - ] - }, - { - "parameters": { - "jsCode": "const config = $('Config - GLPI e Slack').first().json;\n\nconst pageSize = Number(config.page_size || 1000);\nconst pageCount = Number(config.page_count || 2);\nconst sorts = ['id', 'date_mod'];\nconst items = [];\n\nfor (const sort of sorts) {\n for (let page = 0; page < pageCount; page++) {\n const start = page * pageSize;\n const end = start + pageSize - 1;\n\n items.push({\n json: {\n ...config,\n sort_field: sort,\n range_tickets: `${start}-${end}`\n }\n });\n }\n}\n\nreturn items;" - }, - "id": "code-gerar-paginas-glpi", - "name": "Code - Gerar paginas GLPI", - "type": "n8n-nodes-base.code", - "typeVersion": 2, - "position": [ - 820, - 320 - ] - }, - { - "parameters": { - "url": "={{ $('Config - GLPI e Slack').first().json.glpi_url.replace(/\\/$/, '') + '/apirest.php/Ticket/' }}", - "sendQuery": true, - "queryParameters": { - "parameters": [ - { - "name": "range", - "value": "={{ $json.range_tickets }}" - }, - { - "name": "sort", - "value": "={{ $json.sort_field }}" - }, - { - "name": "order", - "value": "DESC" - }, - { - "name": "expand_dropdowns", - "value": "true" - } - ] - }, - "sendHeaders": true, - "headerParameters": { - "parameters": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Session-Token", - "value": "={{ $('HTTP - GLPI initSession').first().json.session_token }}" - }, - { - "name": "App-Token", - "value": "={{ $('Config - GLPI e Slack').first().json.glpi_app_token }}" - } - ] - }, - "options": {} - }, - "id": "http-buscar-tickets", - "name": "HTTP - GLPI buscar tickets", - "type": "n8n-nodes-base.httpRequest", - "typeVersion": 4.2, - "position": [ - 1060, - 320 - ], - "continueOnFail": true - }, - { - "parameters": { - "jsCode": "const inputItems = $input.all();\n\nconst statusMap = {\n 1: 'Novo',\n 2: 'Processando',\n 3: 'Planejado',\n 4: 'Pendente',\n 5: 'Solucionado',\n 6: 'Fechado'\n};\n\nconst prioridadeMap = {\n 1: 'Muito baixa',\n 2: 'Baixa',\n 3: 'Média',\n 4: 'Alta',\n 5: 'Muito alta',\n 6: 'Crítica'\n};\n\nfunction coletarTickets(items) {\n const porId = new Map();\n let totalRecebido = 0;\n\n for (const item of items) {\n const data = item.json;\n let lista = [];\n\n if (Array.isArray(data)) {\n lista = data;\n } else if (Array.isArray(data.data)) {\n lista = data.data;\n } else if (data.id) {\n lista = [data];\n }\n\n totalRecebido += lista.length;\n\n for (const ticket of lista) {\n if (ticket.id === undefined || ticket.id === null) continue;\n porId.set(String(ticket.id), ticket);\n }\n }\n\n return {\n tickets: [...porId.values()],\n totalRecebido,\n totalUnico: porId.size\n };\n}\n\nfunction limparTexto(valor) {\n return String(valor)\n .replace(/>/g, '>')\n .replace(/>/g, '>')\n .replace(/</g, '<')\n .replace(/</g, '<')\n .replace(/&/g, '&')\n .trim();\n}\n\nfunction textoValor(valor, mapa) {\n if (valor === null || valor === undefined || valor === '') return 'Não informado';\n return limparTexto(mapa[valor] || mapa[String(valor)] || valor);\n}\n\nfunction extrairNome(valor) {\n if (valor === null || valor === undefined || valor === '') return 'Não informado';\n if (typeof valor === 'object') return limparTexto(valor.name || valor.completename || valor.id || 'Não informado');\n return limparTexto(valor);\n}\n\nfunction normalizarDataAlvo(valor) {\n const texto = String(valor || '').trim();\n\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(texto)) return texto;\n\n const matchPtBr = texto.match(/^(\\d{2})\\/(\\d{2})\\/(\\d{2}|\\d{4})$/);\n if (matchPtBr) {\n const [, dia, mes, ano] = matchPtBr;\n const anoCompleto = ano.length === 2 ? `20${ano}` : ano;\n return `${anoCompleto}-${mes}-${dia}`;\n }\n\n return new Date().toISOString().slice(0, 10);\n}\n\nconst coleta = coletarTickets(inputItems);\nconst config = $('Config - GLPI e Slack').first().json;\nconst dataAlvo = normalizarDataAlvo(config.data_alvo);\n\nconst chamadosDoPeriodo = coleta.tickets.filter(ticket => {\n const dataAbertura = ticket.date_creation || ticket.date || ticket.data_abertura || '';\n const dataSolucao = ticket.solvedate || ticket.closedate || ticket.data_fechamento || '';\n\n return String(dataAbertura).startsWith(dataAlvo) || String(dataSolucao).startsWith(dataAlvo);\n});\n\nconst chamados = chamadosDoPeriodo.map(ticket => {\n const dataAbertura = ticket.date_creation || ticket.date || ticket.data_abertura || '';\n const dataFechamento = ticket.solvedate || ticket.closedate || ticket.data_fechamento || '';\n\n return {\n id: ticket.id,\n titulo: extrairNome(ticket.name || ticket.titulo || 'Sem título'),\n status: textoValor(ticket.status, statusMap),\n prioridade: textoValor(ticket.priority, prioridadeMap),\n categoria: extrairNome(ticket.itilcategories_id || ticket.categoria),\n cliente: extrairNome(ticket.entities_id || ticket.cliente),\n data_abertura: dataAbertura || null,\n data_fechamento: dataFechamento || null,\n aberto_no_periodo: String(dataAbertura).startsWith(dataAlvo),\n fechado_no_periodo: String(dataFechamento).startsWith(dataAlvo)\n };\n});\n\nreturn [\n {\n json: {\n data_filtro: dataAlvo,\n paginas_consultadas: inputItems.length,\n total_recebido_glpi: coleta.totalRecebido,\n total_retornado_glpi: coleta.totalUnico,\n chamados\n }\n }\n];" - }, - "id": "code-filtrar-hoje", - "name": "Code - Filtrar chamados de hoje", - "type": "n8n-nodes-base.code", - "typeVersion": 2, - "position": [ - 1300, - 320 - ] - }, - { - "parameters": { - "jsCode": "const chamados = $input.first().json.chamados || [];\n\nfunction contarPorCampo(lista, campo) {\n return lista.reduce((acc, item) => {\n const valor = item[campo] || 'Não informado';\n acc[valor] = (acc[valor] || 0) + 1;\n return acc;\n }, {});\n}\n\nfunction ordenarContagem(objeto) {\n return Object.entries(objeto)\n .sort((a, b) => b[1] - a[1])\n .reduce((acc, [chave, valor]) => {\n acc[chave] = valor;\n return acc;\n }, {});\n}\n\nconst statusFechados = ['Fechado', 'Solucionado', 'Encerrado'];\nconst prioridadesAltas = ['Alta', 'Muito alta', 'Crítica'];\n\nconst chamadosAbertosNoPeriodo = chamados.filter(c => c.aberto_no_periodo);\nconst chamadosFechadosNoPeriodo = chamados.filter(c => c.fechado_no_periodo);\nconst chamadosPendentes = chamados.filter(c => !statusFechados.includes(c.status));\n\nconst altaPrioridadePendentes = chamadosPendentes.filter(c =>\n prioridadesAltas.includes(c.prioridade)\n).length;\n\nconst porCategoria = ordenarContagem(contarPorCampo(chamados, 'categoria'));\nconst porCliente = ordenarContagem(contarPorCampo(chamados, 'cliente'));\nconst porPrioridade = ordenarContagem(contarPorCampo(chamados, 'prioridade'));\nconst porStatus = ordenarContagem(contarPorCampo(chamados, 'status'));\n\nreturn [\n {\n json: {\n data_relatorio: new Date().toISOString(),\n data_filtro: $input.first().json.data_filtro,\n paginas_consultadas: $input.first().json.paginas_consultadas,\n total_recebido_glpi: $input.first().json.total_recebido_glpi,\n total_retornado_glpi: $input.first().json.total_retornado_glpi,\n total_chamados: chamados.length,\n chamados_abertos_hoje: chamadosAbertosNoPeriodo.length,\n chamados_fechados_hoje: chamadosFechadosNoPeriodo.length,\n chamados_abertos_ou_pendentes: chamadosPendentes.length,\n chamados_fechados: chamadosFechadosNoPeriodo.length,\n chamados_pendentes: chamadosPendentes.length,\n chamados_alta_prioridade_pendentes: altaPrioridadePendentes,\n chamados_por_categoria: porCategoria,\n chamados_por_cliente: porCliente,\n chamados_por_prioridade: porPrioridade,\n chamados_por_status: porStatus,\n chamados_detalhados: chamados\n }\n }\n];" - }, - "id": "code-calcular-real", - "name": "Code - Calcular indicadores", - "type": "n8n-nodes-base.code", - "typeVersion": 2, - "position": [ - 1540, - 320 - ] - }, - { - "parameters": { - "method": "POST", - "url": "https://api.openai.com/v1/chat/completions", - "sendHeaders": true, - "headerParameters": { - "parameters": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Authorization", - "value": "={{ 'Bearer ' + $('Config - GLPI e Slack').first().json.openai_api_key }}" - } - ] - }, - "sendBody": true, - "contentType": "json", - "specifyBody": "json", - "jsonBody": "={{ { model: $('Config - GLPI e Slack').first().json.openai_model || 'gpt-5.5', temperature: 0.2, max_tokens: 700, messages: [ { role: 'system', content: 'Você é um analista de infraestrutura gerando um resumo diário de suporte para a equipe técnica. Use apenas os dados fornecidos. Não invente números, clientes, categorias ou chamados. Gere um resumo em português do Brasil, objetivo, profissional e fácil de entender para envio no Slack.' }, { role: 'user', content: 'Estrutura obrigatória:\\n\\n1. Resumo geral do dia\\n2. Chamados abertos, fechados e pendentes\\n3. Categorias mais recorrentes\\n4. Clientes com maior volume\\n5. Chamados de maior atenção\\n6. Recomendações para o próximo dia\\n\\nDados do dia:\\n\\n' + JSON.stringify($json) + '\\n\\nO resultado deve estar pronto para enviar em um canal do Slack.' } ] } }}", - "options": {} - }, - "id": "openai-gerar-resumo-real", - "name": "OpenAI - Gerar resumo", - "type": "n8n-nodes-base.httpRequest", - "typeVersion": 4.2, - "position": [ - 1780, - 320 - ], - "continueOnFail": true, - "retryOnFail": true, - "maxTries": 3, - "waitBetweenTries": 30000 - }, - { - "parameters": { - "jsCode": "const data = $input.first().json;\n\nconst textoIa =\n data.choices?.[0]?.message?.content ||\n data.message?.content ||\n data.text ||\n data.output ||\n data.content;\n\nif (textoIa && !String(textoIa).includes('Welcome to the OpenAI API')) {\n return [\n {\n json: {\n text: textoIa\n }\n }\n ];\n}\n\nconst indicadores = $('Code - Calcular indicadores').first().json;\n\nfunction formatarRanking(titulo, dados, sufixo = '') {\n const linhas = Object.entries(dados || {})\n .slice(0, 5)\n .map(([nome, total]) => `- ${nome}: ${total}${sufixo}`);\n\n return [`*${titulo}*`, ...(linhas.length ? linhas : ['- Sem registros'])].join('\\n');\n}\n\nconst erroOpenAi = data.error?.message || data.message || 'OpenAI indisponível ou com limite de uso no momento.';\n\nconst texto = [\n '*Resumo diário do suporte*',\n '',\n `Data do relatório: ${indicadores.data_filtro || 'Não informada'}`,\n '',\n '*Resumo geral*',\n `- Chamados abertos no dia: ${indicadores.chamados_abertos_hoje}`,\n `- Chamados fechados no dia: ${indicadores.chamados_fechados_hoje}`,\n `- Pendentes envolvidos no período: ${indicadores.chamados_pendentes}`,\n `- Alta prioridade ainda pendentes: ${indicadores.chamados_alta_prioridade_pendentes}`,\n '',\n formatarRanking('Categorias mais recorrentes', indicadores.chamados_por_categoria),\n '',\n formatarRanking('Clientes com maior volume', indicadores.chamados_por_cliente, ' chamados'),\n '',\n '*Diagnóstico da coleta*',\n `- Páginas consultadas: ${indicadores.paginas_consultadas}`,\n `- Registros recebidos do GLPI: ${indicadores.total_recebido_glpi}`,\n `- Tickets únicos analisados: ${indicadores.total_retornado_glpi}`,\n '',\n '*Pontos de atenção*',\n indicadores.chamados_alta_prioridade_pendentes > 0\n ? `- Existem ${indicadores.chamados_alta_prioridade_pendentes} chamados de alta prioridade ainda pendentes.`\n : '- Não há chamados de alta prioridade pendentes nos dados filtrados.',\n '',\n '*Recomendação para amanhã*',\n '- Priorizar chamados pendentes e de maior prioridade.',\n '- Verificar categorias e clientes com maior recorrência.',\n '',\n `_Resumo gerado sem IA porque a OpenAI retornou erro: ${erroOpenAi}_`\n].join('\\n');\n\nreturn [\n {\n json: {\n text: texto\n }\n }\n];" - }, - "id": "code-preparar-slack", - "name": "Code - Preparar mensagem Slack", - "type": "n8n-nodes-base.code", - "typeVersion": 2, - "position": [ - 2020, - 320 - ] - }, - { - "parameters": { - "method": "POST", - "url": "={{ $('Config - GLPI e Slack').first().json.slack_webhook_url }}", - "sendBody": true, - "contentType": "json", - "specifyBody": "keypair", - "bodyParameters": { - "parameters": [ - { - "name": "text", - "value": "={{ $json.text }}" - } - ] - }, - "options": {} - }, - "id": "http-slack", - "name": "HTTP - Slack enviar mensagem", - "type": "n8n-nodes-base.httpRequest", - "typeVersion": 4.2, - "position": [ - 2260, - 320 - ] - }, - { - "parameters": { - "url": "={{ $('Config - GLPI e Slack').first().json.glpi_url.replace(/\\/$/, '') + '/apirest.php/killSession' }}", - "sendHeaders": true, - "headerParameters": { - "parameters": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Session-Token", - "value": "={{ $('HTTP - GLPI initSession').first().json.session_token }}" - }, - { - "name": "App-Token", - "value": "={{ $('Config - GLPI e Slack').first().json.glpi_app_token }}" - } - ] - }, - "options": {} - }, - "id": "http-kill-session", - "name": "HTTP - GLPI killSession", - "type": "n8n-nodes-base.httpRequest", - "typeVersion": 4.2, - "position": [ - 2500, - 320 - ] - } - ], - "pinData": {}, - "connections": { - "Manual Trigger": { - "main": [ - [ - { - "node": "Config - GLPI e Slack", - "type": "main", - "index": 0 - } - ] - ] - }, - "Config - GLPI e Slack": { - "main": [ - [ - { - "node": "HTTP - GLPI initSession", - "type": "main", - "index": 0 - } - ] - ] - }, - "HTTP - GLPI initSession": { - "main": [ - [ - { - "node": "Code - Gerar paginas GLPI", - "type": "main", - "index": 0 - } - ] - ] - }, - "HTTP - GLPI buscar tickets": { - "main": [ - [ - { - "node": "Code - Filtrar chamados de hoje", - "type": "main", - "index": 0 - } - ] - ] - }, - "Code - Filtrar chamados de hoje": { - "main": [ - [ - { - "node": "Code - Calcular indicadores", - "type": "main", - "index": 0 - } - ] - ] - }, - "Code - Calcular indicadores": { - "main": [ - [ - { - "node": "OpenAI - Gerar resumo", - "type": "main", - "index": 0 - } - ] - ] - }, - "OpenAI - Gerar resumo": { - "main": [ - [ - { - "node": "Code - Preparar mensagem Slack", - "type": "main", - "index": 0 - } - ] - ] - }, - "Code - Preparar mensagem Slack": { - "main": [ - [ - { - "node": "HTTP - Slack enviar mensagem", - "type": "main", - "index": 0 - } - ] - ] - }, - "HTTP - Slack enviar mensagem": { - "main": [ - [ - { - "node": "HTTP - GLPI killSession", - "type": "main", - "index": 0 - } - ] - ] - }, - "Code - Gerar paginas GLPI": { - "main": [ - [ - { - "node": "HTTP - GLPI buscar tickets", - "type": "main", - "index": 0 - } - ] - ] - } - }, - "active": false, - "settings": { - "executionOrder": "v1" - }, - "versionId": "", - "meta": { - "templateCredsSetupCompleted": false - }, - "tags": [] -}