{
  "name": "Automate lead qualification with RetellAI Phone Agent, OpenAI GPT & Google Sheet",
  "nodes": [
    {
      "id": "78f39980-c9f8-49b6-93bb-a1f61d347ac3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        0
      ],
      "parameters": {
        "width": 1260,
        "height": 320,
        "content": "# Outbound lead qualification call workflow"
      }
    },
    {
      "id": "661006b9-dac7-4ac0-882a-2e0cba9dbae1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        360
      ],
      "parameters": {
        "width": 1260,
        "height": 320,
        "content": "# Inbound call appointment scheduler workflow"
      }
    },
    {
      "id": "96a278b9-8d2e-4f85-9f6a-2997932a7ca4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        -420
      ],
      "parameters": {
        "width": 1400,
        "height": 1100,
        "content": "# Post-call workflow\n## Triggers when a new lead is added in Google Sheets:\n\n### 1 -Sends SMS to remind rep to call in 5 min\n### 2- (Optional delay step)\n### 3- Triggers RetellAI to place an automated"
      }
    },
    {
      "id": "d082f904-f185-4615-b0d8-9438c731786f",
      "name": "Detect new lead in Google Sheets",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -160,
        100
      ]
    },
    {
      "id": "c61172c2-7795-47be-acaa-d4824ca69680",
      "name": "Send SMS reminder to call lead in 5 minutes",
      "type": "n8n-nodes-base.twilio",
      "position": [
        140,
        100
      ]
    },
    {
      "id": "d88573d4-ec99-40e4-8603-f1e910d034d1",
      "name": "Wait 5 minutes before making call",
      "type": "n8n-nodes-base.wait",
      "position": [
        460,
        100
      ]
    },
    {
      "id": "d6778895-90dd-471e-9d9d-c48a35154291",
      "name": "Call new lead using RetellAI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        760,
        100
      ]
    },
    {
      "id": "8e7e7c0c-2600-4b20-ba30-b855d456d302",
      "name": "Receive inbound call from RetellAI (webhook)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -160,
        460
      ]
    },
    {
      "id": "36bf25b0-d39d-4127-b005-5e3619069744",
      "name": "Check if phone number exists in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        300,
        460
      ]
    },
    {
      "id": "0b2dc7b9-84c1-488b-9d02-47cf6ee460c7",
      "name": "Send response to inbound webhook call",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        760,
        460
      ]
    },
    {
      "id": "063a4a31-429f-4cf0-b248-869131e92633",
      "name": "Receive post-call data from RetellAI (webhook)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1180,
        80
      ]
    },
    {
      "id": "215e2031-983a-4785-b46d-026f64c115e4",
      "name": "Filter for analyzed calls only",
      "type": "n8n-nodes-base.filter",
      "position": [
        1400,
        80
      ]
    },
    {
      "id": "f8cae0c3-1b5d-47e6-b7fd-b47558c30d3f",
      "name": "Check if call was outbound",
      "type": "n8n-nodes-base.if",
      "position": [
        1620,
        80
      ]
    },
    {
      "id": "8997d5ec-bfb9-4ce9-9e13-6035f02b634e",
      "name": "Update lead record in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1860,
        -40
      ]
    },
    {
      "id": "20757ff8-6604-4c80-96ec-32bfac983ed7",
      "name": "Send call summary email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2220,
        -40
      ]
    },
    {
      "id": "753bd92d-b95b-4710-bf49-6da89a43223f",
      "name": "Generate call summary with OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1860,
        180
      ]
    },
    {
      "id": "cf600277-bb07-4f7a-a9b7-3e20017f716d",
      "name": "Send confirmation email to lead",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2220,
        180
      ]
    },
    {
      "id": "f75763b6-0867-4625-89e1-cafa3c9e6e44",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -420
      ],
      "parameters": {
        "width": 1260,
        "height": 400,
        "content": "# ✅ General Workflow Explanation\n##  This workflow automates outbound and inbound lead calls with RetellAI, Google Sheets, OpenAI, and Gmail. It handles:\n\nScheduling and reminding outbound qualificati"
      }
    }
  ],
  "connections": {
    "Check if call was outbound": {
      "main": [
        [
          {
            "node": "Update lead record in Google Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate call summary with OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter for analyzed calls only": {
      "main": [
        [
          {
            "node": "Check if call was outbound",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect new lead in Google Sheets": {
      "main": [
        [
          {
            "node": "Send SMS reminder to call lead in 5 minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate call summary with OpenAI": {
      "main": [
        [
          {
            "node": "Send confirmation email to lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5 minutes before making call": {
      "main": [
        [
          {
            "node": "Call new lead using RetellAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update lead record in Google Sheets": {
      "main": [
        [
          {
            "node": "Send call summary email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send SMS reminder to call lead in 5 minutes": {
      "main": [
        [
          {
            "node": "Wait 5 minutes before making call",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive inbound call from RetellAI (webhook)": {
      "main": [
        [
          {
            "node": "Check if phone number exists in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if phone number exists in Google Sheets": {
      "main": [
        [
          {
            "node": "Send response to inbound webhook call",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive post-call data from RetellAI (webhook)": {
      "main": [
        [
          {
            "node": "Filter for analyzed calls only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}