Análisis de leads y generación de correos electrónicos personalizados con OpenAI, Firecrawl y gotoHuman
Este es unMiscellaneous, Multimodal AIflujo de automatización del dominio deautomatización que contiene 22 nodos.Utiliza principalmente nodos como If, Code, Gmail, GoogleDocsTool, Agent. Análisis de prospectos y generación de correos personalizados con OpenAI, Firecrawl y gotoHuman
- •Cuenta de Google y credenciales de API de Gmail
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Clave de API de OpenAI
Nodos utilizados (22)
Categoría
{
"meta": {
"instanceId": "8267d3569bda2c6f198d17726ec68a346675a4cca67a114822601a01c8893f9b"
},
"nodes": [
{
"id": "765f12b4-f9cd-4824-a0e2-6236b730fa49",
"name": "Activador Typeform",
"type": "n8n-nodes-base.typeformTrigger",
"position": [
-1024,
-448
],
"webhookId": "540469cf-baae-48c0-af23-aaca1b30ee66",
"parameters": {
"formId": "tcNgdBxH"
},
"credentials": {},
"typeVersion": 1.1
},
{
"id": "718dcac5-5244-4b89-829a-fe155a40922c",
"name": "Extraer Dominio",
"type": "n8n-nodes-base.code",
"position": [
-816,
-448
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Extract domain from email and convert to website URL\nconst email = $input.item.json['Work Email']; // Adjust this path based on your input data structure\n\n// Extract domain from email (part after @)\nconst domain = email.split('@')[1];\n\n// Convert to website URL (assuming https)\nconst websiteUrl = `https://${domain}`;\n\n$input.item.json.domain = domain\n$input.item.json.websiteUrl = websiteUrl\n\n// Return the result\nreturn $input.item;"
},
"typeVersion": 2
},
{
"id": "2a4a1c0f-82cd-4855-a781-191e3d66efa5",
"name": "Marcar direcciones de email personales",
"type": "n8n-nodes-base.code",
"position": [
-608,
-448
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Flag items based on common email providers\nconst commonProviders = [\n 'gmail', 'yahoo', 'ymail', 'rocketmail',\n 'outlook', 'hotmail', 'live', 'msn',\n 'icloud', 'me', 'mac', 'aol',\n 'zoho', 'protonmail', 'mail', 'gmx'\n];\n\n// Get the domain from the input\nconst domain = $input.item.json.domain;\n\n// Extract the main domain part (remove .com, .net, etc.)\nconst domainParts = domain.split('.');\nconst mainDomain = domainParts[0].toLowerCase();\n\n// Check if it's a common provider\nconst isCommonProvider = commonProviders.includes(mainDomain);\n\n$input.item.json.isPersonalEmail = isCommonProvider;\n\nreturn $input.item;"
},
"typeVersion": 2
},
{
"id": "9383f89d-befe-4a0e-b645-85bc97d4c6a3",
"name": "¿Es Email Personal?",
"type": "n8n-nodes-base.if",
"position": [
-400,
-448
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d7f56829-f0e9-4271-b981-0800d8faad1e",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.isPersonalEmail }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "a5a9eea3-a479-4783-b663-b0ae2ed4363f",
"name": "Rastrear el sitio web",
"type": "@mendable/n8n-nodes-firecrawl.firecrawl",
"position": [
-992,
-32
],
"parameters": {
"url": "={{ $json.websiteUrl }}",
"operation": "scrape",
"requestOptions": {}
},
"credentials": {},
"typeVersion": 1
},
{
"id": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"name": "Agente de Ventas con IA",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-816,
432
],
"parameters": {
"text": "=We have a new inbound lead as someone left their email address on our landing page. We already scraped their website, find it below, and I now need you to analyze this prospect and help me write an initial outreach email.\n\nFetch our own company description as well as our ICP description with the given tools to make a proper lead assessment, reason about why they might be interested in our offering, what would be a good unique angle/hook to reach out, and write an accurate personalized outreach email.\nUse Github-flavored-markdown for interest, ICP and personalization reasoning.\nThe email draft needs to be in plain text though!\nAlso fetch previous positive examples to use as a reference of what is a good analysis and email draft.\n\n<Lead Info>\nEmail: {{ $('Is Personal Email?').item.json['Work Email'] }}\nCompany: {{ $('Is Personal Email?').item.json.Company }}\nWebsite: {{ $('Is Personal Email?').item.json.websiteUrl }}\n</Lead Info>\n\n<Website Summary>\n{{ $json.message.content }}\n</Website Summary>\n\nToday is {{ $today }}.",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "246927ff-c4bf-4262-bde5-633c5ac58094",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-992,
656
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {},
"typeVersion": 1.2
},
{
"id": "c165c375-74ec-4537-a525-97e9d78ae00d",
"name": "Analizador de Salida Estructurada",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-432,
656
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n \"required\": [\n \"industry\",\n \"reasoningForInterestInOurProduct_markdown\",\n \"reasoningIfIdealCustomerProfile_markdown\",\n \"personalizationHook_markdown\",\n \"companyBudgetAssessment\",\n \"priorityRating\",\n \"emailDraftSubject\",\n \"emailDraftBodyPlainText\"\n ],\n\t\"properties\": {\n \"industry\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n \"reasoningForInterestInOurProduct_markdown\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n \"reasoningIfIdealCustomerProfile_markdown\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"reasoningPersonalizationHook_markdown\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"companyBudgetAssessment\": {\n\t\t\t\"enum\": [\"high\", \"medium\", \"low\"]\n\t\t},\n\t\t\"priorityRating\": {\n\t\t\t\"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 10\n\t\t},\n\t\t\"emailDraftSubject\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"emailDraftBodyPlainText\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
},
"typeVersion": 1.3
},
{
"id": "e57e25f5-3a90-45c0-8dc9-6e1a31f8537c",
"name": "Obtener perfil de nuestra empresa",
"type": "n8n-nodes-base.googleDocsTool",
"position": [
-848,
656
],
"parameters": {
"operation": "get",
"documentURL": ""
},
"credentials": {},
"typeVersion": 2
},
{
"id": "952dec83-6929-452c-b6ef-2c623b776a88",
"name": "Obtener descripción de nuestro ICP",
"type": "n8n-nodes-base.googleDocsTool",
"position": [
-720,
656
],
"parameters": {
"operation": "get",
"documentURL": ""
},
"credentials": {},
"typeVersion": 2
},
{
"id": "01b6354c-c7c6-4bba-83d5-b97d96a28e15",
"name": "Recuperar historial aprobado",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
-576,
656
],
"parameters": {
"url": "https://api.gotohuman.com/queryResponses",
"options": {},
"sendQuery": true,
"authentication": "predefinedCredentialType",
"queryParameters": {
"parameters": [
{
"name": "formId",
"value": ""
},
{
"name": "fieldIds",
"value": "companySummary,reasoningInterest,reasoningIcp,personalizationHook,budget,priorityRating,emailToSendSubject,emailToSendBody"
},
{
"name": "approvedValuesOnly",
"value": "true"
}
]
},
"toolDescription": "Fetches positive human-approved examples from past runs to use as orientation for your own reasoning and generating the output.",
"nodeCredentialType": "gotoHumanApi"
},
"credentials": {},
"typeVersion": 4.2
},
{
"id": "ffb75d90-cff6-4db8-b9fb-6ff162e8edd2",
"name": "Resumir sitio web",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-784,
-32
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=We scraped a website. Please summarize the content in markdown (gfm) in 2-3 paragraphs highlighting their industry, positioning, service or product offerings and any hints on recent activities and strategic moves.\n\n<ScrapingResult>\n{{ $json.data.markdown }}\n</ScrapingResult>"
}
]
}
},
"credentials": {},
"typeVersion": 1.8
},
{
"id": "0373be96-43e3-419b-9d7d-31360be25113",
"name": "Esperar Aprobación Humana",
"type": "@gotohuman/n8n-nodes-gotohuman.gotoHuman",
"position": [
272,
496
],
"webhookId": "7b2542b6-2ae7-489c-bcfd-83c07f480ec5",
"parameters": {
"fields": {
"value": {
"budget": "={{\n{\ndefault: $json.output.companyBudgetAssessment\n}\n}}",
"industry": "={{ $json.output.industry }}",
"leadEmail": "={{ $('Flag personal email addresses').item.json['Work Email'] }}",
"leadCompany": "={{ $('Flag personal email addresses').item.json.Company }}",
"reasoningIcp": "={{ $json.output.reasoningIfIdealCustomerProfile_markdown }}",
"websiteLinks": "={{\n[\n{\n\"url\": $('Flag personal email addresses').item.json.websiteUrl\n}\n]\n}}",
"companySummary": "={{ $('Summarize website').item.json.message.content }}",
"priorityRating": "={{ $json.output.priorityRating }}",
"emailToSendBody": "={{ $json.output.emailDraftBodyPlainText }}",
"reasoningInterest": "={{ $json.output.reasoningForInterestInOurProduct_markdown }}",
"emailToSendSubject": "={{ $json.output.emailDraftSubject }}",
"personalizationHook": "={{ $json.output.reasoningPersonalizationHook_markdown }}"
},
"schema": [
{
"id": "leadEmail",
"type": "string",
"display": true,
"required": false,
"displayName": "leadEmail (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "leadCompany",
"type": "string",
"display": true,
"required": false,
"displayName": "leadCompany (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "websiteLinks",
"type": "array",
"display": true,
"required": false,
"displayName": "websiteLinks (urlLinks)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "industry",
"type": "string",
"display": true,
"required": false,
"displayName": "industry (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "companySummary",
"type": "string",
"display": true,
"required": false,
"displayName": "companySummary (text)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reasoningInterest",
"type": "string",
"display": true,
"required": false,
"displayName": "reasoningInterest (markdown)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "reasoningIcp",
"type": "string",
"display": true,
"required": false,
"displayName": "reasoningIcp (markdown)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "personalizationHook",
"type": "string",
"display": true,
"required": false,
"displayName": "personalizationHook (markdown)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "budget",
"type": "object",
"display": true,
"required": false,
"displayName": "budget (buttonSelect)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "priorityRating",
"type": "number",
"display": true,
"required": false,
"displayName": "priorityRating (rating)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "emailToSendSubject",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "emailToSendSubject (textShort)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "emailToSendBody",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "emailToSendBody (text)",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"additionalFields": {},
"reviewTemplateID": {
"__rl": true,
"mode": "list"
}
},
"credentials": {},
"typeVersion": 1
},
{
"id": "79fc41ac-2357-49f2-9fef-abc0dd995efc",
"name": "Enviar mensaje",
"type": "n8n-nodes-base.gmail",
"position": [
1104,
448
],
"webhookId": "0c705542-8d7b-406a-9f88-24b859c6d4cd",
"parameters": {
"sendTo": "={{ $json.responseValues.leadEmail.value }}",
"message": "={{ $json.responseValues.emailToSendBody.value }}",
"options": {
"appendAttribution": false
},
"subject": "={{ $json.responseValues.emailToSendSubject }}",
"emailType": "text"
},
"credentials": {},
"typeVersion": 2.1
},
{
"id": "eacf795f-111e-4e09-9e27-cc87f08c38e4",
"name": "¿Está aprobado?",
"type": "n8n-nodes-base.if",
"position": [
880,
448
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4a2c31a4-ba0e-46de-a4b1-8f8488d841cd",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.response }}",
"rightValue": "approved"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "12907535-d4bd-427f-9e3b-aba347c95d8f",
"name": "Nota Adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1952,
-704
],
"parameters": {
"width": 704,
"height": 832,
"content": "## 💼 Lead Outreach Agent\nThis AI workflow helps you quickly react to new leads with an initial personalized outreach. A great start of your lead nurturing sequence to avoid loosing precious leads that could turn into paying customers.\nMost importantly it uses **gotoHuman** so you can review the AI-analysis and the AI-generated editable email draft before it is sent out in your name.\n\n### How to set up\n\n1. **Most importantly, [install the gotoHuman node](https://docs.gotohuman.com/Integrations/n8n#add-the-node) before importing this template!**\n(Just add the node to a blank canvas before importing)\n2. Set up your credentials for the different services\n3. In gotoHuman, select and create the pre-built review template \"Lead Outreach Agent\" or import the ID: `T873fI1Xli5nt3eh33Rj`\n4. Select this template in the gotoHuman node\n\n## Requirements\n\nYou need accounts for\n- gotoHuman (Human Supervision)\n- OpenAI (AI Agent)\n- Typeform (Lead Form Submissions)\n- Firecrawl (Website Scraping)\n- Gmail\n- Google Docs (Company Wiki)\n\n## How to customize\n\n- Replace the Typeform trigger with any other way you might receive or find new leads\n- Provide the _AI Sales Agent_ with more context to properly analyze the lead and create better personalized emails. Consider adding tools that allow the agent to fetch more infos about the prospect's company or personal profile, or to find out more about your specific product/service offerings and how your sales pitches look like."
},
"typeVersion": 1
},
{
"id": "cac04e35-b084-4737-b201-0baa711bd87e",
"name": "Nota Adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
32,
-736
],
"parameters": {
"width": 560,
"height": 1040,
"content": "\n\n"
},
"typeVersion": 1
},
{
"id": "d8d24fc1-ab4e-4f9f-a3b1-7dbd1ce0bac9",
"name": "Nota Adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
-576
],
"parameters": {
"color": 7,
"width": 992,
"height": 368,
"content": "## Receive lead and check email\nWe receive a new form submission incl. the email address and company name of the prospect and extract the website URL from the address. We proceed only for company email addresses."
},
"typeVersion": 1
},
{
"id": "7f8bbfae-cfd6-4f2f-977e-6c1758e31dbd",
"name": "Nota Adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
-176
],
"parameters": {
"color": 7,
"width": 992,
"height": 368,
"content": "## Scrape and Summarize Company Website\nWe scrape the website using Firecrawl and summarize it with OpenAI"
},
"typeVersion": 1
},
{
"id": "72c21482-fe16-42b5-be80-fdca47f14c48",
"name": "Nota Adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
240
],
"parameters": {
"color": 7,
"width": 992,
"height": 640,
"content": "## AI Analysis and Outreach Drafting\nOur AI agent runs an analysis based on the lead information and documents describing our own company and the defined Ideal Customer Profiles.\nIt also fetches previously approved examples from **gotoHuman** so you're effectively creating a **self-learning** agent.\nIt responds with the analysis and the drafted outreach email."
},
"typeVersion": 1
},
{
"id": "5d671365-1e9d-457a-b56f-b50c31165e22",
"name": "Nota Adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
368
],
"parameters": {
"color": 7,
"width": 336,
"height": 336,
"content": ""
},
"typeVersion": 1
},
{
"id": "58b912fb-6ed1-4c5f-a847-67e6175ce169",
"name": "Nota Adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
752,
256
],
"parameters": {
"color": 7,
"width": 560,
"height": 544,
"content": "## Send Human-Approved Email\nWe can now send our email including any edits made during the review and be sure that we are using high-quality content instead of AI slop."
},
"typeVersion": 1
}
],
"pinData": {
"Typeform Trigger": [
{
"Company": "Air Canada",
"Work Email": "fred.moltens@aircanada.com"
}
]
},
"connections": {
"eacf795f-111e-4e09-9e27-cc87f08c38e4": {
"main": [
[
{
"node": "79fc41ac-2357-49f2-9fef-abc0dd995efc",
"type": "main",
"index": 0
}
]
]
},
"90494bf7-7ca2-476c-a403-dcc21a9d9da6": {
"main": [
[
{
"node": "0373be96-43e3-419b-9d7d-31360be25113",
"type": "main",
"index": 0
}
]
]
},
"718dcac5-5244-4b89-829a-fe155a40922c": {
"main": [
[
{
"node": "2a4a1c0f-82cd-4855-a781-191e3d66efa5",
"type": "main",
"index": 0
}
]
]
},
"765f12b4-f9cd-4824-a0e2-6236b730fa49": {
"main": [
[
{
"node": "718dcac5-5244-4b89-829a-fe155a40922c",
"type": "main",
"index": 0
}
]
]
},
"246927ff-c4bf-4262-bde5-633c5ac58094": {
"ai_languageModel": [
[
{
"node": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"ffb75d90-cff6-4db8-b9fb-6ff162e8edd2": {
"main": [
[
{
"node": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"type": "main",
"index": 0
}
]
]
},
"9383f89d-befe-4a0e-b645-85bc97d4c6a3": {
"main": [
[],
[
{
"node": "a5a9eea3-a479-4783-b663-b0ae2ed4363f",
"type": "main",
"index": 0
}
]
]
},
"a5a9eea3-a479-4783-b663-b0ae2ed4363f": {
"main": [
[
{
"node": "ffb75d90-cff6-4db8-b9fb-6ff162e8edd2",
"type": "main",
"index": 0
}
]
]
},
"01b6354c-c7c6-4bba-83d5-b97d96a28e15": {
"ai_tool": [
[
{
"node": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"type": "ai_tool",
"index": 0
}
]
]
},
"952dec83-6929-452c-b6ef-2c623b776a88": {
"ai_tool": [
[
{
"node": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"type": "ai_tool",
"index": 0
}
]
]
},
"e57e25f5-3a90-45c0-8dc9-6e1a31f8537c": {
"ai_tool": [
[
{
"node": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"type": "ai_tool",
"index": 0
}
]
]
},
"0373be96-43e3-419b-9d7d-31360be25113": {
"main": [
[
{
"node": "eacf795f-111e-4e09-9e27-cc87f08c38e4",
"type": "main",
"index": 0
}
]
]
},
"c165c375-74ec-4537-a525-97e9d78ae00d": {
"ai_outputParser": [
[
{
"node": "90494bf7-7ca2-476c-a403-dcc21a9d9da6",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"2a4a1c0f-82cd-4855-a781-191e3d66efa5": {
"main": [
[
{
"node": "9383f89d-befe-4a0e-b645-85bc97d4c6a3",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Varios, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
gotoHuman
@gotohumanApprove critical actions in gotoHuman’s customizable review interface and edit AI outputs manually or by looping back to your workflow. Ensure AI-generated content is on-brand, messages to customers are accurate, and high-stakes decisions are made by humans.
Compartir este flujo de trabajo