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

# Setup

> Connect to your Calendly app for OAuth.

To setup your Calendly app in Refold for OAuth, you will need the following credentials from your [Calendly Developer Portal](https://developer.calendly.com/):

* Client ID
* Client Secret
* Scopes

### Pre-requisites

1. Calendly Developer account. You can create one [here](https://developer.calendly.com/create-a-developer-account).

<Info>If you haven't already created an app in Calendly, you'd need to create one.</Info>

### Creating an app in Calendly

To create a Calendly app and acquire the above mentioned credentials, please follow the steps mentioned below:

1. Log in to your [Calendly Developer Portal](https://developer.calendly.com/).
2. Click on the `Profile` icon in the top right, select `My Apps` and click on the `+ Create new app` button.

<img height="200" src="https://mintcdn.com/cobalt-55/YZVVpdFwo8NtLV-a/images/Calendly/calendly_navigation.png?fit=max&auto=format&n=YZVVpdFwo8NtLV-a&q=85&s=4079a7a0a287f3e35af4be5877f5da1f" alt="Navigation for App setup" data-path="images/Calendly/calendly_navigation.png" />

3. Go to your [`Apps catalog`](https://app.gocobalt.io/apps) in **Refold** > Search for `Calendly` > `Settings` > `Use your credentials` > `Callback Url` > Copy it.
4. After clicking on `+ Create new app` button, enter the **App Name**, select `Kind of app` as **Web**, choose `Environment Type`, paste the Callback Url under `Redirect URI` and click on `Save and continue`.
5. Copy the **Client ID** and **Client Secret** displayed.

<img height="200" src="https://mintcdn.com/cobalt-55/YZVVpdFwo8NtLV-a/images/Calendly/calendly_credentials.png?fit=max&auto=format&n=YZVVpdFwo8NtLV-a&q=85&s=d2b0e8510692afa753e9a3dc8ca2abfc" alt="Getting Credentials" data-path="images/Calendly/calendly_credentials.png" />

<Warning>
  Client Secret and Webhook signing key will be visible only once, so make ensure that they are copied and saved somewhere for future reference.
</Warning>

#### Configuring credentials in Refold

App settings page lets you configure the authentication settings for an `OAuth2` based application. For your customers to provide you authorization to access their data,
they would first need to install your application. This page lets you set up your application credentials.

<img height="200" src="https://mintcdn.com/cobalt-55/YZVVpdFwo8NtLV-a/images/Calendly/calendly_cobalt.png?fit=max&auto=format&n=YZVVpdFwo8NtLV-a&q=85&s=2e99c8a6059f7ba7adc347932b4d04b2" alt="Setting up application client credentials" data-path="images/Calendly/calendly_cobalt.png" />

Provide the acquired Client ID and Client Secret under Settings of the app and save it.

#### Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Calendly actions and triggers. Following are the set of Calendly actions and triggers
supported by Refold.

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="Events">
        1. **List Events** - List all scheduled events in Calendly.
        2. **Get Event** - Get a scheduled event in Calendly.
        3. **Cancel Event** - Cancel a scheduled event in Calendly.
      </Accordion>

      <Accordion title="Groups">
        4. **List Groups** - List all groups in Calendly.
        5. **Get Group Relationship** - Get a group relationship in Calendly.
      </Accordion>

      <Accordion title="Others">
        6. **HTTP Request** - Make HTTP API calls to any Calendly documented REST APIs.
        7. **Get Current User** - Get the current user's details in Calendly.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Triggers">
    1. **Invitee created** - Triggers when an Invitee is created in Calendly.
    2. **Invitee cancelled** - Triggers when an Invitee is cancelled in Calendly.
  </Tab>
</Tabs>
