AutomationFlowsWeb Scraping › Precifique — Afiliada Cadastro

Precifique — Afiliada Cadastro

Precifique — Afiliada Cadastro. Uses httpRequest. Webhook trigger; 7 nodes.

Webhook trigger★★★★☆ complexity7 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 7 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": "Precifique \u2014 Afiliada Cadastro",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "afiliado-cadastro",
        "responseMode": "onReceived",
        "responseData": "firstEntryJson",
        "options": {}
      },
      "id": "webhook-cadastro",
      "name": "Webhook Cadastro",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.body.whatsapp }}",
              "operation": "isNotEmpty"
            },
            {
              "value1": "={{ $json.body.nome }}",
              "operation": "isNotEmpty"
            },
            {
              "value1": "={{ $json.body.link_afiliado }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "id": "validar-campos-cadastro",
      "name": "Validar Campos",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const raw = $input.first().json.body.whatsapp || '';\nconst digits = raw.replace(/\\D/g, '');\nlet number = digits;\nif (!number.startsWith('55')) {\n  number = '55' + number;\n}\nreturn [{ json: { ...$input.first().json.body, whatsapp_fmt: number } }];"
      },
      "id": "formatar-telefone-cadastro",
      "name": "Formatar Telefone",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.EVOLUTION_URL }}/message/sendText/{{ $env.EVOLUTION_INSTANCE }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "={{ $env.EVOLUTION_API_KEY }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"number\": \"{{ $json.whatsapp_fmt }}\",\n  \"text\": \"Ol\u00e1, {{ $json.nome }}! \ud83d\udc9c\\n\\nSeu cadastro como afiliada do *Precifique* foi confirmado!\\n\\n\ud83d\udd17 *Seu link:*\\n{{ $json.link_afiliado }}\\n\\nCompartilhe esse link e ganhe *R$ 12,90* por cada venda!\\n\\n\ud83d\udcca *Seu painel:*\\n{{ $json.link_painel }}\\n\\nQualquer d\u00favida, estamos aqui. Boas vendas! \ud83d\ude80\"\n}",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "id": "whatsapp-cadastro",
      "name": "WhatsApp Boas-vindas",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        900,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.statusCode }}",
              "operation": "smallerEqual",
              "value2": 299
            }
          ]
        }
      },
      "id": "checar-resposta-cadastro",
      "name": "Enviou OK?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1120,
        200
      ]
    },
    {
      "parameters": {
        "jsCode": "console.error('[afiliado-cadastro] Falha ao enviar WhatsApp:', JSON.stringify($input.first().json));\nreturn [];"
      },
      "id": "log-erro-cadastro",
      "name": "Log Erro Envio",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1340,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const item = $input.first().json;\nconsole.error('[afiliado-cadastro] Campos inv\u00e1lidos:', JSON.stringify(item.body));\nreturn [];"
      },
      "id": "log-campos-invalidos-cadastro",
      "name": "Log Campos Inv\u00e1lidos",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        400
      ]
    }
  ],
  "connections": {
    "Webhook Cadastro": {
      "main": [
        [
          {
            "node": "Validar Campos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validar Campos": {
      "main": [
        [
          {
            "node": "Formatar Telefone",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Campos Inv\u00e1lidos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Formatar Telefone": {
      "main": [
        [
          {
            "node": "WhatsApp Boas-vindas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Boas-vindas": {
      "main": [
        [
          {
            "node": "Enviou OK?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enviou OK?": {
      "main": [
        [],
        [
          {
            "node": "Log Erro Envio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

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

About this workflow

Precifique — Afiliada Cadastro. Uses httpRequest. Webhook trigger; 7 nodes.

Source: https://github.com/Cjota221/calculadora/blob/9109bea08432709ecebc25ab71eadc79dcb0d966/n8n/afiliado-cadastro.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

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.

HTTP Request
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request