Getting Started
Prerequisites
- Node.js v18 or later
- Wrangler CLI
- A Todoist account with an integration/webhook configured
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
- Go to Todoist Integrations
- Create or select an integration
- Set the webhook URL to your worker URL
- Enter your webhook secret
- Subscribe to events:
item:added,item:updated,item:completed,item:deleted
View Logs
npm run tail