Automatización de llamadas de calificación de prospectos de Salesforce a Retell AI, con análisis de OpenAI

Avanzado

Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 16 nodos.Utiliza principalmente nodos como If, Wait, Webhook, Salesforce, HttpRequest. Automatización de llamadas de calificación de prospectos con Salesforce, Retell AI y análisis de OpenAI

Requisitos previos
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Credenciales OAuth de Salesforce
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Clave de API de OpenAI
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "IEetUVoebokNrPxb",
  "meta": {
    "instanceId": "d079d0556839d25db7f4c49e8ddbbaf17161635fc37c28484392702c5c5af183"
  },
  "name": "Automate lead qualification calls from Salesforce to Retell AI with OpenAI analysis",
  "tags": [
    {
      "id": "Cl1eHsYeirJh9xXC",
      "name": "salesforce",
      "createdAt": "2025-09-25T14:48:46.184Z",
      "updatedAt": "2025-09-25T14:48:46.184Z"
    },
    {
      "id": "WqlAbE0vrnEFnGlR",
      "name": "retell-ai",
      "createdAt": "2025-09-25T14:48:46.222Z",
      "updatedAt": "2025-09-25T14:48:46.222Z"
    },
    {
      "id": "12vfEq8FpRcUygXu",
      "name": "openai",
      "createdAt": "2025-09-25T14:48:46.239Z",
      "updatedAt": "2025-09-25T14:48:46.239Z"
    },
    {
      "id": "ushFMOectpmGcCTK",
      "name": "lead-qualification",
      "createdAt": "2025-09-25T14:48:46.258Z",
      "updatedAt": "2025-09-25T14:48:46.258Z"
    },
    {
      "id": "SndsxmrXHvpxoPFi",
      "name": "voice-automation",
      "createdAt": "2025-09-25T14:48:46.203Z",
      "updatedAt": "2025-09-25T14:48:46.203Z"
    }
  ],
  "nodes": [
    {
      "id": "8b0f5e59-f1d4-4e40-b1ef-3953728a119e",
      "name": "StickyNote",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 632,
        "height": 668,
        "content": "## 🎯 Salesforce AI Voice Sales Agent for Lead Management  \n**Transform your lead qualification process with automated AI-powered phone calls triggered directly from Salesforce lead creation.**\n\n### What this workflow does:\n1. **Webhook Trigger**: Receives new lead data from Salesforce\n2. **Automated Calling**: Initiates phone calls via Retell AI\n3. **Smart Monitoring**: Polls call status until completion\n4. **AI Analysis**: Uses OpenAI to analyze call transcripts\n5. **Salesforce Integration**: Creates follow-up tasks with insights\n\n### Perfect for:\n- Sales teams wanting to qualify leads faster\n- Companies using Salesforce CRM\n- Organizations looking to automate initial prospect outreach\n- Teams wanting AI-powered call analysis\n\n### You'll need:\n- Salesforce org with lead creation triggers\n- Retell AI account and agent setup\n- OpenAI API access\n- Basic n8n workflow knowledge\n\n### Setup time: ~30 minutes\n\n**Author**: Sri Kolagani\n**Template Type**: Free"
      },
      "typeVersion": 1
    },
    {
      "id": "b1e3ca3c-b862-4cc8-86d5-47d184670a99",
      "name": "StickyNote1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        32
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 140,
        "content": "### 📞 Step 1: Receive Lead Data\nWebhook receives lead information from Salesforce when new leads are created"
      },
      "typeVersion": 1
    },
    {
      "id": "5d71744c-c1f6-4a17-859d-5d3128486d3a",
      "name": "🔗 Recibir lead de Salesforce",
      "type": "n8n-nodes-base.webhook",
      "position": [
        368,
        208
      ],
      "webhookId": "e924742f-43e2-447c-9faa-7d48a424a31c",
      "parameters": {
        "path": "salesforce-lead",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "cfbe47aa-7b38-44ed-a0b8-73cd38f9414f",
      "name": "StickyNote2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -64
      ],
      "parameters": {
        "color": 7,
        "width": 332,
        "height": 244,
        "content": "### 📱 Step 2: Initiate Phone Call\nStarts automated call using Retell AI with lead's phone number\n\n**⚙️ Setup Required:**\n- Add your Retell AI API key to credentials\n- Update from_number with your phone number\n- Update agent_id with your Retell agent ID"
      },
      "typeVersion": 1
    },
    {
      "id": "3a6395a4-7c13-4a93-a2da-62d5f4ee8642",
      "name": "📞 Iniciar llamada de Retell AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        720,
        208
      ],
      "parameters": {
        "url": "https://api.retellai.com/v2/create-phone-call",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "from_number",
              "value": "YOUR_RETELL_PHONE_NUMBER"
            },
            {
              "name": "to_number",
              "value": "={{$json.body.Phone}}"
            },
            {
              "name": "agent_id",
              "value": "YOUR_RETELL_AGENT_ID"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{$credentials.retellAI.apiKey}}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "DlORXjzy3RW1zezw",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "dc9d05f2-8c61-4ffd-9d85-56da6972010d",
      "name": "StickyNote3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 252,
        "height": 120,
        "content": "### ⏱️ Step 3: Monitor Call Status\nPolls Retell AI API to check if call has ended"
      },
      "typeVersion": 1
    },
    {
      "id": "bd51f99e-e5da-4369-b7a9-d8bf4b64c528",
      "name": "🔍 Verificar estado de la llamada",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1136,
        208
      ],
      "parameters": {
        "url": "={{`https://api.retellai.com/v2/get-call/${$node['📞 Start Retell AI Call'].json.call_id}`}}\n",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{$credentials.retellAI.apiKey}}"
            }
          ]
        },
        "nodeCredentialType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "78992ed0-5800-4f73-beb8-cd5ae9280060",
      "name": "StickyNote4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 120,
        "content": "### ✅ Step 4: Call Completion Check\nVerifies if call has ended before proceeding to analysis"
      },
      "typeVersion": 1
    },
    {
      "id": "cec948af-4f4a-4c59-82b5-839c77f5fed1",
      "name": "❓ ¿Está completada la llamada?",
      "type": "n8n-nodes-base.if",
      "position": [
        1360,
        208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "cond1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{$json.body.call_status}}",
              "rightValue": "ended"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "47eb73aa-039f-4fcb-b050-44c37b59e897",
      "name": "StickyNote5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        320
      ],
      "parameters": {
        "color": 7,
        "width": 250,
        "height": 100,
        "content": "### ⏳ Wait & Retry\nWaits 10 seconds before checking call status again"
      },
      "typeVersion": 1
    },
    {
      "id": "620d9049-7a4f-456c-9006-637a46b30d4b",
      "name": "⏱️ Esperar 10 segundos",
      "type": "n8n-nodes-base.wait",
      "position": [
        1360,
        384
      ],
      "webhookId": "82f13f3a-9edf-4dcc-ac34-cc3a4c682e74",
      "parameters": {
        "unit": "seconds",
        "amount": 10
      },
      "typeVersion": 1
    },
    {
      "id": "6166d7df-b0c6-42ed-a1bf-96fc3ffba917",
      "name": "StickyNote6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 316,
        "height": 208,
        "content": "### 🧠 Step 5: AI Call Analysis\nOpenAI analyzes the call transcript and extracts key insights\n\n**⚙️ Setup Required:**\n- Add your OpenAI API key to credentials\n- Model uses GPT-3.5-turbo (cost-effective)"
      },
      "typeVersion": 1
    },
    {
      "id": "bce9067d-9ef6-43c6-ad91-561babb1c17e",
      "name": "🤖 Modelo de chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1680,
        480
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-3.5-turbo",
          "cachedResultName": "gpt-3.5-turbo"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "afdad610-3138-4524-8b95-d403a0b31469",
      "name": "🎯 Analizar transcripción de la llamada",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1680,
        192
      ],
      "parameters": {
        "text": "=You are a professional sales call summarization assistant.\n\nCall ID: {{$json[\"body\"][\"call_id\"]}}\n\nTranscript:\n{{$json[\"body\"][\"transcript\"]}}\n\nPlease return a structured JSON with the following keys:\n- purpose: Brief description of the call's purpose\n- keyDiscussionPoints: Main topics discussed (array)\n- leadResponses: Lead's key responses and interest level\n- nextActions: Recommended follow-up actions (array)\n- overallOutcome: Success/failure assessment with reasoning\n",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "36072118-1756-435a-96e0-f9d4a2ce332f",
      "name": "StickyNote7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1984,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 364,
        "height": 208,
        "content": "### 📋 Step 6: Create Follow-up Task\nCreates a task in Salesforce with AI analysis results\n\n**⚙️ Setup Required:**\n- Connect your Salesforce account via OAuth2\n- Ensure proper Salesforce permissions for task creation"
      },
      "typeVersion": 1
    },
    {
      "id": "01a5fdf5-13d2-46cc-ac63-b917521ad84f",
      "name": "📝 Crear tarea en Salesforce",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        2096,
        192
      ],
      "parameters": {
        "status": "Not Started",
        "resource": "task",
        "additionalFields": {
          "type": "Call",
          "subject": "=Lead Qualification Call Analysis - {{ $now.toFormat('yyyy-MM-dd HH:mm') }}",
          "description": "={{ $json.output }}"
        }
      },
      "executeOnce": true,
      "notesInFlow": false,
      "typeVersion": 1,
      "alwaysOutputData": false
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f16792a3-b973-4faa-b848-56d603211a92",
  "connections": {
    "cec948af-4f4a-4c59-82b5-839c77f5fed1": {
      "main": [
        [
          {
            "node": "afdad610-3138-4524-8b95-d403a0b31469",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "620d9049-7a4f-456c-9006-637a46b30d4b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "620d9049-7a4f-456c-9006-637a46b30d4b": {
      "main": [
        [
          {
            "node": "bd51f99e-e5da-4369-b7a9-d8bf4b64c528",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bd51f99e-e5da-4369-b7a9-d8bf4b64c528": {
      "main": [
        [
          {
            "node": "cec948af-4f4a-4c59-82b5-839c77f5fed1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bce9067d-9ef6-43c6-ad91-561babb1c17e": {
      "ai_languageModel": [
        [
          {
            "node": "afdad610-3138-4524-8b95-d403a0b31469",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "3a6395a4-7c13-4a93-a2da-62d5f4ee8642": {
      "main": [
        [
          {
            "node": "bd51f99e-e5da-4369-b7a9-d8bf4b64c528",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "afdad610-3138-4524-8b95-d403a0b31469": {
      "main": [
        [
          {
            "node": "01a5fdf5-13d2-46cc-ac63-b917521ad84f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5d71744c-c1f6-4a17-859d-5d3128486d3a": {
      "main": [
        [
          {
            "node": "3a6395a4-7c13-4a93-a2da-62d5f4ee8642",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿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 - Creación de contenido, 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.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos16
Categoría2
Tipos de nodos8
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Autor
Sri Kolagani

Sri Kolagani

@srikolagani

Sri Kolagani is a Senior Engineering Manager of CRM applications at Elastic. He leads engineering teams and supports Sales, Service, Marketing, and Partner Operations, focusing on enabling internal stakeholders through the adoption of new technologies, including generative AI. Prior to joining Elastic, Kolagani held senior leadership positions across financial services, payments, healthcare, and cloud computing.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34