Skip to content

feat: add ClickUp connector as a knowledge source#317

Open
Himanshu Kumar (himanshu231204) wants to merge 5 commits into
langchain-ai:mainfrom
himanshu231204:feat/clickup-connector
Open

feat: add ClickUp connector as a knowledge source#317
Himanshu Kumar (himanshu231204) wants to merge 5 commits into
langchain-ai:mainfrom
himanshu231204:feat/clickup-connector

Conversation

@himanshu231204

Copy link
Copy Markdown
Contributor

Summary

Adds a ClickUp connector (direct-API backend) that ingests workspaces, tasks, subtasks, comments, and docs via the ClickUp API v2.

Closes #301

Changes

  • New connector: src/connectors/sources/clickup.ts — direct-API backend using ClickUp API v2
  • Env var: OPENWIKI_CLICKUP_API_TOKEN for personal API token auth
  • Features:
    • Fetches workspaces, spaces, lists, tasks (with subtasks), and task comments
    • Configurable scope via workspaceIds, spaceIds, listIds in connector config
    • Incremental sync using date_updated cursors per list
    • Configurable maxTasksPerList and windowHours for time-windowed ingestion
  • Onboarding: ClickUp added to source options with setup instructions
  • Tests: 7 unit tests covering definition, disabled state, and missing token

Files Changed

File Change
src/constants.ts Added OPENWIKI_CLICKUP_API_TOKEN env constant
src/connectors/types.ts Extended ConnectorId union with "clickup"
src/connectors/sources/clickup.ts Full connector implementation
src/connectors/registry.ts Registered ClickUp in createConnectorRegistry()
src/connectors/tools.ts Added "clickup" to connector ID enums
src/credentials.tsx Added ClickUp to SOURCE_OPTIONS and personal template
test/clickup.test.ts 7 unit tests

Usage

  1. Generate a personal API token in ClickUp (Settings > Apps > Generate API Token)
  2. Add OPENWIKI_CLICKUP_API_TOKEN=pk_xxx to ~/.openwiki/.env
  3. Configure scope in ~/.openwiki/connectors/clickup/config.json:
{
  "enabled": true,
  "workspaceIds": ["your_workspace_id"],
  "maxTasksPerList": 100,
  "windowHours": 168,
  "includeSubtasks": true
}
  1. Run openwiki ingest clickup or openwiki personal --update

Testing

  • 7/7 new tests pass
  • 212/212 existing tests pass
  • No new lint errors

Colin Francis (@colifran) Ready for review

Test User added 4 commits July 14, 2026 00:25
The parseEnv function only handled KEY=value format. If a user manually
edited the .openwiki/env file or copied lines from shell scripts, lines
like 'export KEY=value' would be silently skipped.

Added export prefix handling: lines starting with 'export ' now have the
prefix stripped before parsing, so both formats work correctly.
Bare \openwiki --update\ (without specifying personal or code mode)
defaulted to personal mode, which targeted ~/.openwiki/wiki instead of
the current project's openwiki/ directory. This caused the agent to
document a completely different, unrelated project that was previously
stored in the global wiki.

Make bare --update require an explicit mode (--init already had this
requirement). Users must now run either:
- \openwiki personal --update\ to update the local brain wiki
- \openwiki code --update\ to update repository documentation

All CI workflows already use explicit modes (\openwiki code --update
--print\), so this is not a breaking change for automation.

Fixes langchain-ai#310
Add a direct-API ClickUp connector that ingests workspaces, tasks,
subtasks, comments, and docs via the ClickUp API v2.

Changes:
- Add OPENWIKI_CLICKUP_API_TOKEN env constant
- Extend ConnectorId type with 'clickup'
- Create connector source with workspace/space/list scoping
- Register connector in registry
- Update agent-facing tool enums
- Add onboarding SOURCE_OPTIONS for ClickUp
- Add unit tests

Closes langchain-ai#301
@himanshu231204

Copy link
Copy Markdown
Contributor Author

Colin Francis (@colifran) This PR implements the ClickUp connector requested in #301. The PR description has the full breakdown of changes, files, and usage instructions. Would appreciate your review when you get a chance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: ClickUp as a knowledge source

1 participant