Automation flow (JSON)

n8n: novo lead → resumo com IA → email

Fluxo n8n importável, só com nós padrão: recebe um lead por POST, pede ao Claude Haiku 5.5 um resumo de 5 linhas em pt-PT e envia-o por email com os dados originais, mesmo que a IA falhe. Depois de importar: credenciais Header Auth (x-api-key) e SMTP, troca <O_TEU_EMAIL> e <O_TEU_DOMINIO> e ativa. O webhook é público: liga Header Auth no nó Webhook ou põe um limite de pedidos à frente.

workflow.jsonNo known keys or hidden charactersn8n · Claudev1CC BY 4.0

No known keys or hidden characters

Neer checks every version before saving it: it refuses known key and token formats and hidden characters, and warns about commands that need attention. It is not an audit.

By Danilo Sobral@sobral

See the orchestrator card

workflow.json

Install

Paste the JSON into the n8n editor (Ctrl+V) or use Import from File.

{  "name": "Novo lead - resumo IA - email",  "nodes": [    {      "parameters": {        "httpMethod": "POST",        "path": "novo-lead",        "responseMode": "responseNode",        "options": {}      },      "id": "1a111111-1111-4111-8111-111111111111",      "name": "Webhook",      "type": "n8n-nodes-base.webhook",      "typeVersion": 2,      "position": [        240,        300      ],      "webhookId": "novo-lead"    },    {      "parameters": {        "method": "POST",        "url": "https://api.anthropic.com/v1/messages",        "authentication": "genericCredentialType",        "genericAuthType": "httpHeaderAuth",        "sendHeaders": true,        "headerParameters": {          "parameters": [            {              "name": "anthropic-version",              "value": "2023-06-01"            }          ]        },        "sendBody": true,        "specifyBody": "json",        "jsonBody": "={{ JSON.stringify({ model: \"claude-haiku-5-5\", max_tokens: 1024, output_config: { effort: \"low\" }, messages: [{ role: \"user\", content: \"Resume este lead em 5 linhas, em pt-PT, e sugere um próximo passo concreto.\\n\\nNome: \" + ($json.body.nome || \"\") + \"\\nEmail: \" + ($json.body.email || \"\") + \"\\nMensagem: \" + ($json.body.mensagem || \"\") }] }) }}",        "options": {}      },      "id": "2b222222-2222-4222-8222-222222222222",      "name": "Resumir lead com IA",      "type": "n8n-nodes-base.httpRequest",      "typeVersion": 4.2,      "position": [        460,        300      ],      "credentials": {        "httpHeaderAuth": {          "id": "",          "name": "Anthropic (x-api-key)"        }      },      "onError": "continueRegularOutput"    },    {      "parameters": {        "fromEmail": "leads@<O_TEU_DOMINIO>",        "toEmail": "<O_TEU_EMAIL>",        "subject": "=Novo lead: {{$('Webhook').item.json.body.nome}}",        "emailFormat": "text",        "text": "={{ (($json.content || []).find(b => b.type === \"text\") || {}).text || \"Resumo indisponível: a chamada à IA falhou.\" }}\n\n---\nNome: {{ $('Webhook').item.json.body.nome }}\nEmail: {{ $('Webhook').item.json.body.email }}\nMensagem: {{ $('Webhook').item.json.body.mensagem }}",        "options": {          "appendAttribution": false        }      },      "id": "3c333333-3333-4333-8333-333333333333",      "name": "Enviar email",      "type": "n8n-nodes-base.emailSend",      "typeVersion": 2.1,      "position": [        680,        300      ]    },    {      "parameters": {        "respondWith": "json",        "responseBody": "={\n  \"ok\": true\n}",        "options": {}      },      "id": "4d444444-4444-4444-8444-444444444444",      "name": "Responder ao webhook",      "type": "n8n-nodes-base.respondToWebhook",      "typeVersion": 1.1,      "position": [        900,        300      ]    }  ],  "connections": {    "Webhook": {      "main": [        [          {            "node": "Resumir lead com IA",            "type": "main",            "index": 0          }        ]      ]    },    "Resumir lead com IA": {      "main": [        [          {            "node": "Enviar email",            "type": "main",            "index": 0          }        ]      ]    },    "Enviar email": {      "main": [        [          {            "node": "Responder ao webhook",            "type": "main",            "index": 0          }        ]      ]    }  },  "active": false,  "settings": {    "executionOrder": "v1"  },  "pinData": {}} 

Licence: CC BY 4.0.

Reproduced 0 times

Nobody has reported a reproduction yet.