> ## 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 Attio app for OAuth.

To setup your Attio app in Refold for OAuth, you will need the following credentials from your [Attio Developer Settings](https://app.attio.com/):

* Client ID
* Client Secret
* Scopes

### Pre-requisites

1. Attio account. You can create one [here](https://app.attio.com/welcome/sign-in).

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

### Creating an app in Attio

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

1. Log in to your [Attio Account](https://app.attio.com/).
2. Click on the `Company` name in the top left corner and select `Workspace Settings` option.

<img height="200" src="https://mintcdn.com/cobalt-55/USIhqTKu3QZXm8QM/images/Attio/attio_navigation.png?fit=max&auto=format&n=USIhqTKu3QZXm8QM&q=85&s=63e1d85cade8d1fce2d40c2827c9a0d6" alt="Navigation for App setup" data-path="images/Attio/attio_navigation.png" />

3. Go to `Developers` under `Workspace` in the side menu and click on `Create a new integration` button.

4. Enter the `Integration Name` for your application and click on `Create`.

5. Go to your [`Apps catalog`](https://app.gocobalt.io/apps) in **Refold** > Search for `Attio` > `Settings` > `Use your credentials` > `Callback Url` > Copy it.

6. Go to `OAuth` in the App > Toggle on `OAuth Enabled` option > Click on `+ add new Redirect URI` > Paste the Callback URL and click on `Add Redirect URI`.

7. Copy the **Client ID** and **Client Secret** from the `OAuth` section.

<img height="200" src="https://mintcdn.com/cobalt-55/USIhqTKu3QZXm8QM/images/Attio/attio_credentials.png?fit=max&auto=format&n=USIhqTKu3QZXm8QM&q=85&s=7393a1de08be20752f8bae0f18549678" alt="Getting Credentials" data-path="images/Attio/attio_credentials.png" />

#### Configuring credentials in Refold

App settings page lets you configure the authentication settings for an `OAuth 2.0` 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/USIhqTKu3QZXm8QM/images/Attio/attio_cobalt.png?fit=max&auto=format&n=USIhqTKu3QZXm8QM&q=85&s=240e769f27bb64ef9e2d51beaa9a93a5" alt="Setting up application client credentials" data-path="images/Attio/attio_cobalt.png" />

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

#### Configuring Scopes

Refold lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under `Permissions & Scopes`
section.

For some applications Refold sets **mandatory scopes** which cannot be removed. Additional scopes can be selected from the drop down. Refold also has the provision to add any
custom scopes supported by the respective platform.

<img height="200" src="https://mintcdn.com/cobalt-55/USIhqTKu3QZXm8QM/images/Attio/attio_scopes.png?fit=max&auto=format&n=USIhqTKu3QZXm8QM&q=85&s=e64490809132657fb9d7be73edca0570" alt="OAuth Scopes" data-path="images/Attio/attio_scopes.png" />

Once the scopes has been added to the application in Refold, go to your [Attio Developer Settings](https://app.attio.com/) and update the scopes as added on Refold.

Select the OAuth App created for Refold > Click on `Scopes` section > Add the scopes as added in Refold.

<Warning>
  If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform. And, the scopes selected here are
  identical to the ones selected in the platform.
</Warning>

#### App Review for Attio

The integration is currently private and only usable by your workspace. To distribute your integration for use in other workspaces, you need to request a review from Attio team.

* Go to `Publication` section in the OAuth app and click on `Request publication`.

<Tip>
  Before requesting the publication of your app, make sure to add all the information like App name, description, scopes and logo of the app.
</Tip>

#### Actions and triggers

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

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="Person">
        1. **List Person** - Lists person records, with the option to filter and sort results in Attio.
        2. **Create Person** - Creates a new person record in Attio.
        3. **Update Person** - Update a person record in Attio.
        4. **Delete Person** - Delete a person record in Attio.
      </Accordion>

      <Accordion title="Deals">
        5. **Create Deal** - Create a deal record in Attio.
        6. **Update Deal** - Update a deal record in Attio.
        7. **Delete Deal** - Delete a deal record in Attio.
        8. **Get Deal** - Get a deal record in Attio.
      </Accordion>

      <Accordion title="Company">
        9. **Update Company** - Update a company record in Attio.
        10. **Create Company** - Create a company record in Attio.
        11. **List Company** - List company records, with the option to filter and sort results in Attio.
      </Accordion>

      <Accordion title="Notes">
        12. **Create Note** - Create a note in Attio.
        13. **Get Note** - Get a note in Attio.
      </Accordion>

      <Accordion title="Others">
        14. **HTTP Request** - Make HTTP API calls to any Attio documented REST APIs.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Triggers">
    There are no triggers in this application.
  </Tab>
</Tabs>
