Todoist Integration
Sync your markdown tasks with Todoist for mobile access, notifications, and cross-device task management.
Overview
md2do provides bidirectional sync with Todoist:
- Push - Send markdown tasks to Todoist
- Pull - Update markdown from Todoist changes
- Sync - Keep both in sync automatically
Your markdown files remain the source of truth, while Todoist provides mobile apps and real-time notifications.
Quick Start
1. Get Your Todoist API Token
- Log in to Todoist
- Go to Settings → Integrations
- Direct link: Todoist Integrations Settings
- Copy your API token
- Keep it secure! This token has full access to your Todoist account
2. Configure md2do
Option A: Environment Variable (recommended)
export TODOIST_API_TOKEN="your-api-token-here"Option B: Config File
Create .md2do.json:
{
"todoist": {
"apiToken": "your-api-token-here",
"defaultProject": "Inbox"
}
}Important: Add .md2do.json to .gitignore if using this method!
3. Test Connection
md2do todoist listIf you see your Todoist tasks, you're connected! 🎉
Basic Usage
List Todoist Tasks
# List all tasks from default project
md2do todoist list
# List from specific project
md2do todoist list --project Work
# Limit results
md2do todoist list --limit 10
# JSON output
md2do todoist list --format jsonCreate Tasks in Todoist
# Simple task
md2do todoist add "Review pull request"
# With priority and labels
md2do todoist add "Fix bug" --priority urgent --labels bug,backend
# With due date
md2do todoist add "Meeting prep" --due tomorrow --project WorkImport Markdown Tasks to Todoist
# Import a specific task (by file:line)
md2do todoist import tasks.md:15
# Specify target project
md2do todoist import notes.md:42 --project PersonalBidirectional Sync
How Sync Works
md2do links tasks using IDs:
- [ ] Review PR @nick !! #code-review (2026-01-25) [todoist:123456789]The [todoist:ID] marker connects your markdown to Todoist.
Sync Commands
# Dry run - see what would change
md2do todoist sync --dry-run
# Actually sync
md2do todoist sync
# Sync specific directory
md2do todoist sync --path ./work-notes
# Pull only (update markdown from Todoist)
md2do todoist sync --direction pull
# Push only (update Todoist from markdown)
md2do todoist sync --direction pushWhat Gets Synced
From Markdown → Todoist:
- Task text (description)
- Completion status (
[ ]vs[x]) - Priority (
!!!→ P1,!!→ P2, etc.) - Tags → Labels
- Due dates
From Todoist → Markdown:
- Task text
- Completion status
- Priority
- Labels → Tags
- Due dates
Priority Mapping
md2do maps priorities to Todoist's system:
| Markdown | Todoist | Description |
|---|---|---|
!!! | P1 | Urgent |
!! | P2 | High |
! | P3 | Normal |
| (none) | P4 | Low |
Example:
- [ ] Critical bug !!! #backendSyncs to Todoist as P1 priority with "backend" label.
Labels & Tags
Tags in markdown become labels in Todoist:
- [ ] Fix authentication #backend #security #urgentBecomes a Todoist task with 3 labels: backend, security, urgent.
Label Auto-Creation: md2do creates missing labels automatically in Todoist.
Projects
Default Project
Set in config:
{
"todoist": {
"defaultProject": "Inbox"
}
}All synced tasks go here unless specified otherwise.
Project-Specific Sync
# Sync to specific project
md2do todoist import tasks.md:10 --project "Work Tasks"Common Workflows
Mobile Task Capture
Use Todoist mobile app to capture tasks, then pull to markdown:
# Pull new tasks from Todoist
md2do todoist sync --direction pullDaily Review
Review markdown locally, push updates:
# Check markdown tasks
md2do list --assignee me --incomplete
# Push changes to Todoist
md2do todoist sync --direction pushTeam Collaboration
Keep markdown in git, sync with personal Todoist:
# Work on tasks locally (in markdown)
md2do list --project acme-corp
# Sync your subset to Todoist for mobile
md2do todoist sync --path ./projects/acme-corpConfiguration
Complete Todoist configuration options:
{
"todoist": {
"apiToken": "your-token",
"defaultProject": "Inbox",
"autoSync": false,
"syncDirection": "both"
}
}Options:
apiToken- Your Todoist API tokendefaultProject- Default project name for new tasksautoSync- Auto-sync after changes (default:false)syncDirection-"push","pull", or"both"(default:"both")
See Configuration Guide for details.
Troubleshooting
"Invalid token" error
# Verify token is set
echo $TODOIST_API_TOKEN
# Test connection
md2do todoist listMake sure you copied the full token from Todoist settings.
Tasks not syncing
Check for Todoist ID markers:
# Find tasks without Todoist IDs
md2do list --incomplete | grep -v "todoist:"
# Import missing tasks
md2do todoist import tasks.md:15Duplicate tasks
If a task appears twice after sync:
- Delete the duplicate in Todoist
- Run
md2do todoist syncagain - The markdown version (with
[todoist:ID]) is preserved
Different completion status
The last-modified wins. If you:
- Mark done in markdown → Push syncs to Todoist
- Mark done in Todoist → Pull syncs to markdown
Run md2do todoist sync --dry-run to preview changes.
Advanced Usage
Multiple Todoist Accounts
Use different configs per directory:
Personal (~/personal/.md2do.json):
{
"todoist": {
"apiToken": "personal-token",
"defaultProject": "Personal"
}
}Work (~/work/.md2do.json):
{
"todoist": {
"apiToken": "work-token",
"defaultProject": "Work"
}
}Selective Sync
Only sync specific tags:
# Import only tasks tagged #todoist
md2do list --tag todoist | while read line; do
md2do todoist import "$line"
done(Better filtering coming soon)
Watch Mode (Future)
Auto-sync on file changes:
# Coming soon
md2do watch --sync todoistSecurity
Protect Your Token
- Never commit tokens - Add
.md2do.jsonto.gitignore - Use environment variables - Especially for shared projects
- Restrict permissions:bash
chmod 600 ~/.md2do.json
Token Scope
Todoist API tokens have full account access. Keep them secure like passwords.
Revoke Tokens
If compromised, regenerate in Todoist Settings.
Limitations
Current limitations (may be addressed in future versions):
- No support for Todoist sections
- No support for recurring tasks
- No support for task comments
- Subtasks sync as separate tasks
- No conflict resolution UI (last-modified wins)
See Roadmap for planned features.
FAQ
Can I use md2do without Todoist?
Yes! md2do works standalone. Todoist integration is completely optional.
Will syncing modify my markdown files?
Yes, when pulling from Todoist. Always commit your markdown to git first.
Can multiple people sync the same markdown files?
Not recommended. md2do is designed for personal task management. For teams, keep markdown in git and sync individually to personal Todoist accounts.
What happens if I delete a task in Todoist?
It stays in your markdown. md2do only syncs updates and completions, not deletions.
Can I sync to multiple Todoist projects?
Not automatically. Use --project flag when importing tasks to specify the destination.
Next Steps
- Task Format - Learn task metadata syntax
- Configuration - Advanced config options
- MCP Integration - Use with Claude Code AI
- CLI Reference - Complete command reference
Get Help
- GitHub Issues - Report bugs
- Discussions - Ask questions
- Todoist API Docs - Official API reference