task-sync

Review·Scanned 2/18/2026

This skill synchronizes TickTick and Google Tasks bidirectionally, includes setup scripts and an end-to-end test suite. It reads/writes OAuth tokens (config.json, data/google_token.json, data/ticktick_token.json), makes network calls to https://api.ticktick.com/open/v1 and Google Tasks, and runs python sync.py via subprocess/cron.

from clawhub.ai·v671d97f·76.0 KB·0 installs
Scanned from 2.0.4 at 671d97f · Transparency log ↗
$ vett add clawhub.ai/jp1222/task-syncReview findings below

English | 中文

Task Sync

Bidirectional sync between TickTick and Google Tasks with smart list support.

Built as an OpenClaw skill — runs automatically via cron or manually on demand.

Features

  • Bidirectional list sync — Google Task Lists and TickTick Projects are auto-matched by name or created as needed
  • Bidirectional task sync — titles, completion status, notes/content
  • Priority mapping — TickTick priority levels appear as Google task title prefixes ([★] high, [!] medium)
  • Smart lists (one-way, TickTick → Google):
    • Today — overdue + today's tasks
    • Next 7 Days — upcoming week
    • All — every active task (with dates)
  • Date strategy that prevents Google Calendar duplicates (see below)
  • Idempotent — safe to run repeatedly without creating duplicates

Date Strategy

Google Tasks with due dates automatically appear in Google Calendar. To prevent duplicates across lists, dates are handled carefully:

List TypeDates in GoogleReason
Regular listsNoDates forwarded to TickTick, then cleared from Google
"All" smart listYesSingle Calendar source of truth
"Today" / "Next 7 Days"NoFiltered views only

Architecture

sync.py                        Main sync orchestrator
utils/
  google_api.py                Google Tasks API wrapper (pagination, token refresh)
  ticktick_api.py              TickTick Open API wrapper
scripts/
  setup_google_tasks.py        Google OAuth setup
  setup_ticktick.py            TickTick OAuth setup
config.json                    Paths to tokens and data files
data/sync_db.json              Task/list mapping database (auto-generated)
data/sync_log.json             Sync statistics log (auto-generated)
e2e_test.py                    End-to-end test suite (15 tests)

Sync Flow

1. List Sync (bidirectional)
   Google Lists <──────────> TickTick Projects
   - Match by name (case-insensitive)
   - "My Tasks" <-> "Inbox" (special case)
   - Unmatched lists create counterparts

2. Task Sync (bidirectional, per list pair)
   Google Tasks <──────────> TickTick Tasks
   - New tasks synced both ways
   - Completion propagated both ways
   - Dates: Google → TickTick (forwarded), then cleared from Google
   - Priority: TickTick → Google (title prefix)
   - Notes/content synced on creation

3. Smart Lists (one-way: TickTick → Google)
   TickTick ──────────────> Google "Today" / "Next 7 Days" / "All"
   - Stale tasks auto-removed when no longer matching

Setup

Prerequisites

  • Python 3.10+
  • Google Cloud project with Tasks API enabled
  • TickTick developer app (from developer.ticktick.com)

1. Install dependencies

pip install google-auth google-auth-oauthlib google-api-python-client requests

2. Configure Google Tasks

python scripts/setup_google_tasks.py

Place your Google OAuth desktop client JSON at config/google_credentials.json (or set GOOGLE_CREDENTIALS_FILE), then follow the OAuth flow. The token is written to config.json's google_token path when configured, or data/google_token.json by default.

3. Configure TickTick

python scripts/setup_ticktick.py

Create config/ticktick_creds.json from config/ticktick_creds.json.example (or set TICKTICK_CREDENTIALS_FILE), then follow the OAuth flow. The token is written to config.json's ticktick_token path when configured, or data/ticktick_token.json by default.

4. Edit config.json

{
  "google_token": "/path/to/google/token.json",
  "ticktick_token": "/path/to/ticktick/token.json",
  "sync_db": "/path/to/data/sync_db.json",
  "sync_log": "/path/to/data/sync_log.json",
  "ticktick_api_base": "https://api.ticktick.com/open/v1"
}

5. Run

python sync.py

Automation

Set up a cron job for periodic sync:

# Every 10 minutes
*/10 * * * * /path/to/python /path/to/sync.py >> /path/to/sync.log 2>&1

Or use OpenClaw's built-in cron system for managed scheduling.

Testing

The project includes a comprehensive end-to-end test suite that tests against live APIs:

python e2e_test.py

Test Coverage (15 tests)

#TestDirection
1New task syncGoogle → TickTick
2New task syncTickTick → Google
3Completion syncGoogle → TickTick
4Completion syncTickTick → Google
5Due date forward & clearGoogle → TickTick
6Due date in "All" list onlyTickTick → Google
7"Today" smart list populationTickTick → Google
8"Next 7 Days" smart list populationTickTick → Google
9High priority [★] prefixTickTick → Google
10Smart list names don't leak to TickTickGuard
11Medium priority [!] prefixTickTick → Google
12Notes/content syncGoogle → TickTick
13Idempotency (no duplicates)Both
14New list → project creationGoogle → TickTick
15Stale smart list task removalCleanup

API References

License

MIT