project
ticktick-sync
GitHub issues as TickTick tasks — automatically.
ticktick-sync is a Cloudflare Worker that keeps your TickTick task list in step with your GitHub issues. Point a GitHub webhook at it, and every time you open, edit, close, or reopen an issue, the corresponding TickTick task is created, updated, completed, or recreated — automatically, in the background, with no manual copying required.
The sync is intentionally one-way: GitHub is the source of truth and TickTick is the attention layer. The Worker never writes back to GitHub. If you close a task in TickTick nothing happens on GitHub — but if you close the issue on GitHub, TickTick marks it done.
Under the hood it uses Cloudflare D1 (serverless SQLite) to store TickTick OAuth tokens and the mapping between GitHub issue numbers and TickTick task IDs. Webhook deliveries are deduplicated so retries from GitHub never create duplicate tasks.
GitHub event
issue opened
edited / closed
reopened
Worker
validates signature
deduplicates
routes event
D1 database
issue → task
mapping stored
TickTick
task created
updated
or completed
Webhook-driven
Reacts to GitHub issue events in real time — no polling, no cron jobs. GitHub pushes; the Worker acts.
Full lifecycle
Handles opened, edited, closed, and reopened events. Closing an issue completes the task; reopening creates a fresh one.
Signature validation
Every incoming webhook is verified against the GitHub X-Hub-Signature-256 header — no unsigned payloads accepted.
Idempotent delivery
GitHub delivery IDs are stored in D1. If GitHub retries a webhook, the Worker recognises it and skips — no duplicate tasks.
Backfill endpoint
A protected POST /sync/github/open-issues endpoint imports all existing open issues from a repo in one shot.
TickTick OAuth
Full OAuth 2.0 flow with automatic token refresh. A /auth/ticktick/start endpoint handles the initial login and stores tokens in D1.
Clone and install
Requires Node.js and a Cloudflare account with Workers enabled.
git clone https://github.com/KiwiGeek/ticktick-sync cd ticktick-sync npm install
Configure and set secrets
Set your TickTick project ID and GitHub username in wrangler.jsonc, then push secrets via Wrangler.
npx wrangler secret put TICKTICK_CLIENT_ID npx wrangler secret put TICKTICK_CLIENT_SECRET npx wrangler secret put GITHUB_WEBHOOK_SECRET npx wrangler secret put DEBUG_TOKEN
Run D1 migration and deploy
npm run db:migrate:remote npm run deploy
Authorise TickTick
Visit the OAuth start URL to link your TickTick account, then use the debug endpoint to find your project ID.
https://<your-worker>.workers.dev/auth/ticktick/start https://<your-worker>.workers.dev/debug/projects
Point your GitHub webhook
In your GitHub repo settings, add a webhook pointing to the Worker URL. Set the content type to application/json, use the same value as GITHUB_WEBHOOK_SECRET, and select Issues events only.
https://<your-worker>.workers.dev/webhooks/github