> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diga.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel appointment (Cal.com)

> During-call workflow that cancels an existing Cal.com booking

<Note>
  **Related workflows:** [Find appointment (Cal.com)](/en/templates/flows/find-appointment-cal-com).

  **Related agents:** [Appointment management (Cal.com)](/en/templates/agents/appointment-management-cal-com).
</Note>

## What it does

The agent passes it the booking's identifier (`booking_uid`, obtained from [Find appointment](/en/templates/flows/find-appointment-cal-com)) and, if the customer gave one, a reason, and the workflow **cancels the booking** in Cal.com.

Like [Reschedule appointment](/en/templates/flows/reschedule-appointment-cal-com), it distinguishes between success and failure: if Cal.com can't cancel the booking, the agent gets a different message than the success one, instead of being left with no response.

It's a [during-call workflow](/en/build/flows/during-call-flows) running in sync mode.

## How it works

| Step                                   | What it does                                                                        |
| -------------------------------------- | ----------------------------------------------------------------------------------- |
| **Cancel booking in Cal**              | Calls Cal.com to cancel the given booking, with the reason if there is one.         |
| **Check cancellation status**          | Router that splits the result depending on whether Cal.com returned success or not. |
| **Return Response (canceled / error)** | Responds to the agent with the matching message.                                    |

If the customer doesn't give a reason, the agent template sends `Motivo no especificado` (Reason not specified).

## What you need

* A Cal.com [connection](/en/platform/connections)
* The [Find appointment (Cal.com)](/en/templates/flows/find-appointment-cal-com) workflow, to get the `booking_uid`

## Getting started

<Steps>
  <Step title="Copy the template">
    From the **Workflows** section, open the template catalog and copy it. The workflow is created disabled.
  </Step>

  <Step title="Select the Cal.com connection">
    In the **Cancel booking in Cal** step, add your Cal.com connection.
  </Step>

  <Step title="Publish the workflow">
    [Publish](/en/build/flows/creating-workflows#draft-vs-published) the workflow.
  </Step>

  <Step title="Assign it to the agent">
    Add it from the agent's **Workflows** section. The workflow's name is the tool name the agent sees, so leave it as `cancel_appointment`. This step isn't needed if the workflow was created from the agent.
  </Step>
</Steps>

## Before publishing

* **Canceling is irreversible.** The workflow doesn't ask for confirmation on its own: that's down to the agent's prompt, which repeats the day and time out loud before calling this tool.
* **The success check depends on an internal field from the Cal.com piece** (`status: "success"`), same as in [Reschedule appointment](/en/templates/flows/reschedule-appointment-cal-com#before-publishing).
* **The workflow only cancels.** It doesn't automatically offer another slot: if the customer wants a new appointment after canceling, the agent's prompt is what restarts the booking flow.

## Next Steps

<CardGroup cols={2}>
  <Card title="Find appointment (Cal.com)" icon="magnifying-glass" href="/en/templates/flows/find-appointment-cal-com">
    Where the uid this workflow needs comes from.
  </Card>

  <Card title="Reschedule appointment (Cal.com)" icon="calendar-clock" href="/en/templates/flows/reschedule-appointment-cal-com">
    The alternative when the customer wants to move the appointment instead of canceling it.
  </Card>

  <Card title="Appointment management (Cal.com)" icon="calendar-check" href="/en/templates/agents/appointment-management-cal-com">
    The agent that uses this workflow.
  </Card>
</CardGroup>
