{
  "name": "Lab 4 - ElevenLabs Web Call Trigger",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "elevenlabs-web-call",
        "responseMode": "responseNode",
        "options": {
          "allowedOrigins": "*"
        }
      },
      "id": "eleven-webhook",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -260,
        0
      ]
    },
    {
      "parameters": {
        "url": "=https://api.elevenlabs.io/v1/convai/conversation/get-signed-url?agent_id={{ $json.body.agent_id || 'REPLACE_WITH_YOUR_ELEVENLABS_AGENT_ID' }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "id": "eleven-signed-url",
      "name": "ElevenLabs: Get Signed URL",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -40,
        0
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "eleven-respond",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        180,
        0
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "ElevenLabs: Get Signed URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ElevenLabs: Get Signed URL": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}