{
  "name": "11Labs Outbound Template",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -256,
        0
      ],
      "id": "e28d1cb7-80f6-4014-bc19-29ab74bff8fc",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.elevenlabs.io/v1/convai/twilio/outbound-call",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"agent_id\": \"agent_id\",\n  \"agent_phone_number_id\": \"phnum_id\",\n  \"to_number\": \"{{ $json.PhoneNumber }}\"\n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        128,
        0
      ],
      "id": "1ac1bf2c-6dbd-4b89-873f-f10e57fff4a4",
      "name": "Make Outbound Call",
      "credentials": {
        "httpHeaderAuth": {
          "id": "CXQnEJbTnrapvSd9",
          "name": "11 Labs"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1SV2xSjO4-ZEI3S-aVNRwl-9LB-SMdUXzrrHXhSA_Jqo",
          "mode": "list",
          "cachedResultName": "Leads To Call",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SV2xSjO4-ZEI3S-aVNRwl-9LB-SMdUXzrrHXhSA_Jqo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SV2xSjO4-ZEI3S-aVNRwl-9LB-SMdUXzrrHXhSA_Jqo/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Status",
              "lookupValue": "New"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -48,
        0
      ],
      "id": "ef8df137-7b80-43a8-9a8c-c249caedabef",
      "name": "Get row(s) in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "y98pXi6BuOFxQJ31",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1SV2xSjO4-ZEI3S-aVNRwl-9LB-SMdUXzrrHXhSA_Jqo",
          "mode": "list",
          "cachedResultName": "Leads To Call",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SV2xSjO4-ZEI3S-aVNRwl-9LB-SMdUXzrrHXhSA_Jqo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SV2xSjO4-ZEI3S-aVNRwl-9LB-SMdUXzrrHXhSA_Jqo/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Status": "Call Completed",
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "PhoneNumber",
              "displayName": "PhoneNumber",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "E164 PhoneNumber",
              "displayName": "E164 PhoneNumber",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        336,
        0
      ],
      "id": "d8838c76-8d44-460b-a98d-e1f01f47a575",
      "name": "Update row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "y98pXi6BuOFxQJ31",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Make Outbound Call",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Make Outbound Call": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "70324163-83d3-4f04-96f9-eb85037adff4",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "7425b88d6f52190dec1f6e67c1b6cffa1a87557717f26de52e85eaddcf276948"
  },
  "id": "dJXEn6a1B749SW5Z",
  "tags": []
}