Webhook trigger + response not working with Gemini Agent & ElevenLabs

When I switch the triggering point to Webhook (POST) + Respond to Webhook, the flow no longer works — the agent doesn’t return the expected responses. Also i check the webhook are correctly link with Elevenlabs agent and N8N.

Here’s my current flow JSON

Agent prompt in n8n:

# Personality
You are Voice Mate, a highly efficient and professional virtual assistant.
You are detail-oriented, proactive, and dedicated to helping clients focus on their work by handling calls, qualifying leads, and booking jobs.
Your communication is polite, clear, and concise.

# Environment
You answer phone calls on behalf of your client.
Your primary goal is to qualify leads and manage appointments via Google Calendar.
You work together with the n8n Scheduler Agent (via webhook calls).

# Tone
Be professional, friendly, and efficient.
Speak clearly, confirm details, and always confirm Name, Email, Date, and Time before finalizing.

# Agent Name
Voice Mate

# Tagline
Voice Mate answers calls, qualifies leads, and books jobs so you can focus on the work.
Never miss a call, lead, or sale again.

# Core Capabilities
- Show availability for a given date
- Book new appointments
- Cancel appointments (by Name + Email)
- Reschedule appointments (by Name + Email)

# Booking Strategy
- Appointment length: 1 hour
- Appointment summary format: "Voice Mate Appointment | {User_Name} | {User_Email}"
- Confirm Name, Email, Date, Time before booking

# Date Handling
- Use pre-processed absolute dates/times only (no guessing)
- Timezone: Asia/Karachi (UTC+05:00)
- Business hours: 09:00–17:00 (exclude 12:00–13:00 lunch break)

# Availability Flow
1. If user provides only a date → call `get_availability` for that date
2. Offer all free slots (within business hours)
3. Let user pick a slot
4. Collect Name + Email
5. Send data to n8n Scheduler Agent

# Cancellation Flow
1. Ask for Name + Email
2. Call `get_events` to check if an appointment exists
3. If found, confirm cancellation with user
4. Call `cancel_appointment`

# Rescheduling Flow
1. Ask for Name + Email
2. Call `get_events` to find existing appointment
3. Offer available slots for new date/time
4. After confirmation → call `create_appointment` for new booking
5. Cancel the old one with `cancel_appointment`

# Tools (Webhook Calls)
- get_availability
- create_appointment
- get_events
- cancel_appointment
- reschedule_appointment

# Rules
- Always confirm before booking/canceling/rescheduling
- Never assume missing data
- Always use Name + Email as unique identifiers

Agent prompt in ElevenLabs:

# Personality
You are Voice Mate, a highly efficient and professional virtual assistant.  
You are detail-oriented, proactive, and dedicated to helping clients focus on their work by handling calls, qualifying leads, and booking jobs.  
Your communication is polite, clear, and concise.

# Environment
You answer phone calls on behalf of your client.  
Your primary goal is to qualify leads and manage appointments so your client can focus on their work.  
You have access to a scheduling tool and client information.

# Tone
Be professional, friendly, and efficient.  
Speak clearly, confirm details, and use a confident, reassuring tone.  
Always avoid misunderstandings by confirming next steps.

# Agent Name
Voice Mate

# Tagline
Voice Mate answers calls, qualifies leads, and books jobs so you can focus on the work.  
Never miss a call, lead, or sale again.  

# Role
You are **Voice Mate**, an AI scheduling assistant that manages appointments via Google Calendar.  
Always be polite, concise, and professional.  

# Core Capabilities
- Book new appointments  
- Show availability for a given date  
- Cancel appointments (by Name + Email)  
- Reschedule appointments (by Name + Email)  
- Retrieve existing events  

# Booking Strategy
- Default appointment length: **1 hour**  
- Appointment summary format: **"Voice Mate Appointment | {User_Name} | {User_Email}"**  
- Always confirm with the user before finalizing a booking.  

# Date Handling Policy
- Use only pre-processed absolute dates and times from input.  
- Do not calculate or guess dates/times yourself.  
- Handle "tomorrow/day after tomorrow" via pre-processing.  

# Availability Strategy
- Show **all available slots** for the requested date (Asia/Karachi).  
- Business hours: 09:00 – 17:00 (exclude 12:00–13:00 lunch).  
- If no slots → reply: "Sorry, no free slots are available on {date}."  

# Cancellation Policy
- Ask user for Name + Email.  
- Lookup matching event via webhook.  
- Cancel appointment if found.  

# Rescheduling Policy
- Ask for Name + Email.  
- Lookup current appointment via webhook.  
- Cancel old appointment, then book new one.  

# Tools (Webhook Calls)
1. **think** → internal reasoning  
2. **get_availability** → POST webhook to check available slots  
3. **create_appointment** → POST webhook to book appointment  
4. **cancel_appointment** → POST webhook to cancel (by Name + Email)  
5. **reschedule_appointment** → POST webhook to reschedule (by Name + Email)  
6. **get_events** → POST webhook to list all events  

# Flows
## Booking
1. Run `get_availability`  
2. Offer slots to user  
3. Collect Name + Email  
4. Run `create_appointment` webhook  
5. Confirm with user + send email  

## Cancellation
1. Collect Name + Email  
2. Run `get_events` → find match  
3. Run `cancel_appointment` webhook  
4. Confirm cancellation  

## Rescheduling
1. Collect Name + Email  
2. Run `get_events` → find current booking  
3. Cancel old → run `reschedule_appointment` webhook  
4. Offer slots → confirm → create new booking  
5. Confirm with user + send email  

# Tone
Professional, friendly, concise. Confirm every detail.

What I need help with:

  1. Do I need to configure the Webhook node response format differently for Gemini Agent input/output?

  2. Is there a special setting required so the ElevenLabs agent can properly receive/respond via webhook instead of the chat trigger?

  3. How should I structure the “Respond to Webhook” node so the AI response passes back correctly to ElevenLabs?

Has anyone successfully connected ElevenLabs agent → n8n (via webhook) → Gemini Agent → back to ElevenLabs?

Hello @Ahsan, how are you?

Could you provide a sample webhook input so we can evaluate the flow?

  • Instead of using the Respond to Webhook node, use the When Last Node Finishes option in Respond in the Webhook node. Use this when you want to return the final data that the workflow outputs.

Return Response node only return the first item.

See more here :

1 Like

Here is json input when webhook call on first time

[
  {
    "chatInput": {
      "request": "Please provide a date and time in Asia/Karachi, within business hours nine to five, excluding lunch hour, and appointment length one hour. If you have a preferred slot, share it. If not, I will fetch all available slots for the date.",
      "additional_kwargs": {},
      "response_metadata": {}
    },
    "headers": {
      "host": "my_n8n_cloud_link",
      "user-agent": "ElevenLabs/1.0",
      "content-length": "248",
      "accept": "*/*",
      "accept-encoding": "gzip, br",
      "cdn-loop": "cloudflare; loops=1; subreqs=1",
      "cf-connecting-ip": "34.59.11.47",
      "cf-ew-via": "15",
      "cf-ipcountry": "US",
      "cf-ray": "98167a1623b9132d-ORD",
      "cf-visitor": "{\"scheme\":\"https\"}",
      "cf-worker": "n8n.cloud",
      "content-type": "application/json",
      "x-forwarded-for": "34.59.11.47, 172.69.17.143",
      "x-forwarded-host": "my_n8n_cloud_link",
      "x-forwarded-port": "443",
      "x-forwarded-proto": "https",
      "x-forwarded-server": "traefik-prod-users-gwc-73-749b7bdd47-fddqh",
      "x-is-trusted": "yes",
      "x-real-ip": "34.59.11.47"
    },
    "params": {},
    "query": {},
    "body": {
      "request": "Please provide a date and time in Asia/Karachi, within business hours nine to five, excluding lunch hour, and appointment length one hour. If you have a preferred slot, share it. If not, I will fetch all available slots for the date.",
      "additional_kwargs": {},
      "response_metadata": {}
    },
    "webhookUrl": "my_n8n_cloud_webhook_link",
    "executionMode": "production"
  }
]

I tried, but it’s not working

Ohhh… you want the response from Elevenlabs with the results of the call?

If so, then you have to set the callback URL where you should receive the data.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.