← Back to library

Stop a booking agent from double-booking after a timeout

ccch713, who operates an appointment agent for a dental practice, described on the n8n Community forum how a timed-out booking call led the agent to tell a patient they were booked while a background retry created a second identical appointment. The fixes were decision rules, not a bigger timeout. We turn them into a checklist.

  • OutcomeChange an appointment agent so that a timed-out booking call counts as unknown rather than done, the agent tells the customer a person will confirm instead of saying they are booked, every write carries a request key so a retry cannot create a second appointment, and a forced-timeout test runs after every workflow change.
  • SetupAn afternoon+
  • LevelIntermediate
  • Creditccch713
View original
Works with
n8nCustom agentChatGPTClaude

Published Nov 9, 2026Updated Nov 9, 2026AI dry run on sample input: passed Nov 9, 2026Source verified Nov 9, 2026

When should you use it?

  • An agent books, cancels or changes appointments, orders or payments through a tool or API
  • Your workflow retries failed calls automatically, or the platform does it for you
  • Customers have ever received two confirmations, two invoices or two bookings for one request

Not for: Read-only agents that only look things up, where a repeated call does no harm; Booking systems with no way to attach a request ID or look up an existing booking; Teams that cannot staff the hand-off when the agent says a person will confirm

What do you need, and what do you get?

You need

  • The agent's booking, cancel and change tools and how each one reports success
  • A way to build a stable key per request, such as patient, slot and conversation ID
  • Somewhere to send uncertain cases for a person to confirm
  • A test setup where you can force a tool call to time out

You get

  • A rule in the agent's instructions that a timeout or empty reply is never confirmed to the customer
  • Write actions that carry a request key, so a repeat changes nothing
  • A hand-off message and a queue of unconfirmed bookings for staff
  • A permanent forced-timeout acceptance test that runs on every change

How does it work, step by step?

  1. List every write toolWrite down each tool that creates, changes or cancels something, and what a success, a failure and a timeout look like for each.
  2. Add a request keyBuild one key from the details that make a booking unique and send it with every write, so the booking system can ignore a repeat.
  3. Rewrite the success ruleTell the agent that only an explicit success reply counts, and that a timeout means it must say a person will confirm.
  4. Route the unknownsSend every unconfirmed request to a staff queue with the key, so someone checks the calendar before calling the customer.
  5. Make the timeout test permanentForce one booking call to time out in a test run, check there is one booking and an honest reply, and rerun that test whenever the workflow changes.

The prompt

Our own prompt, inspired by ccch713 and written to work in n8n, Custom agent, ChatGPT and others. Values in lime are placeholders.

Fill in the blanks (optional; the copied prompt uses your values)

Prompt6 variables
You book appointments for {business_name} using the {booking_tool} tool.
Every booking, change or cancel call must include request_key = {customer_id}-{slot}-{conversation_id}.
Treat a call as successful only when the tool returns an explicit confirmation with a booking ID.
If the tool times out, errors or returns nothing, do not tell the customer they are booked. Say: "I've passed this to our team to confirm and they will message you shortly." Then add the request to {staff_queue} with the request key.
Never retry a write with a new key, and never call the booking tool twice for the same request on your own.

Inspired by ccch713: n8n Community: duplicate bookings after a tool timeout. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Raising the timeout only hides the problem until the next slow day, and the agent still cannot tell what happened.
  • Turning retries off swaps a double booking for a lost one. Keep retries, but make repeats harmless.
  • An instruction to keep trying until it works is how one request becomes three appointments.
  • A request key built from the timestamp of each attempt changes on every retry, so it protects nothing. Build it from the request, not the attempt.

Our take

This is a short post with an unusually clear lesson: the dangerous failure in an agent workflow is not the error, it is the moment the agent cannot tell whether its action happened. The clinic's agent filled that gap the way language models tend to, by sounding confident, and a background retry turned that confidence into a second appointment. We like that the author lists the tempting wrong fixes, because each one is what most teams try first: a longer timeout, no retries, or an instruction to keep trying. The real fix has two halves that need each other. The agent must treat silence as unknown and hand off, and the system must make a repeated write harmless with a request key. Either half alone still leaves a hole. The part we would copy first is the permanent forced-timeout test, because it is cheap to build and keeps protecting you after the people who remember the incident move on. In our dry run with a fictional physiotherapy clinic, a forced timeout produced one booking, an honest hand-off reply and a queue item for staff.

Where the time goes back: One honest hand-off message costs a staff member a minute, while a double booking costs a phone call, a cancellation, an empty chair and some trust.

FAQ

Is this specific to n8n?
No. The incident was shared on the n8n forum, but the author says the lessons apply whatever your stack is. Any agent that writes to a calendar, store or ledger through a tool can double-act on a retry.
What is a request key in plain terms?
A label that stays the same for one customer request no matter how many times the call is sent. The booking system remembers labels it has seen and ignores a second write with the same one.
Did the change work?
The author reports no duplicate bookings since the change, and says the forced-timeout test has since caught two unrelated bugs in other workflows.

Source and credit

Inspired by ccch713. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
n8n Community: duplicate bookings after a tool timeout
Creator
ccch713
Published on
n8n Community
Original date
Nov 9, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
n8n
AI dry run
Nov 9, 2026: passed. Dry-run tested by our AI test agent on sample input. Forced timeout: one booking with the key (two without), honest hand-off reply, staff queue item created.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Nov 9, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Customer Support

All 27 Customer Support playbooks →

Related playbooks

Customer SupportPrompt✓ AI dry run

Find the bugs in your intake chatbot with one test chat per rule

Write a small set of test chats, each aimed at one rule in your bot's field spec with the stored values you expect written down first, and catch errors a large pile of happy-path chats misses.

Credit: Adam (Adam13y)

Under an hour
Customer SupportWorkflow✓ AI dry run

Book tutoring sessions through a WhatsApp chat agent

Let parents and students book, move and confirm lessons in WhatsApp with an agent tied to the tutoring calendar and its booking rules.

Credit: MarcoKueks on Hacker News

An afternoon+
Customer SupportPrompt✓ AI dry run

Clean up saved support replies before your bot reuses them

Read every saved answer your support bot can pull from as if it were about to be sent to a stranger, rewrite the risky ones into generic answers and set rules so new ones are written that way.

Credit: Pierre-Laurent Medori

Under an hour
Customer SupportWorkflow✓ AI dry run

Connect a hosted voice receptionist to your booking system

Let a phone receptionist built on a hosted voice platform look up, book and cancel appointments by exposing your scheduling actions as MCP tools you host.

Credit: MitziMoto on Hacker News

An afternoon+
Customer SupportWorkflow✓ AI dry run

Draft email replies with AI and keep sending manual

Every real email gets a drafted reply waiting in your drafts folder; automated senders are skipped and nothing is sent for you.

Credit: u/Limbox0 on r/n8n

Under an hour