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

# Calendly User Provisioning & Deprovisioning

> Automate Calendly user provisioning and deprovisioning from your HRIS. Klef creates, updates, and deactivates accounts when HR makes a change.

![](https://mintcdn.com/klef/O1Sswmcb_uCGkmIf/images/connectors/calendly.svg?fit=max\&auto=format\&n=O1Sswmcb_uCGkmIf\&q=85\&s=de6cf52764699dd6c84c0118315467fa)

# Calendly

## Connection

### Setup

Klef reaches Calendly with a personal access token of an owner or admin of your organization.

**Step 1**

Sign in to Calendly as an owner or admin, and open **Integrations & apps**, then **API and webhooks**.

**Step 2**

Under **Personal access tokens**, generate a token, and copy it into Klef.

Klef invites each person by email, and they join when they accept. Switching a person off removes them from the organization, or withdraws an invitation they have not accepted. Calendly does not let the owner be removed.

Calendly's API cannot change a member's role, so Klef leaves roles to Calendly.

### Settings

| Setting | Required | Description |
| - | - | - |
| Personal access token | Yes | A personal access token of an owner or admin of your Calendly organization. |

## calendly.member

### Fields

| Field | Type | Required | Description |
| - | - | - | - |
| `email` | string | Yes | Address the invitation goes to. Never changed once the account exists. |
| `status` | enum | | Whether the person can sign in, the account is kept switched off, or the account is gone. Values: `enabled` (Enabled), `removed` (Removed). |

### Default Account Matching Rules

When Klef [adopts](https://klef.ai/docs/adoption.md) an account that already exists in Calendly, it works out whose it is by trying these in order. A connection can override them.

| Account field | Worker field |
| - | - |
| `email` | `worker.business_email` |

## Examples

### Calendly members

Invites each salesperson to Calendly, and removes them when they leave.

```hcl theme={null}
stage active {
  target calendly.member {
    email  = worker.business_email
    status = enabled
  }
}
```


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