AutomationFlowsAI & RAG › Sistema Vendas Estética - Fluxo Principal

Sistema Vendas Estética - Fluxo Principal

Sistema Vendas Estética - Fluxo Principal. Uses sqlite, openAi, httpRequest. Webhook trigger; 10 nodes.

Webhook trigger★★★☆☆ complexityAI-powered10 nodesSqliteOpenAIHTTP Request
AI & RAG Trigger: Webhook Nodes: 10 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the HTTP Request → OpenAI 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": "Sistema Vendas Est\u00e9tica - Fluxo Principal",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "webhook/whatsapp-incoming",
        "responseMode": "responseNode"
      },
      "id": "webhook-entrada",
      "name": "Webhook WhatsApp",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ],
      "notes": "Recebe mensagens do WhatsApp via Evolution API ou similar"
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.body.message.toLowerCase()}}",
              "operation": "contains",
              "value2": "interesse"
            }
          ]
        }
      },
      "id": "filtro-interesse",
      "name": "Filtrar Interesse",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "notes": "Verifica se a mensagem cont\u00e9m palavras de interesse"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT OR IGNORE INTO leads (nome, telefone, origem, status) VALUES ('{{$json.body.pushName}}', '{{$json.body.from}}', 'whatsapp', 'interessado')"
      },
      "id": "salvar-lead",
      "name": "Salvar Lead no DB",
      "type": "n8n-nodes-base.sqlite",
      "typeVersion": 1,
      "position": [
        650,
        200
      ],
      "notes": "Salva o lead no banco de dados unificado"
    },
    {
      "parameters": {
        "model": "gpt-4.1-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "Voc\u00ea \u00e9 uma assistente de uma cl\u00ednica de est\u00e9tica. Seu objetivo \u00e9 qualificar o interesse do cliente e agendar uma avalia\u00e7\u00e3o. Procedimentos dispon\u00edveis: Botox (R$800), Preenchimento Labial (R$1200), Bioestimulador (R$2500), Harmoniza\u00e7\u00e3o Facial (R$3500). Seja simp\u00e1tica e profissional."
            },
            {
              "role": "user",
              "content": "={{$json.body.message}}"
            }
          ]
        }
      },
      "id": "openai-resposta",
      "name": "Gerar Resposta IA",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [
        650,
        400
      ],
      "notes": "Usa OpenAI para gerar resposta personalizada"
    },
    {
      "parameters": {
        "url": "={{$env.WHATSAPP_API_URL}}/message/sendText/{{$env.WHATSAPP_INSTANCE}}",
        "method": "POST",
        "body": {
          "number": "={{$json.body.from}}",
          "text": "={{$node['Gerar Resposta IA'].json.choices[0].message.content}}"
        }
      },
      "id": "enviar-resposta",
      "name": "Enviar Resposta WhatsApp",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        850,
        400
      ],
      "notes": "Envia a resposta de volta para o WhatsApp"
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.body.message.toLowerCase()}}",
              "operation": "contains",
              "value2": "agendar"
            }
          ]
        }
      },
      "id": "filtro-agendamento",
      "name": "Detectar Agendamento",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        850,
        200
      ],
      "notes": "Detecta se o cliente quer agendar"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "UPDATE leads SET status = 'agendado' WHERE telefone = '{{$json.body.from}}'"
      },
      "id": "atualizar-status",
      "name": "Atualizar Status Lead",
      "type": "n8n-nodes-base.sqlite",
      "typeVersion": 1,
      "position": [
        1050,
        200
      ],
      "notes": "Marca o lead como agendado"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 1
            }
          ]
        }
      },
      "id": "cron-lembretes",
      "name": "Verificar Lembretes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        250,
        550
      ],
      "notes": "Executa a cada hora para verificar lembretes"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT a.*, p.nome, p.telefone FROM agendamentos a JOIN pacientes p ON a.paciente_id = p.paciente_id WHERE a.status = 'agendado' AND a.lembrete_enviado = 0 AND datetime(a.data_hora) BETWEEN datetime('now') AND datetime('now', '+24 hours')"
      },
      "id": "buscar-agendamentos",
      "name": "Buscar Agendamentos 24h",
      "type": "n8n-nodes-base.sqlite",
      "typeVersion": 1,
      "position": [
        450,
        550
      ],
      "notes": "Busca agendamentos das pr\u00f3ximas 24h"
    },
    {
      "parameters": {
        "url": "={{$env.WHATSAPP_API_URL}}/message/sendText/{{$env.WHATSAPP_INSTANCE}}",
        "method": "POST",
        "body": {
          "number": "={{$json.telefone}}",
          "text": "Ol\u00e1 {{$json.nome}}! \ud83d\ude0a\n\nLembrando que voc\u00ea tem um agendamento amanh\u00e3 na nossa cl\u00ednica.\n\n\ud83d\udcc5 Data: {{$json.data_hora}}\n\nPor favor, confirme sua presen\u00e7a respondendo SIM.\n\nAt\u00e9 l\u00e1! \u2728"
        }
      },
      "id": "enviar-lembrete",
      "name": "Enviar Lembrete",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        650,
        550
      ],
      "notes": "Envia lembrete de agendamento"
    }
  ],
  "connections": {
    "Webhook WhatsApp": {
      "main": [
        [
          {
            "node": "Filtrar Interesse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filtrar Interesse": {
      "main": [
        [
          {
            "node": "Salvar Lead no DB",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gerar Resposta IA",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Gerar Resposta IA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gerar Resposta IA": {
      "main": [
        [
          {
            "node": "Enviar Resposta WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Salvar Lead no DB": {
      "main": [
        [
          {
            "node": "Detectar Agendamento",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detectar Agendamento": {
      "main": [
        [
          {
            "node": "Atualizar Status Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verificar Lembretes": {
      "main": [
        [
          {
            "node": "Buscar Agendamentos 24h",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Buscar Agendamentos 24h": {
      "main": [
        [
          {
            "node": "Enviar Lembrete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    "est\u00e9tica",
    "whatsapp",
    "vendas",
    "agendamento"
  ]
}
Pro

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

About this workflow

Sistema Vendas Estética - Fluxo Principal. Uses sqlite, openAi, httpRequest. Webhook trigger; 10 nodes.

Source: https://github.com/lucastigrereal-dev/estetica-sales-system/blob/4aa17093ba187085e3273f91881ce6b7f61bf39f/n8n-workflows/estetica-sales-flow.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Lead-Qualifier with BANT+I and Pipedrive (Multi-Provider). Uses stickyNote, n8n-nodes-studiomeyer-memory, openAi, anthropic. Webhook trigger; 28 nodes.

N8N Nodes Studiomeyer Memory, OpenAI, Anthropic +1
AI & RAG

Meeting-Bot Cross-Meeting Continuity (Multi-Provider). Uses stickyNote, n8n-nodes-studiomeyer-memory, openAi, anthropic. Webhook trigger; 28 nodes.

N8N Nodes Studiomeyer Memory, OpenAI, Anthropic +1
AI & RAG

LU. Uses telegram, openAi, httpRequest. Webhook trigger; 28 nodes.

Telegram, OpenAI, HTTP Request
AI & RAG

AI-Powered Fake Review Detection Workflow Using n8n & Airtable. Uses httpRequest, airtable, openAi, slack. Webhook trigger; 27 nodes.

HTTP Request, Airtable, OpenAI +1
AI & RAG

This workflow automates the creation of Journal Entries in SAP Business One (SAP B1). Depending on the source of the input data, it dynamically transforms and sends accounting records in the appropria

HTTP Request, Google Sheets, OpenAI