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

# Connecting Calendly to your app

> Show Calendly availability, event types, and bookings in your app, and run workflows when your bookings change, using one shared account or each person's own.

Connect your app to Calendly to show availability, event types, and bookings. You can also run workflows when someone books, cancels, or is marked as a no-show. Use one shared account for your whole app, or let each person connect their own.

***

## What you can do

Bring your Calendly schedule into your app.

> [card] Show availability
>
> Show open booking slots for an event type, or when someone is busy.

> [card] List event types
>
> Show your Calendly event types in your app, and whether each one is active.

> [card] Track bookings
>
> Show upcoming meetings in a dashboard, or keep your app's records in step with your bookings.

> [card] [Run workflows](#running-workflows)
>
> Start a workflow when someone books, cancels, or is marked as a no-show.

**Example prompts**

Describe what you want your app to show or do in the AI chat. For example:

```text wrap theme={null}
Show upcoming Calendly events in a dashboard.
```

```text wrap theme={null}
Display available booking slots for a Calendly event type.
```

```text wrap theme={null}
Show when a user is busy based on their Calendly schedule.
```

```text wrap theme={null}
Sync booking data from Calendly into my app.
```

***

## Connecting Calendly

Choose how people connect: one shared account for your whole app, or each person's own account.

> [tab] Shared connector
>
> Connect one Calendly account. Every app that uses this connection works with that account's event types, availability, and bookings, for everyone who uses the app.
>
> **To add a shared Calendly connector:**
>
> 1. Click **Connectors** in your workspace sidebar.
>
> 2. Search for **Calendly**, then click **Connect**.
>
>    ![Connectors picker with Calendly typed in Search, the search field outlined and the cursor on Connect](https://mintcdn.com/base44/YoRNGHlj2YFoLuy5/images/apps-connectors-calendly-connect.png?fit=max\&auto=format\&n=YoRNGHlj2YFoLuy5\&q=85\&s=cc1b74ec167e7dd4f52e74796d4a7019)
>
>    Finding Calendly in the Connectors picker
>
> 3. Select **Shared connector**, then click **Next**.
>
> 4. Enter a **Connection name**.
>
> 5. Choose where the connection can be used under **Who can access**:
>    * **Apps and Super agent:** Your apps and your Superagent can both use it. This is the default.
>    * **Apps only:** Only your apps can use it.
>    * **Super agent only:** Only your Superagent can use it.
>
> 6. Choose what your app can do under **Permissions**:
>
>    * **Read-only:** Your app can view your Calendly data. This is the default.
>    * **Read & write:** Your app can also run workflows when bookings change.
>    * **Custom:** Choose exactly which permissions the connection gets. To run workflows, include **webhooks:write**.
>
>    ![Permissions with Custom selected, the scopes list filtered to webhooks and the webhooks:write row outlined](https://mintcdn.com/base44/YoRNGHlj2YFoLuy5/images/apps-connectors-calendly-shared-setup.png?fit=max\&auto=format\&n=YoRNGHlj2YFoLuy5\&q=85\&s=66de9fa50f0e4c91ad803598a14e13c1)
>
>    Choosing custom permissions for a shared Calendly connector
>
> 7. Click **Add connector**.
>
> 8. Sign in to Calendly and allow access.

> [tab] App user connector
>
> Each person connects their own Calendly account, so your app shows their own schedule and bookings.
>
> > [!WARNING]
> >
> > Only workspace owners and admins can set this up.
>
> > [!TIP]
> >
> > **Before you set this up:** You need a Calendly account you can create an OAuth app in. You create the app during these steps, using Calendly's guide to [creating an OAuth app](https://developer.calendly.com/docs/authentication/creating-an-oauth-app).
>
> **To add an app user Calendly connector:**
>
> 1. Click **Connectors** in your workspace sidebar.
>
> 2. Search for **Calendly**, then click **Connect**.
>
>    ![Connectors picker with Calendly typed in Search, the search field outlined and the cursor on Connect](https://mintcdn.com/base44/YoRNGHlj2YFoLuy5/images/apps-connectors-calendly-connect.png?fit=max\&auto=format\&n=YoRNGHlj2YFoLuy5\&q=85\&s=cc1b74ec167e7dd4f52e74796d4a7019)
>
>    Finding Calendly in the Connectors picker
>
> 3. Select **App user connector**, then click **Next**.
>
> 4. Copy the **Callback URL**.
>
>    ![Add Calendly Connection form with the Callback URL outlined and the cursor on its copy button](https://mintcdn.com/base44/YoRNGHlj2YFoLuy5/images/apps-connectors-calendly-app-user-credentials.png?fit=max\&auto=format\&n=YoRNGHlj2YFoLuy5\&q=85\&s=74378ff4aada4eaeceb0cb706705148a)
>
>    Copying the Callback URL in the Add Calendly Connection form
>
> 5. Create your Calendly OAuth app, or open an existing one, and enter the Callback URL as its redirect URI.
>
> 6. Fill in the **Add Calendly Connection** form:
>    * **Connector name:** A name you'll recognize later.
>    * **Client ID** and **Client Secret:** Copy these from your Calendly OAuth app.
>
> 7. (Optional) Clear any scopes your app doesn't need under **Scopes**. They're all selected at first, and [Scopes and permissions](#scopes-and-permissions) says what each one does. To add a scope that isn't listed, enter it under **Additional scopes**.
>
> 8. Click **Add Connector**.
>
> 9. Open your app in the app editor.
>
> 10. Ask the AI chat to add a way for people to connect their own Calendly account.

***

## Scopes and permissions

Scopes control what your app can do in Calendly. You choose them when you set up a connector.

> [card]
>
> **1. Base44 adds**
>
> This is always included, so it shows as a locked scope under **Custom** for a shared connector or under **Scopes** for an app user connector.
>
> * `users:read`: Identify the Calendly account that connects
>
> **2. You configure**
>
> For a shared connector, choose a preset under **Permissions**. **Read-only** gives your app `scheduled_events:read`, `availability:read`, `event_types:read`, `locations:read` and `webhooks:read`. **Read & write** also gives it `webhooks:write`, which your app needs to [run workflows](#running-workflows) when bookings change. Choose **Custom** to pick scopes yourself.
>
> For an app user connector, every Calendly scope is preselected under **Scopes**. Remove any your app doesn't need, and make sure your Calendly OAuth app allows the same scopes:
>
> * `scheduled_events:read`: View scheduled events, the meetings people booked
> * `availability:read`: View availability
> * `event_types:read`: View event types
> * `locations:read`: View event locations
> * `webhooks:read`: View webhook subscriptions
> * `webhooks:write`: Create and delete webhook subscriptions, so workflows can run when bookings change
>
> **Additional scopes** starts empty. Use it for scopes not listed, one per line.
>
> **Access:** Your app works with the Calendly account that authorizes the connection: its event types, availability, and scheduled events.

***

## Running workflows

Run a [connector workflow](https://docs.base44.com/Building-your-app/Creating-workflows.md#connector) when something happens to a booking in the connected Calendly account. A workflow can start when:

* **Someone books:** An invitee books a meeting.
* **A booking is canceled:** The invitee or host cancels.
* **Someone is marked as a no-show:** The host marks an invitee as a no-show, or removes the mark.

The connection needs the `webhooks:write` permission to run workflows. Choose **Read & write** when you add a shared connector, or keep `webhooks:write` selected for an app user connector. If it's missing, the AI chat asks you to allow it while it builds the workflow.

The workflow runs for every event type in the account. To run it for one event type only, ask the AI chat to add a condition.

Describe the trigger and what should happen in the AI chat. For example:

```text wrap theme={null}
When someone books a meeting in Calendly, add them to my clients list.
```

> [!NOTE]
>
> When someone reschedules, Calendly cancels the old booking and creates a new one, so a workflow can run for both. Ask the AI chat to skip cancellations that are part of a reschedule if you only want real cancellations.

***

## Using backend functions

Once Calendly is connected, your backend functions can retrieve an access token and call the Calendly API directly. Base44 handles sign-in for you.

* For a shared connection, use `getConnection()` to retrieve the token.
* For an app user connection, use `getCurrentAppUserConnection()` so each request uses the signed-in person's token.

Call the Calendly API at `api.calendly.com` and pass the token in the `Authorization` header. Most requests need the signed-in person's user URI, which you get from `/users/me`:

```javascript theme={null}
// Shared connection: one account the whole app uses
const { accessToken } = await base44.asServiceRole.connectors.getConnection("calendly");
const headers = { Authorization: `Bearer ${accessToken}` };

const me = await fetch("https://api.calendly.com/users/me", { headers }).then((r) => r.json());

const response = await fetch(
  `https://api.calendly.com/scheduled_events?user=${encodeURIComponent(me.resource.uri)}&status=active`,
  { headers },
);
const { collection } = await response.json();
```

> [card] [Shared connectors](https://docs.base44.com/developers/backend/resources/connectors/shared-connectors.md)
>
> Configure, deploy, and call a shared connection from a backend function.

> [card] [App user connectors](https://docs.base44.com/developers/backend/resources/connectors/app-user-connectors.md)
>
> Retrieve a per-user token and call the API as the signed-in person.

***

## Troubleshooting

Check the connection and its permissions if Calendly stops working in your app.

> [accordion] The connection needs to be reconnected
>
> If your app loses access to Calendly or its sign-in expires, the connection shows a **Reconnect this connection** section.
>
> * **Shared connector:** [Reconnect it](https://docs.base44.com/Integrations/Connectors.md#managing-your-connectors) and sign in with the same Calendly account. Every app that uses it works again.
> * **App user connector:** Each person reconnects their own Calendly account from inside your app.

> [accordion] A workflow doesn't start when someone books
>
> Check that the connection has the **webhooks:write** permission. If it doesn't, allow it when the AI chat asks, or reconnect with **Read & write** selected.
>
> If the AI chat says your Calendly account can't use webhooks, check what your Calendly plan includes in Calendly's [webhooks overview](https://calendly.com/help/webhooks-overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.