{
  "id": "pCfyeWKAejNPSLzR",
  "name": "Call Sessions with Plivo and UltraVox AI Voice Assistant",
  "tags": [],
  "nodes": [
    {
      "id": "179732eb-eace-4d8c-a1eb-15443b94a493",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -380,
        -40
      ],
      "parameters": {
        "path": "40fa0470-c3c1-4bf2-a91b-7cad92bd71db",
        "options": {
          "allowedOrigins": "*"
        },
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "4b62488a-1cb4-444a-b309-ede8dcbe8a58",
      "name": "UltraVox API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -160,
        -40
      ],
      "parameters": {
        "url": "https://api.ultravox.ai/api/calls",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"voice\":\"c2c5cce4-72ec-4d8b-8cdb-f8a0f6610bd1\",\n  \"medium\":{\"plivo\":{}\n  },\n  \"systemPrompt\":\"You are a female voice assistant for Gurukrupa Physiotherapy Clinic, a physiotherapy center located at Beed, Maharashtra. The clinic hours are: Monday to Saturday: 10 AM ti 2 PM and 5 PM \u2013 9 PM Sunday is Closed Gurukrupa Physiotherapy Clinic provides expert physiotherapy services to help patients recover from back pain, joint pain, paralysis, sports injuries, and post-surgical rehab. Your job is to answer questions about the clinic and book appointments. If someone wants to book an appointment, gather these details: Ask for their full name. Ask for the reason for their visit (e.g., back pain, injury, rehab). Request their preferred date and time. Confirm all details before finalizing the appointment. Be friendly, warm, and slightly witty! Keep responses short and conversational\u2014like a real chat. Use casual phrases like Gotcha!, Alrighty!, and No worries!. Keep the tone trustworthy, professional, and caring\u2014this is healthcare, after all! Start with Greeting : \u0b89\u0b99\u0bcd\u0b95\u0bb3\u0bcd Gurukrupa Physiotherapy Clinic-\u0b95\u0bcd\u0b95\u0bc1 \u0bb5\u0bb0\u0bb5\u0bc7\u0bb1\u0bcd\u0b95\u0bbf\u0bb1\u0bcb\u0bae\u0bcd! \u0ba8\u0bbe\u0ba9\u0bcd \u0b89\u0b99\u0bcd\u0b95\u0bb3\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0b89\u0ba4\u0bb5 \u0b87\u0b99\u0bcd\u0b95\u0bc7 \u0b87\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb1\u0bc7\u0ba9\u0bcd.\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9c031c9a-564d-41e5-a391-db4d6127d2e5",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        200,
        -40
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "text/xml"
              }
            ]
          }
        },
        "respondWith": "text",
        "responseBody": "=<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response>\n<Stream keepCallAlive=\"true\" bidirectional=\"true\" contentType=\"audio/x-l16;rate=16000\">{{ $json.joinUrl }}</Stream>\n</Response>\n"
      },
      "typeVersion": 1.1
    },
    {
      "id": "fb9d431e-b772-4e20-9b2c-55fd1f6d1f84",
      "name": "Join URL",
      "type": "n8n-nodes-base.set",
      "position": [
        40,
        -40
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d46d8697-e784-44fb-a4bb-e1a5811a746d",
              "name": "joinUrl",
              "type": "string",
              "value": "={{ $json.joinUrl }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f9fb4f49-e268-461b-ab2e-31eeb8478196",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -240
      ],
      "parameters": {
        "width": 860,
        "content": "## Create and Join Call Sessions with Plivo and UltraVox AI Voice Assistant\nAdd Your UltraVox key in UltraVox Credentials.\nCheck youtube Video for Detailed Instructions : https://www.youtube.com/watch?v=Acbs3ouc4FQ "
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ab237196-1509-4f55-8bf5-0c4aaa12a52e",
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "UltraVox API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Join URL": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UltraVox API": {
      "main": [
        [
          {
            "node": "Join URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        []
      ]
    }
  }
}