# ClickUp

ClickUp is a project management platform for teams to organize, track, and manage tasks, goals, and time. The Sling ClickUp connector extracts data from the ClickUp REST API v2, supporting workspaces (teams), spaces, folders, lists, tasks, comments, goals, time entries, tags, custom fields, and members.

{% hint style="success" %}
**CLI Pro Required**: APIs require a [CLI Pro token](https://docs.slingdata.io/sling-cli/cli-pro) or [Platform Plan](https://docs.slingdata.io/sling-platform/platform).
{% endhint %}

## Setup

The following credentials are accepted:

**Secrets:**

* `api_key` **(required)** -> Your ClickUp Personal API Token

**Inputs (optional):**

* `anchor_date` -> Starting date for first sync of incremental endpoints (ISO 8601 format, e.g., `2024-01-01T00:00:00Z`). Defaults to 1 year ago.

### Getting Your Personal API Token

1. Log in to [ClickUp](https://app.clickup.com)
2. Click your avatar (bottom-left corner)
3. Go to **Settings**
4. Navigate to **Apps** in the left sidebar
5. Under **API Token**, click **Generate** (or **Regenerate** if one exists)
6. Copy the token

{% hint style="warning" %}
**Important:** Personal API tokens grant the same access as your user account. Use a service account with minimal permissions for production workloads.
{% endhint %}

### Using `sling conns`

Here are examples of setting a connection named `CLICKUP`. We must provide the `type=api` property:

{% code overflow="wrap" %}

```bash
sling conns set CLICKUP type=api spec=clickup secrets='{ api_key: pk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }'
```

{% endcode %}

### Environment Variable

See [here](https://docs.slingdata.io/sling-cli/environment#dot-env-file-.env.sling) to learn more about the `.env.sling` file.

{% code overflow="wrap" %}

```bash
export CLICKUP='{ type: api, spec: clickup, secrets: { api_key: "pk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }'
```

{% endcode %}

### Sling Env File YAML

See [here](https://docs.slingdata.io/sling-cli/environment#sling-env-file-env.yaml) to learn more about the sling `env.yaml` file.

```yaml
connections:
  CLICKUP:
    type: api
    spec: clickup
    secrets:
      api_key: "pk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

## Replication

Here's an example replication configuration to sync ClickUp data to a PostgreSQL database:

```yaml
source: CLICKUP
target: MY_POSTGRES

defaults:
  mode: full-refresh
  object: clickup.{stream_name}

streams:
  # sync all endpoints
  '*':
```

**Incremental sync for tasks and time entries:**

```yaml
source: CLICKUP
target: MY_POSTGRES

defaults:
  object: clickup.{stream_name}

streams:
  teams:
    mode: full-refresh

  spaces:
    mode: full-refresh

  folders:
    mode: full-refresh

  lists:
    mode: full-refresh

  folderless_lists:
    mode: full-refresh

  tasks:
    mode: incremental
    primary_key: [id]
    update_key: date_updated

  task_comments:
    mode: full-refresh

  goals:
    mode: full-refresh

  time_entries:
    mode: incremental
    primary_key: [id]

  space_tags:
    mode: full-refresh

  custom_fields:
    mode: full-refresh

  list_members:
    mode: full-refresh
```

## Endpoints

| Endpoint           | Description                                                 | Incremental | Depends On                  |
| ------------------ | ----------------------------------------------------------- | ----------- | --------------------------- |
| `teams`            | All workspaces (teams) accessible to the authenticated user | No          | —                           |
| `spaces`           | All spaces within each workspace                            | No          | `teams`                     |
| `folders`          | All folders within each space                               | No          | `spaces`                    |
| `lists`            | All lists within each folder                                | No          | `folders`                   |
| `folderless_lists` | All lists not in a folder (directly under a space)          | No          | `spaces`                    |
| `tasks`            | All tasks across all lists with incremental sync            | Yes         | `lists`, `folderless_lists` |
| `task_comments`    | Comments for each task                                      | No          | `tasks`                     |
| `goals`            | All goals for each workspace                                | No          | `teams`                     |
| `time_entries`     | Time tracking entries for each workspace                    | Yes         | `teams`                     |
| `space_tags`       | All tags for each space                                     | No          | `spaces`                    |
| `custom_fields`    | Accessible custom fields for each list                      | No          | `lists`, `folderless_lists` |
| `list_members`     | Members with access to each list                            | No          | `lists`, `folderless_lists` |

The connector uses a **queue-based architecture** to handle ClickUp's hierarchical structure. The `teams` endpoint runs first and populates team IDs, which are used by `spaces`, `goals`, and `time_entries`. The `spaces` endpoint populates space IDs for `folders`, `folderless_lists`, and `space_tags`. Both `folders` and `folderless_lists` populate list IDs for `lists`, `tasks`, `custom_fields`, and `list_members`. The `tasks` endpoint populates task IDs for `task_comments`.

To discover available endpoints:

```bash
sling conns discover CLICKUP
```

### Endpoint Details

**`teams`** — Returns all workspaces (called "teams" in the ClickUp API) the authenticated user belongs to. Team IDs are queued for child endpoints.

**`spaces`** — Returns all spaces within each workspace, including feature flags, statuses, and privacy settings.

**`folders`** — Returns all folders within each space. Folder IDs are queued for the `lists` endpoint.

**`lists`** — Returns all lists within each folder, including status, priority, and task count.

**`folderless_lists`** — Returns lists that exist directly under a space (not inside any folder). List IDs are queued for `tasks`, `custom_fields`, and `list_members`.

**`tasks`** — Returns all tasks across all lists with full detail: assignees, status, priority, dates, custom fields, tags, and dependencies. Supports incremental sync via `date_updated_gt`. Task IDs are queued for `task_comments`.

**`task_comments`** — Returns all comments for each task, including comment text, author, and reactions. Returns a 404 continue rule for deleted tasks.

**`goals`** — Returns all goals for each workspace, including progress, owners, and due dates.

**`time_entries`** — Returns time tracking entries within a configurable date range for each workspace. Supports incremental sync.

**`space_tags`** — Returns all tags defined for each space.

**`custom_fields`** — Returns all accessible custom field definitions for each list.

**`list_members`** — Returns all members with access to each list, including their role and profile information.

## Incremental Sync

Two endpoints support incremental sync:

**`tasks`** — Uses the `date_updated_gt` parameter (millisecond epoch timestamp):

* **First run:** Fetches all tasks modified in the last 365 days (or since `anchor_date` if provided)
* **Subsequent runs:** Only fetches tasks modified after the last sync timestamp

**`time_entries`** — Uses `start_date` and `end_date` parameters:

* **First run:** Fetches all time entries from the last 365 days (or since `anchor_date`)
* **Subsequent runs:** Only fetches time entries created after the last sync timestamp

All other endpoints run in full-refresh mode since ClickUp does not provide server-side time-based filtering for those resources.

## Rate Limiting

The ClickUp API enforces rate limits:

* **Standard limit:** 100 requests per minute for free plans, higher for paid plans

The connector automatically:

* Uses rate limiting (2 requests/second with concurrency of 3)
* Retries with exponential backoff on 429 (rate limit) responses, up to 5 attempts
* Retries with linear backoff on 5xx server errors, up to 3 attempts

## Common Use Cases

### Sync All ClickUp Data

```yaml
source: CLICKUP
target: MY_POSTGRES

defaults:
  mode: full-refresh
  object: clickup.{stream_name}

streams:
  '*':
```

### Sync Tasks Incrementally

```yaml
source: CLICKUP
target: MY_POSTGRES

defaults:
  object: clickup.{stream_name}

streams:
  teams:
    mode: full-refresh
  spaces:
    mode: full-refresh
  folders:
    mode: full-refresh
  lists:
    mode: full-refresh
  folderless_lists:
    mode: full-refresh
  tasks:
    mode: incremental
    primary_key: [id]
    update_key: date_updated
```

### Extract Task Comments for Analysis

```yaml
source: CLICKUP
target: MY_POSTGRES

defaults:
  mode: full-refresh
  object: clickup.{stream_name}

streams:
  teams:
  spaces:
  folders:
  lists:
  folderless_lists:
  tasks:
  task_comments:
```

### Track Time Entries

```yaml
source: CLICKUP
target: MY_POSTGRES

defaults:
  object: clickup.{stream_name}

streams:
  teams:
    mode: full-refresh
  time_entries:
    mode: incremental
    primary_key: [id]
```

If you are facing issues connecting, please reach out to us at <support@slingdata.io>, on [discord](https://discord.gg/q5xtaSNDvp) or open a Github Issue [here](https://github.com/slingdata-io/sling-cli/issues).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.slingdata.io/connections/api-connections/clickup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
