AutomationFlowsWeb Scraping › Engajamento - Resumo Semanal Para Coordenador

Engajamento - Resumo Semanal Para Coordenador

Engajamento - Resumo semanal para coordenador. Uses httpRequest. Scheduled trigger; 6 nodes.

Cron / scheduled trigger★★★★☆ complexity6 nodesHTTP Request
Web Scraping Trigger: Cron / scheduled Nodes: 6 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Engajamento - Resumo semanal para coordenador",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 8,
              "triggerAtMinute": 0
            }
          ]
        }
      },
      "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "name": "Cron segunda 08h",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "={{$env.REDE_GUTI_API_URL}}/automation/weekly-leaderboard",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        },
        "options": {
          "timeout": 10000,
          "response": {
            "response": {
              "neverError": false,
              "fullResponse": false
            }
          }
        }
      },
      "id": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
      "name": "GET leaderboard semanal",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        480,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "stopWorkflow"
    },
    {
      "parameters": {
        "jsCode": "const raw = $input.item.json;\nconst rows = Array.isArray(raw) ? raw : (raw.data ?? raw.items ?? []);\n\nif (!Array.isArray(rows) || rows.length === 0) {\n  return [{\n    json: {\n      skip: true,\n      message: 'Resumo semanal da rede:\\nNenhuma indica\u00e7\u00e3o registrada nesta semana.',\n      total: 0,\n    }\n  }];\n}\n\nconst top = rows.slice(0, 10);\n\nconst lines = top.map((r, idx) => {\n  const nome = (r.user && r.user.name) || r.userName || 'L\u00edder sem nome';\n  const qtd = r.weeklyIndications ?? r.weeklyPoints ?? 0;\n  return `${idx + 1}. ${nome} - ${qtd} indica\u00e7\u00f5es`;\n});\n\nconst total = top.reduce((acc, r) => acc + (r.weeklyIndications ?? r.weeklyPoints ?? 0), 0);\n\nconst message = `Resumo semanal da rede:\\n${lines.join('\\n')}\\nTotal da semana: ${total} indica\u00e7\u00f5es.`;\n\nconst phone = ($env.COORDENADOR_PHONE || '').toString().replace(/\\D/g, '');\nif (!phone) {\n  throw new Error('COORDENADOR_PHONE n\u00e3o configurado nas vari\u00e1veis de ambiente.');\n}\n\nreturn [{\n  json: {\n    skip: false,\n    phone,\n    message,\n    total,\n    leadersCount: top.length,\n  }\n}];"
      },
      "id": "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
      "name": "Montar resumo",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{$env.WHATSAPP_API_URL}}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"number\": \"{{$json.phone}}\",\n  \"text\": {{JSON.stringify($json.message)}}\n}",
        "options": {
          "timeout": 10000,
          "response": {
            "response": {
              "neverError": true,
              "fullResponse": true
            }
          }
        }
      },
      "id": "4d5e6f7a-8b9c-0d1e-2f3a-4b5c6d7e8f90",
      "name": "Enviar WhatsApp coordenador",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        960,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "jsCode": "const status = $input.item.json.statusCode ?? 0;\nconst ok = status >= 200 && status < 300;\nconsole.log('[resumo-semanal] dispatch status', status, 'ok=', ok);\nreturn [{ json: { ok, status, total: $('Montar resumo').item.json.total } }];"
      },
      "id": "5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9012",
      "name": "Log sucesso",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1200,
        220
      ]
    },
    {
      "parameters": {
        "jsCode": "const err = $input.item.json;\nconsole.error('[resumo-semanal] falha ao enviar WhatsApp', err.error || err.message || err);\nreturn [{ json: { ok: false, error: 'whatsapp_dispatch_failed' } }];"
      },
      "id": "6f7a8b9c-0d1e-2f3a-4b5c-6d7e8f901234",
      "name": "Log erro",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1200,
        380
      ]
    }
  ],
  "connections": {
    "Cron segunda 08h": {
      "main": [
        [
          {
            "node": "GET leaderboard semanal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET leaderboard semanal": {
      "main": [
        [
          {
            "node": "Montar resumo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Montar resumo": {
      "main": [
        [
          {
            "node": "Enviar WhatsApp coordenador",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enviar WhatsApp coordenador": {
      "main": [
        [
          {
            "node": "Log sucesso",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log erro",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "Toda segunda \u00e0s 08h, busca GET /automation/weekly-leaderboard da Rede Guti API e envia resumo dos 10 l\u00edderes mais ativos via WhatsApp para o coordenador. Vari\u00e1veis de ambiente: REDE_GUTI_API_URL, WHATSAPP_API_URL, COORDENADOR_PHONE. Credentials: 'Rede Guti Automation Token' (Bearer = AUTOMATION_API_TOKEN do backend) e 'WhatsApp API Header Auth'."
  },
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Engajamento - Resumo semanal para coordenador. Uses httpRequest. Scheduled trigger; 6 nodes.

Source: https://github.com/kafune/rede-guti/blob/996e35c68c5cd75d95923b77f6a29af4732edc5e/automations/n8n/engajamento-resumo-semanal-coordenador.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

Birthday Automation - Production (Fixed). Uses stopAndError, httpRequest, emailSend, bannerbear. Scheduled trigger; 86 nodes.

Stop And Error, HTTP Request, Email Send +1
Web Scraping

This template runs two scheduled workflows to govern Microsoft Entra ID (Azure AD) guest accounts by detecting stale users via Microsoft Graph, staging deletions in SharePoint with a 72-hour window, n

Microsoft SharePoint, Microsoft Teams, Microsoft Entra +1
Web Scraping

Jira-Allure-Auto-Qa. Uses httpRequest, jira. Scheduled trigger; 68 nodes.

HTTP Request, Jira
Web Scraping

Spotify-Sync-Surrealdb-V1. Uses httpRequest, n8n-nodes-surrealdb, spotify. Scheduled trigger; 62 nodes.

HTTP Request, N8N Nodes Surrealdb, Spotify
Web Scraping

As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o

HTTP Request, n8n, N8N Trigger +1