# BetterCloud

> Run BetterCloud actions and workflows, such as onboarding and offboarding, and report on your SaaS users, groups and files.

App · 7 actions. Web page: https://docs.lodol.com/docs/integrations/bettercloud

## Actions

### Get API token

Check the connection's API token and see its name and tenant.

**Inputs**: None.

**Outputs**

- `data` (object): The response from BetterCloud.

**Example output**

```json
{
  "data": {
    "createdAt": 1,
    "createdBy": "example",
    "description": "example",
    "id": "example",
    "lastUsedAt": 1,
    "name": "example",
    "tenantId": "example"
  }
}
```

### Get workflow

Get the inputs a workflow takes when you run it.

**Inputs**

- Workflow (`workflowId`, text, required): The workflow.

**Outputs**

- `data` (object): The response from BetterCloud.

**Example output**

```json
{
  "data": {
    "integrationId": "example",
    "parameters": [
      {
        "key": "example"
      }
    ],
    "providerId": "example"
  }
}
```

### List actions

List the actions BetterCloud can run, such as suspending a user, with each one's parameter IDs.

**Inputs**

- Page (`page`, number): The page to read, starting at 0. At least 0.
- Page size (`size`, number): How many actions a page holds. From 1 to 1000.

**Outputs**

- `data` (object): The response from BetterCloud.

**Example output**

```json
{
  "data": {
    "content": [
      {
        "description": "example",
        "id": "example",
        "name": "example",
        "parameters": [
          {
            "id": "example",
            "name": "example",
            "required": true,
            "type": "example"
          }
        ]
      }
    ],
    "first": true,
    "last": true,
    "number": 1,
    "numberOfElements": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

### List workflows

List your BetterCloud workflows' names and IDs.

**Inputs**: None.

**Outputs**

- `data` (object): The response from BetterCloud.

**Example output**

```json
{
  "data": {
    "content": [
      {
        "name": "example",
        "workflowId": "example"
      }
    ],
    "first": true,
    "last": true,
    "number": 1,
    "numberOfElements": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

### Run action

Start one of BetterCloud's actions, such as suspending a user in Okta.

**Inputs**

- Action (`actionId`, text, required): The action to run.
- Inputs (`parameters`, object, required): The action's inputs, keyed by each parameter's ID from List actions, such as {"4ea33cfc-…": "user@example.com"}. The connector ID is one of them.

**Outputs**

- `data` (object): The response from BetterCloud.

**Example output**

```json
{
  "data": {
    "executionId": "example"
  }
}
```

### Run report query

Search BetterCloud's data about your users, groups and files with a GraphQL query, as in its Reporting explorer.

**Inputs**

- Query (`query`, text, required): The GraphQL query, such as { groups(filter: { memberCount: { eq: 0 } }) { id displayValue memberCount } }.

**Outputs**

- `data` (object): The response from BetterCloud.

**Example output**

```json
{
  "data": {
    "data": {}
  }
}
```

### Run workflow

Start a BetterCloud workflow, such as offboarding a user.

**Inputs**

- Workflow (`workflowId`, text, required): The workflow to run.
- Inputs (`parameters`, object, required): The workflow's inputs, keyed as Get workflow lists them, such as {"userId": "123456"}.

**Outputs**

- `data` (object): The response from BetterCloud.

**Example output**

```json
{
  "data": {
    "executionId": "example"
  }
}
```
