AutomationFlowsEmail & Gmail › Jarvis — Comercial (maestro: Cadência + Respostas)

Jarvis — Comercial (maestro: Cadência + Respostas)

JARVIS — Comercial (Maestro: cadência + respostas). Uses httpRequest, emailReadImap. Scheduled trigger; 9 nodes.

Cron / scheduled trigger★★★★☆ complexity9 nodesHTTP RequestEmail Read Imap
Email & Gmail Trigger: Cron / scheduled Nodes: 9 Complexity: ★★★★☆ Added:

This workflow follows the Emailreadimap → 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": "JARVIS \u2014 Comercial (Maestro: cad\u00eancia + respostas)",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24,
              "triggerAtHour": 9
            }
          ]
        }
      },
      "id": "b0000000-0000-4000-8000-000000000010",
      "name": "Todo dia \u00e0s 9h",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -320,
        -160
      ],
      "notes": "Dispara a cad\u00eancia di\u00e1ria. Ajuste o hor\u00e1rio se quiser."
    },
    {
      "parameters": {
        "method": "GET",
        "url": "https://jarvis3-joao-ygor-s-projects.vercel.app/api/comercial-cron",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer SEU_CRON_SECRET"
            }
          ]
        },
        "options": {
          "timeout": 60000
        }
      },
      "id": "b0000000-0000-4000-8000-000000000011",
      "name": "Envia Msgs 2/3/4/5 (Vercel)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -80,
        -160
      ],
      "notes": "Chama o motor de envio na Vercel (SMTP Locaweb). Troque SEU_CRON_SECRET pela env CRON_SECRET configurada na Vercel. O motor decide quem recebe qual mensagem e nunca reenvia."
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ $json.enviadas }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "b0000000-0000-4000-8000-000000000012",
      "name": "Enviou alguma?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        160,
        -160
      ],
      "notes": "Ramo 'true' s\u00f3 quando houve envio \u2014 \u00fatil para plugar uma notifica\u00e7\u00e3o (Slack/WhatsApp) de resumo. Opcional."
    },
    {
      "parameters": {},
      "id": "b0000000-0000-4000-8000-000000000001",
      "name": "Nova resposta na caixa",
      "type": "n8n-nodes-base.emailReadImap",
      "typeVersion": 2,
      "position": [
        -320,
        140
      ],
      "notes": "Gatilho IMAP: cada e-mail novo em comercial@gruposervcamp.com.br. Credencial IMAP: host email-ssl.com.br, porta 993, SSL ligado."
    },
    {
      "parameters": {
        "jsCode": "// Extrai s\u00f3 o endere\u00e7o do remetente.\n// \"Maria Silva <maria@cliente.com.br>\" -> maria@cliente.com.br\nconst out = [];\nfor (const item of $input.all()) {\n  const from = item.json.from || item.json.From || '';\n  const m = String(from).match(/[\\w.+-]+@[\\w-]+\\.[\\w.-]+/);\n  if (!m) continue;\n  out.push({ json: { remetente: m[0].toLowerCase(), assunto: item.json.subject || '', recebido_em: item.json.date || new Date().toISOString() } });\n}\nreturn out;"
      },
      "id": "b0000000-0000-4000-8000-000000000002",
      "name": "Extrai o remetente",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -100,
        140
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "=https://SEU_PROJETO.supabase.co/rest/v1/com_propostas",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "select",
              "value": "id,nome,email,status,respondido_em"
            },
            {
              "name": "email",
              "value": "=eq.{{ $json.remetente }}"
            },
            {
              "name": "respondido_em",
              "value": "is.null"
            },
            {
              "name": "status",
              "value": "not.in.(FECHADO,PERDIDO)"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "=SUA_SERVICE_ROLE_KEY"
            },
            {
              "name": "Authorization",
              "value": "=Bearer SUA_SERVICE_ROLE_KEY"
            }
          ]
        },
        "options": {}
      },
      "id": "b0000000-0000-4000-8000-000000000003",
      "name": "Procura proposta pelo e-mail",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        140,
        140
      ],
      "notes": "Troque SEU_PROJETO (agahqqlhajwhklurcjlc) e SUA_SERVICE_ROLE_KEY."
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "version": 2
          },
          "conditions": [
            {
              "leftValue": "={{ $json.id }}",
              "rightValue": "",
              "operator": {
                "type": "number",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "b0000000-0000-4000-8000-000000000004",
      "name": "\u00c9 um cliente da base?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        380,
        140
      ],
      "notes": "Sem correspond\u00eancia = e-mail comum: o fluxo para aqui."
    },
    {
      "parameters": {
        "method": "PATCH",
        "url": "=https://SEU_PROJETO.supabase.co/rest/v1/com_propostas",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "id",
              "value": "=eq.{{ $json.id }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "=SUA_SERVICE_ROLE_KEY"
            },
            {
              "name": "Authorization",
              "value": "=Bearer SUA_SERVICE_ROLE_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Prefer",
              "value": "return=minimal"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ respondido_em: new Date().toISOString(), status: $json.status === 'PROPOSTA' ? 'NEGOCIA\u00c7\u00c3O' : $json.status, atualizado_em: new Date().toISOString() }) }}",
        "options": {}
      },
      "id": "b0000000-0000-4000-8000-000000000005",
      "name": "Marca respondido \u2192 PARA a cad\u00eancia",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        620,
        60
      ],
      "notes": "Preenche respondido_em: a cad\u00eancia nunca mais envia a este cliente. PROPOSTA vira NEGOCIA\u00c7\u00c3O."
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://SEU_PROJETO.supabase.co/rest/v1/com_cadencia_log",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "=SUA_SERVICE_ROLE_KEY"
            },
            {
              "name": "Authorization",
              "value": "=Bearer SUA_SERVICE_ROLE_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Prefer",
              "value": "return=minimal"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ proposta_id: $('Procura proposta pelo e-mail').item.json.id, etapa: 0, canal: 'EMAIL', destinatario: $('Extrai o remetente').item.json.remetente, status: 'evento', detalhe: 'Cliente respondeu por e-mail \u2014 cad\u00eancia interrompida automaticamente (n8n)' }) }}",
        "options": {}
      },
      "id": "b0000000-0000-4000-8000-000000000006",
      "name": "Registra na timeline",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        860,
        60
      ],
      "notes": "Evento aparece na Timeline 360\u00ba da proposta no JARVIS."
    }
  ],
  "connections": {
    "Todo dia \u00e0s 9h": {
      "main": [
        [
          {
            "node": "Envia Msgs 2/3/4/5 (Vercel)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Envia Msgs 2/3/4/5 (Vercel)": {
      "main": [
        [
          {
            "node": "Enviou alguma?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nova resposta na caixa": {
      "main": [
        [
          {
            "node": "Extrai o remetente",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extrai o remetente": {
      "main": [
        [
          {
            "node": "Procura proposta pelo e-mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Procura proposta pelo e-mail": {
      "main": [
        [
          {
            "node": "\u00c9 um cliente da base?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00c9 um cliente da base?": {
      "main": [
        [
          {
            "node": "Marca respondido \u2192 PARA a cad\u00eancia",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Marca respondido \u2192 PARA a cad\u00eancia": {
      "main": [
        [
          {
            "node": "Registra na timeline",
            "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

JARVIS — Comercial (Maestro: cadência + respostas). Uses httpRequest, emailReadImap. Scheduled trigger; 9 nodes.

Source: https://github.com/Joaoygor660/jarvis3/blob/a94f9461daccb44ebad779053e8d1dcfe8770aa2/n8n/fluxo-comercial-maestro.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

inbox-pilot — Ops Autopilot. Uses emailReadImap, httpRequest, googleSheets, telegram. Scheduled trigger; 14 nodes.

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

This n8n workflow monitors and alerts you about new construction projects in specified areas, helping you track competing builders and identify business opportunities. The system automatically searche

Email Read Imap, HTTP Request, Email Send
Email & Gmail

Bank Email Transaction Monitor. Uses emailReadImap, httpRequest, googleSheets. Scheduled trigger; 5 nodes.

Email Read Imap, HTTP Request, Google Sheets
Email & Gmail

Email AI Auto-responder. Summerize and send email. Uses emailReadImap, emailSend, httpRequest, googleDrive. Event-driven trigger; 78 nodes.

Email Read Imap, Email Send, HTTP Request +2
Email & Gmail

Email AI Auto-responder. Summerize and send email. Uses emailReadImap, emailSend, httpRequest, googleDrive. Event-driven trigger; 78 nodes.

Email Read Imap, Email Send, HTTP Request +2