Skip to main content

Getting Started

Prerequisites

Installation

git clone https://github.com/sagelga/todoist-to-cloudflarekv.git
cd todoist-to-cloudflarekv
npm install

KV Namespace

Create a KV namespace:

npx wrangler kv namespace create "TODOIST_TASKS"

Update wrangler.toml with the returned namespace ID.

Webhook Secret

Set the webhook secret for request validation:

npx wrangler secret put TODOIST_WEBHOOK_SECRET

Or add it to wrangler.toml as a plain-text variable (less secure):

[vars]
TODOIST_WEBHOOK_SECRET = "your-secure-random-string"

Local Development

npm run dev

Deployment

npm run deploy

The worker URL will be printed (e.g., https://todoist-to-cloudflarekv.your-subdomain.workers.dev).

Configure Todoist Webhook

  1. Go to Todoist Integrations
  2. Create or select an integration
  3. Set the webhook URL to your worker URL
  4. Enter your webhook secret
  5. Subscribe to events: item:added, item:updated, item:completed, item:deleted

View Logs

npm run tail