# Hex

> Run Hex projects, check their runs, edit notebook cells and manage sharing, groups and collections.

App · Analytics · 20 actions. Web page: https://docs.lodol.com/docs/integrations/hex

## Actions

### Add a cell to a Hex project

Add a code, SQL or Markdown cell to a project's draft. It is not published until you publish the project in Hex.

**Inputs**

- Project (`project_id`, text, required): The Hex project. Pick one, or paste its id or Hex URL.
- Cell type (`cell_type`, text, required): What kind of cell to add. One of: `CODE`, `SQL`, `MARKDOWN`. Default: `CODE`.
- Source (`source`, text, required): The cell's code, SQL query or Markdown text.
- Label (`label`, text): An optional label for the cell.
- Data connection (SQL) (`data_connection_id`, text): For a SQL cell: the connection to query.
- Query dataframes (SQL) (`is_dataframe_sql`, true/false): For a SQL cell: query other cells' results instead of a data connection.
- Result dataframe name (SQL) (`output_dataframe`, text): For a SQL cell: name for the result dataframe.
- Insert after cell (`insert_after_cell_id`, text): Place it after this cell. Default: at the end.
- Inside section cell (`parent_cell_id`, text): Place it inside this section cell.
- Position in section (`child_position`, text): Where in the section to place it. One of: `LAST`, `FIRST`.

**Outputs**

- `cellType` (text)
- `contents` (object)
- `dataConnectionId` (text)
- `id` (text)
- `label` (text)
- `projectId` (text)
- `staticId` (text)

**Example output**

```json
{
  "cellType": "CODE",
  "contents": {
    "codeCell": {
      "source": "total = 1 + 1"
    },
    "markdownCell": null,
    "sqlCell": null
  },
  "dataConnectionId": null,
  "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "label": "Totals",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
}
```

### Cancel a Hex run

Cancel a pending or running project run.

**Inputs**

- Project (`project_id`, text, required): The Hex project. Pick one, or paste its id or Hex URL.
- Run (`run_id`, text, required): The run to cancel.

**Outputs**

- `cancelled` (true/false)
- `projectId` (text)
- `runId` (text)

**Example output**

```json
{
  "cancelled": true,
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11"
}
```

### Create a Hex collection

Create a collection for organising projects.

**Inputs**

- Name (`name`, text, required): The collection's name.
- Description (`description`, text): An optional description.

**Outputs**

- `creator` (object)
- `description` (text)
- `id` (text)
- `name` (text)
- `sharing` (object)

**Example output**

```json
{
  "creator": {
    "email": "jordan@example.com",
    "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
  },
  "description": "Finance dashboards",
  "id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
  "name": "Finance",
  "sharing": {
    "groups": [],
    "users": [],
    "workspace": {
      "members": "NONE"
    }
  }
}
```

### Create a Hex group

Create a user group, optionally with members. Admins only.

**Inputs**

- Name (`name`, text, required): The group's name.
- Members (`member_user_ids`, list): Users to add (up to 100).

**Outputs**

- `id` (text)
- `members` (object)
- `name` (text)

**Example output**

```json
{
  "id": "3f2e1d0c-9b8a-4765-8432-10fedcba9876",
  "members": {
    "users": [
      {
        "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
      }
    ]
  },
  "name": "Analysts"
}
```

### Create a Hex project

Create a new, empty draft project owned by you.

**Inputs**

- Title (`title`, text, required): The project's title.
- Description (`description`, text): An optional description.

**Outputs**

- `analytics` (object)
- `archivedAt` (text)
- `categories` (list)
- `createdAt` (text)
- `creator` (object)
- `description` (text)
- `id` (text)
- `lastEditedAt` (text)
- `lastPublishedAt` (text)
- `owner` (object)
- `reviews` (object)
- `schedules` (list)
- `sharing` (object)
- `status` (object)
- `title` (text)
- `trashedAt` (text)
- `type` (text)

**Example output**

```json
{
  "analytics": {
    "appViews": {
      "allTime": 0,
      "lastFourteenDays": 0,
      "lastSevenDays": 0,
      "lastThirtyDays": 0
    },
    "lastViewedAt": null,
    "publishedResultsUpdatedAt": null
  },
  "archivedAt": null,
  "categories": [],
  "createdAt": "2026-09-20T09:12:00Z",
  "creator": {
    "email": "jordan@example.com"
  },
  "description": "Revenue by region",
  "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "lastEditedAt": "2026-09-20T09:12:00Z",
  "lastPublishedAt": null,
  "owner": {
    "email": "jordan@example.com"
  },
  "reviews": {
    "required": false
  },
  "schedules": [],
  "status": null,
  "title": "Weekly revenue",
  "trashedAt": null,
  "type": "PROJECT"
}
```

### Delete a Hex cell

Delete a cell from a project's draft.

**Inputs**

- Project (`project_id`, text): Only used to list the project's cells in the Cell field.
- Cell (`cell_id`, text, required): The cell to delete. Choose a project first to pick from its cells.

**Outputs**

- `cellId` (text)
- `deleted` (true/false)

**Example output**

```json
{
  "cellId": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "deleted": true
}
```

### Get a Hex cell

Get one cell from a project's draft.

**Inputs**

- Project (`project_id`, text): Only used to list the project's cells in the Cell field.
- Cell (`cell_id`, text, required): The cell. Choose a project first to pick from its cells.

**Outputs**

- `cellType` (text)
- `contents` (object)
- `dataConnectionId` (text)
- `id` (text)
- `label` (text)
- `projectId` (text)
- `staticId` (text)

**Example output**

```json
{
  "cellType": "CODE",
  "contents": {
    "codeCell": {
      "source": "total = 1 + 1"
    },
    "markdownCell": null,
    "sqlCell": null
  },
  "dataConnectionId": null,
  "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "label": "Totals",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
}
```

### Get a Hex project

Get a project's details, schedules and analytics.

**Inputs**

- Project (`project_id`, text, required): The Hex project. Pick one, or paste its id or Hex URL.
- Include sharing (`include_sharing`, true/false): Add the project's sharing settings.

**Outputs**

- `analytics` (object)
- `archivedAt` (text)
- `categories` (list)
- `createdAt` (text)
- `creator` (object)
- `description` (text)
- `id` (text)
- `lastEditedAt` (text)
- `lastPublishedAt` (text)
- `owner` (object)
- `reviews` (object)
- `schedules` (list)
- `sharing` (object)
- `status` (object)
- `title` (text)
- `trashedAt` (text)
- `type` (text)

**Example output**

```json
{
  "analytics": {
    "appViews": {
      "allTime": 0,
      "lastFourteenDays": 0,
      "lastSevenDays": 0,
      "lastThirtyDays": 0
    },
    "lastViewedAt": null,
    "publishedResultsUpdatedAt": null
  },
  "archivedAt": null,
  "categories": [],
  "createdAt": "2026-09-20T09:12:00Z",
  "creator": {
    "email": "jordan@example.com"
  },
  "description": "Revenue by region",
  "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "lastEditedAt": "2026-09-20T09:12:00Z",
  "lastPublishedAt": null,
  "owner": {
    "email": "jordan@example.com"
  },
  "reviews": {
    "required": false
  },
  "schedules": [],
  "status": null,
  "title": "Weekly revenue",
  "trashedAt": null,
  "type": "PROJECT"
}
```

### Get a Hex run's status

Get the status and timing of a project run.

**Inputs**

- Project (`project_id`, text, required): The Hex project. Pick one, or paste its id or Hex URL.
- Run (`run_id`, text, required): The run, as returned by Run project.
- Include state events (`expanded_stats`, true/false): Add the run's timeline of state changes.

**Outputs**

- `elapsedTime` (number)
- `endTime` (text)
- `notifications` (list)
- `projectId` (text)
- `projectVersion` (text)
- `runId` (text)
- `runTrigger` (text)
- `runUrl` (text)
- `startTime` (text)
- `stateEvents` (list)
- `status` (text)
- `traceId` (text)

**Example output**

```json
{
  "elapsedTime": 40000,
  "endTime": "2026-09-20T09:12:40Z",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "projectVersion": "3",
  "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "runTrigger": "API",
  "runUrl": "https://app.hex.tech/acme/hex/5a8591dd-4039-49df-9202-96385ba3eff8/run/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "startTime": "2026-09-20T09:12:00Z",
  "status": "COMPLETED",
  "traceId": "a1b2c3"
}
```

### Get the connected Hex user

Return the user the API token belongs to and their workspace. A workspace token returns only the workspace.

**Inputs**: None.

**Outputs**

- `email` (text)
- `id` (text)
- `lastLoginDate` (text)
- `name` (text)
- `org` (object)
- `role` (text)
- `token` (object)
- `token_type` (text)

**Example output**

```json
{
  "email": "jordan@example.com",
  "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
  "lastLoginDate": "2026-09-20T09:12:00Z",
  "name": "Jordan Avery",
  "org": {
    "id": "9e8d7c6b-5a4f-4e3d-2c1b-0a9f8e7d6c5b"
  },
  "role": "ADMIN",
  "token": {
    "exp": 1790000000
  },
  "token_type": "personal"
}
```

### List a Hex project's cells

List the cells in a project's draft, with the contents of code, SQL and Markdown cells.

**Inputs**

- Project (`project_id`, text, required): The Hex project. Pick one, or paste its id or Hex URL.
- Limit (`limit`, number): How many to return, 1-100. From 1 to 100. Default: `25`.
- Next page cursor (`after`, text): To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

**Outputs**

- `pagination` (object)
- `values` (list)

**Example output**

```json
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "cellType": "CODE",
      "contents": {
        "codeCell": {
          "source": "total = 1 + 1"
        },
        "markdownCell": null,
        "sqlCell": null
      },
      "dataConnectionId": null,
      "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
      "label": "Totals",
      "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
      "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
    }
  ]
}
```

### List a Hex project's runs

List a project's runs, optionally by status or trigger.

**Inputs**

- Project (`project_id`, text, required): The Hex project. Pick one, or paste its id or Hex URL.
- Status (`status`, text): Only runs with this status. One of: `PENDING`, `RUNNING`, `ERRORED`, `COMPLETED`, `KILLED`, `UNABLE_TO_ALLOCATE_KERNEL` (Unable To Allocate Kernel).
- Started by (`run_trigger`, text): Only runs started this way. One of: `ALL` (Anything), `API`, `SCHEDULED` (Schedule), `APP_REFRESH` (App refresh).
- Limit (`limit`, number): How many to return, 1-100. From 1 to 100. Default: `25`.
- Offset (`offset`, number): Skip this many runs first, to page through. At least 0. Default: `0`.

**Outputs**

- `nextPage` (text)
- `previousPage` (text)
- `runs` (list)
- `traceId` (text)

**Example output**

```json
{
  "nextPage": null,
  "previousPage": null,
  "runs": [
    {
      "elapsedTime": 40000,
      "endTime": "2026-09-20T09:12:40Z",
      "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
      "projectVersion": "3",
      "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
      "runTrigger": "API",
      "runUrl": "https://app.hex.tech/acme/hex/5a8591dd-4039-49df-9202-96385ba3eff8/run/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
      "startTime": "2026-09-20T09:12:00Z",
      "status": "COMPLETED",
      "traceId": "a1b2c3"
    }
  ],
  "traceId": "a1b2c3"
}
```

### List Hex collections

List collections, by name.

**Inputs**

- Limit (`limit`, number): How many to return, 1-100. From 1 to 100. Default: `25`.
- Next page cursor (`after`, text): To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

**Outputs**

- `pagination` (object)
- `values` (list)

**Example output**

```json
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "creator": {
        "email": "jordan@example.com",
        "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
      },
      "description": "Finance dashboards",
      "id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
      "name": "Finance",
      "sharing": {
        "groups": [],
        "users": [],
        "workspace": {
          "members": "NONE"
        }
      }
    }
  ]
}
```

### List Hex data connections

List the data connections you can use. Admins also see connection details and sharing.

**Inputs**

- Sort by (`sort_by`, text): Field to sort by. One of: `NAME`, `CREATED_AT` (Created At).
- Sort direction (`sort_direction`, text): Ascending or descending. One of: `DESC` (Descending), `ASC` (Ascending).
- Limit (`limit`, number): How many to return, 1-100. From 1 to 100. Default: `25`.
- Next page cursor (`after`, text): To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

**Outputs**

- `pagination` (object)
- `values` (list)

**Example output**

```json
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "description": "Production warehouse",
      "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
      "name": "Warehouse",
      "sensitivity": {
        "configured": false,
        "effective": false,
        "overrideReason": null
      },
      "type": "snowflake"
    }
  ]
}
```

### List Hex groups

List the workspace's user groups.

**Inputs**

- Sort by (`sort_by`, text): Field to sort by. One of: `CREATED_AT` (Created At), `NAME`.
- Sort direction (`sort_direction`, text): Ascending or descending. One of: `DESC` (Descending), `ASC` (Ascending).
- Limit (`limit`, number): How many to return, 1-500. From 1 to 500. Default: `25`.
- Next page cursor (`after`, text): To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

**Outputs**

- `pagination` (object)
- `values` (list)

**Example output**

```json
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "createdAt": "2026-09-20T09:12:00Z",
      "id": "3f2e1d0c-9b8a-4765-8432-10fedcba9876",
      "name": "Analysts"
    }
  ]
}
```

### List Hex projects

List projects you can see, with optional filters by owner, creator, collection, status and category.

**Inputs**

- In collection (`collection_id`, text): Only projects in this collection.
- Owner email (`owner_email`, text): Only projects owned by this email address.
- Creator email (`creator_email`, text): Only projects created by this email address.
- Statuses (`statuses`, list): Only projects with one of these status names.
- Categories (`categories`, list): Only projects with one of these category names.
- Include archived (`include_archived`, true/false): Also list archived ones.
- Include trashed (`include_trashed`, true/false): Also list trashed ones.
- Include components (`include_components`, true/false): Also list reusable components.
- Include unlisted (`include_unlisted`, true/false): Also list projects not shared with you directly.
- Include sharing (`include_sharing`, true/false): Add each project's sharing settings.
- Sort by (`sort_by`, text): Field to sort by. One of: `CREATED_AT` (Created At), `LAST_EDITED_AT` (Last Edited At), `LAST_PUBLISHED_AT` (Last Published At).
- Sort direction (`sort_direction`, text): Ascending or descending. One of: `DESC` (Descending), `ASC` (Ascending).
- Limit (`limit`, number): How many to return, 1-100. From 1 to 100. Default: `25`.
- Next page cursor (`after`, text): To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

**Outputs**

- `pagination` (object)
- `values` (list)

**Example output**

```json
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "analytics": {
        "appViews": {
          "allTime": 0,
          "lastFourteenDays": 0,
          "lastSevenDays": 0,
          "lastThirtyDays": 0
        },
        "lastViewedAt": null,
        "publishedResultsUpdatedAt": null
      },
      "archivedAt": null,
      "categories": [],
      "createdAt": "2026-09-20T09:12:00Z",
      "creator": {
        "email": "jordan@example.com"
      },
      "description": "Revenue by region",
      "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
      "lastEditedAt": "2026-09-20T09:12:00Z",
      "lastPublishedAt": null,
      "owner": {
        "email": "jordan@example.com"
      },
      "reviews": {
        "required": false
      },
      "schedules": [],
      "status": null,
      "title": "Weekly revenue",
      "trashedAt": null,
      "type": "PROJECT"
    }
  ]
}
```

### List Hex users

List the users in the Hex workspace.

**Inputs**

- In group (`group_id`, text): Only members of this group.
- Only these users (`user_ids`, list): Return only these users.
- Sort by (`sort_by`, text): Field to sort by. One of: `NAME`, `EMAIL`.
- Sort direction (`sort_direction`, text): Ascending or descending. One of: `DESC` (Descending), `ASC` (Ascending).
- Limit (`limit`, number): How many to return, 1-100. From 1 to 100. Default: `25`.
- Next page cursor (`after`, text): To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

**Outputs**

- `pagination` (object)
- `values` (list)

**Example output**

```json
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "email": "jordan@example.com",
      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
      "lastLoginDate": "2026-09-20T09:12:00Z",
      "name": "Jordan Avery",
      "role": "ADMIN"
    }
  ]
}
```

### Run a Hex project

Start a run of a project's latest published version. The project must have been published in Hex.

**Inputs**

- Project (`project_id`, text, required): The published project to run. Pick one, or paste its id or Hex URL.
- Input values (`input_params`, object): Values for the app's inputs, keyed by the input's variable name.
- Update published app (`update_published_results`, true/false): Show this run's results in the published app.
- Use cached SQL results (`use_cached_sql_results`, true/false): Let SQL cells reuse cached results (Hex's default is on).
- Dry run (`dry_run`, true/false): Only check the request; do not start a run.
- Saved view ID (`view_id`, text): Use the inputs saved in this view of the app.
- Notify on (`notify_on`, text): When to send the notification, if any recipients. One of: `ALL` (Success or failure), `SUCCESS`, `FAILURE`. Default: `ALL`.
- Notify users (`notify_user_ids`, list): Users to notify about the run.
- Notify groups (`notify_group_ids`, list): Groups to notify about the run.
- Notify Slack channel IDs (`notify_slack_channel_ids`, list): Slack channel ids to notify (needs Hex's Slack app).
- Include screenshot (`include_success_screenshot`, true/false): Attach a screenshot of the app to success notifications.
- Notification subject (`notification_subject`, text): Optional subject for the notification.
- Notification message (`notification_message`, text): Optional message for the notification.

**Outputs**

- `notifications` (list)
- `projectId` (text)
- `projectVersion` (number)
- `runId` (text)
- `runStatusUrl` (text)
- `runUrl` (text)
- `traceId` (text)

**Example output**

```json
{
  "notifications": [],
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "projectVersion": 3,
  "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "runStatusUrl": "https://app.hex.tech/api/v1/projects/5a8591dd-4039-49df-9202-96385ba3eff8/runs/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "runUrl": "https://app.hex.tech/acme/hex/5a8591dd-4039-49df-9202-96385ba3eff8/run/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "traceId": "a1b2c3"
}
```

### Share a Hex project with users

Give users access to a project, change their access, or remove it with No access. Up to 25 users at a time.

**Inputs**

- Project (`project_id`, text, required): The Hex project. Pick one, or paste its id or Hex URL.
- Users (`user_ids`, list, required): The users whose access to set.
- Access (`access`, text, required): The access level to give them. One of: `NONE` (No access (remove)), `APP_ONLY` (Can view app), `CAN_VIEW` (Can explore), `CAN_EDIT` (Can edit), `FULL_ACCESS` (Full access). Default: `CAN_VIEW`.

**Outputs**

- `errors` (list)
- `project` (object)

**Example output**

```json
{
  "errors": [],
  "project": {
    "analytics": {
      "appViews": {
        "allTime": 0,
        "lastFourteenDays": 0,
        "lastSevenDays": 0,
        "lastThirtyDays": 0
      },
      "lastViewedAt": null,
      "publishedResultsUpdatedAt": null
    },
    "archivedAt": null,
    "categories": [],
    "createdAt": "2026-09-20T09:12:00Z",
    "creator": {
      "email": "jordan@example.com"
    },
    "description": "Revenue by region",
    "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
    "lastEditedAt": "2026-09-20T09:12:00Z",
    "lastPublishedAt": null,
    "owner": {
      "email": "jordan@example.com"
    },
    "reviews": {
      "required": false
    },
    "schedules": [],
    "status": null,
    "title": "Weekly revenue",
    "trashedAt": null,
    "type": "PROJECT"
  }
}
```

### Update a Hex cell

Replace a code, SQL or Markdown cell's source, or change a SQL cell's data connection, in the project's draft.

**Inputs**

- Project (`project_id`, text): Only used to list the project's cells in the Cell field.
- Cell (`cell_id`, text, required): The cell to change. Choose a project first to pick from its cells.
- New source (`source`, text): The new code, SQL or Markdown. Blank keeps it.
- Result dataframe name (SQL) (`output_dataframe`, text): For a SQL cell: rename its result dataframe.
- Data connection (SQL) (`data_connection_id`, text): For a SQL cell: the connection to query.
- Detach data connection (`detach_data_connection`, true/false): For a SQL cell: remove its data connection.

**Outputs**

- `cellType` (text)
- `contents` (object)
- `dataConnectionId` (text)
- `id` (text)
- `label` (text)
- `projectId` (text)
- `staticId` (text)

**Example output**

```json
{
  "cellType": "CODE",
  "contents": {
    "codeCell": {
      "source": "total = 1 + 1"
    },
    "markdownCell": null,
    "sqlCell": null
  },
  "dataConnectionId": null,
  "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "label": "Totals",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
}
```
