AutomationFlowsEmail & Gmail › Sige — Proposta Aprovada (email + Whatsapp via Evolution Api)

Sige — Proposta Aprovada (email + Whatsapp via Evolution Api)

SIGE — Proposta Aprovada (Email + WhatsApp via Evolution API). Uses emailSend, httpRequest. Webhook trigger; 7 nodes.

Webhook trigger★★★★☆ complexity7 nodesEmail SendHTTP Request
Email & Gmail Trigger: Webhook Nodes: 7 Complexity: ★★★★☆ Added:

This workflow follows the Emailsend → HTTP Request recipe pattern — see all workflows that pair these two integrations.

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": "SIGE \u2014 Proposta Aprovada (Email + WhatsApp via Evolution API)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "sige-proposta-aprovada",
        "responseMode": "onReceived",
        "responseData": "allEntries",
        "options": {
          "rawBody": true
        }
      },
      "id": "webhook-in",
      "name": "Webhook (POST)",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "// Valida\u00e7\u00e3o HMAC-SHA256 (X-Signature) \u2014 segredo em $env.N8N_WEBHOOK_SECRET.\nconst crypto = require('crypto');\nconst secret = $env.N8N_WEBHOOK_SECRET || '';\nconst given  = ($input.first().json.headers || {})['x-signature'] || '';\nlet body = $input.first().json.body ? JSON.stringify($input.first().json.body) : '';\ntry {\n  if ($input.first().binary && $input.first().binary.data) {\n    body = Buffer.from($input.first().binary.data, 'base64').toString('utf8');\n  }\n} catch (e) {}\nif (!secret) return [{ json: { ...$input.first().json, _signature_skipped: 'no_secret' } }];\nconst expected = crypto.createHmac('sha256', secret).update(body, 'utf8').digest('hex');\nconst ok = expected.length === given.length && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(given));\nif (!ok) throw new Error('Assinatura HMAC inv\u00e1lida (X-Signature n\u00e3o confere)');\nreturn [{ json: { ...$input.first().json, _signature_ok: true } }];"
      },
      "id": "validate-hmac",
      "name": "Validar Assinatura HMAC",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "// Normaliza payload do evento `proposta.aprovada`.\nconst body = $input.first().json.body || $input.first().json;\nconst d = (body && body.data) || {};\nreturn [{\n  json: {\n    cliente_nome:     d.cliente_nome     || 'Cliente',\n    cliente_email:    d.cliente_email    || '',\n    cliente_telefone: d.cliente_telefone || '',\n    proposta_numero:  d.proposta_numero  || '',\n    proposta_versao:  d.proposta_versao  || 1,\n    valor_total:      d.valor_total      || 0,\n    aprovada_por:     d.aprovada_por     || 'admin',\n    obra_id:          d.obra_id          || null,\n    portal_url:       d.portal_url       || '',\n    admin_id:         body.admin_id      || null,\n    occurred_at:      body.occurred_at   || null\n  }\n}];"
      },
      "id": "extract",
      "name": "Extrair Dados",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"cliente_email\"] }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "id": "if-has-email",
      "name": "Tem e-mail?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        900,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"cliente_telefone\"] }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "id": "if-has-phone",
      "name": "Tem WhatsApp?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        900,
        420
      ]
    },
    {
      "parameters": {
        "fromEmail": "={{ $env.SIGE_FROM_EMAIL }}",
        "toEmail": "={{ $json[\"cliente_email\"] }}",
        "subject": "Recebemos a aprova\u00e7\u00e3o da proposta {{ $json[\"proposta_numero\"] }} v{{ $json[\"proposta_versao\"] }}",
        "text": "Ol\u00e1 {{ $json[\"cliente_nome\"] }},\n\nObrigado por aprovar a proposta n\u00ba {{ $json[\"proposta_numero\"] }} (vers\u00e3o {{ $json[\"proposta_versao\"] }}). A obra correspondente j\u00e1 foi aberta no nosso sistema e nossa equipe entrar\u00e1 em contato com os pr\u00f3ximos passos (cronograma, programa\u00e7\u00e3o de in\u00edcio e documenta\u00e7\u00e3o).\n\n\u2022 Valor aprovado: R$ {{ $json[\"valor_total\"] }}\n\u2022 Portal da obra/proposta: {{ $json[\"portal_url\"] }}\n\nQualquer d\u00favida, \u00e9 s\u00f3 responder este e-mail."
      },
      "id": "send-email",
      "name": "Enviar E-mail (SMTP/SendGrid)",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2,
      "position": [
        1140,
        200
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.EVOLUTION_API_URL }}/message/sendText/{{ $env.EVOLUTION_INSTANCE }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "={{ $env.EVOLUTION_API_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "bodyContentType": "json",
        "jsonBody": "={\n  \"number\": \"{{ $json[\"cliente_telefone\"] }}\",\n  \"text\":   \"Ol\u00e1 *{{ $json[\\\"cliente_nome\\\"] }}*!\\n\\nRecebemos a aprova\u00e7\u00e3o da proposta *{{ $json[\\\"proposta_numero\\\"] }}* (v{{ $json[\\\"proposta_versao\\\"] }}). A obra j\u00e1 foi aberta no sistema e nossa equipe vai te procurar com os pr\u00f3ximos passos.\\n\\n\u2022 Valor aprovado: R$ {{ $json[\\\"valor_total\\\"] }}\\n\ud83d\udc49 Acompanhe: {{ $json[\\\"portal_url\\\"] }}\\n\\nObrigado pela confian\u00e7a!\"\n}"
      },
      "id": "send-whatsapp",
      "name": "Enviar WhatsApp (Evolution API)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        1140,
        420
      ]
    }
  ],
  "connections": {
    "Webhook (POST)": {
      "main": [
        [
          {
            "node": "Validar Assinatura HMAC",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validar Assinatura HMAC": {
      "main": [
        [
          {
            "node": "Extrair Dados",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extrair Dados": {
      "main": [
        [
          {
            "node": "Tem e-mail?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Tem WhatsApp?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tem e-mail?": {
      "main": [
        [
          {
            "node": "Enviar E-mail (SMTP/SendGrid)",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Tem WhatsApp?": {
      "main": [
        [
          {
            "node": "Enviar WhatsApp (Evolution API)",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  },
  "active": false,
  "settings": {},
  "tags": [
    {
      "name": "sige"
    },
    {
      "name": "propostas"
    }
  ],
  "_meta": {
    "description": "Workflow exemplo para o evento `proposta.aprovada` do SIGE. Avisa o cliente que a aprova\u00e7\u00e3o foi processada e a obra aberta.",
    "env_obrigatorias": [
      "N8N_WEBHOOK_SECRET",
      "SIGE_FROM_EMAIL",
      "EVOLUTION_API_URL",
      "EVOLUTION_INSTANCE",
      "EVOLUTION_API_KEY"
    ]
  }
}

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

SIGE — Proposta Aprovada (Email + WhatsApp via Evolution API). Uses emailSend, httpRequest. Webhook trigger; 7 nodes.

Source: https://github.com/cassioviller/EnterpriseSync-1/blob/afd0499b286d5e63b3d5deedb56e4399e14bca23/n8n_workflows/proposta_aprovada.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

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

Email & Gmail

SIGE — Proposta Expirando (Lembrete por Email + WhatsApp). Uses emailSend, httpRequest. Webhook trigger; 7 nodes.

Email Send, HTTP Request
Email & Gmail

SIGE — Proposta Rejeitada (Notificação interna por Email + Slack). Uses emailSend, httpRequest. Webhook trigger; 5 nodes.

Email Send, HTTP Request
Email & Gmail

Automate WhatsApp communication for recruitment agencies with an interactive, structured customer experience. This workflow handles pricing inquiries, request submissions, tracking, complaints, and hu

HTTP Request, Google Sheets, Gmail +1
Email & Gmail

Hectelion | Evaluation d'entreprise. Uses googleDrive, httpRequest, microsoftOutlook, googleSheets. Webhook trigger; 64 nodes.

Google Drive, HTTP Request, Microsoft Outlook +1
Email & Gmail

Hectelion | NDA. Uses googleSheets, googleDrive, httpRequest, microsoftOutlook. Webhook trigger; 50 nodes.

Google Sheets, Google Drive, HTTP Request +1