Connect Todoist Tasks to AI Memory

Your Todoist is full of project context, decisions, and priorities that your AI assistant does not know about. This guide shows how to sync Todoist tasks and comments to REM Labs so your AI can recall what you are working on, what was completed, and why.

What Gets Synced

Step 1: Get API Tokens

# Todoist: Settings > Integrations > Developer > API token # REM Labs: remlabs.ai/console or run: npx @remlabs/memory

Step 2: Install Dependencies

npm install @remlabs/sdk @doist/todoist-api-typescript

Step 3: Sync Active Tasks

import { RemClient } from "@remlabs/sdk"; import { TodoistApi } from "@doist/todoist-api-typescript"; const todoist = new TodoistApi(process.env.TODOIST_API_TOKEN); const rem = new RemClient({ apiKey: process.env.REMLABS_API_KEY }); // Fetch all projects for context const projects = await todoist.getProjects(); const projectMap = Object.fromEntries(projects.map(p => [p.id, p.name])); // Sync active tasks const tasks = await todoist.getTasks(); for (const task of tasks) { const projectName = projectMap[task.projectId] || "Inbox"; await rem.remember({ content: `Task: ${task.content} Project: ${projectName} Priority: ${task.priority} Due: ${task.due?.string || "No due date"} Description: ${task.description || "None"}`, namespace: "todoist:tasks", tags: [projectName, `p${task.priority}`], metadata: { todoist_id: task.id, project: projectName, priority: task.priority, status: "active" } }); } console.log(`Synced ${tasks.length} active tasks`);

Step 4: Sync Task Comments

// Comments often contain the real context for (const task of tasks) { const comments = await todoist.getComments({ taskId: task.id }); for (const comment of comments) { await rem.remember({ content: `Comment on "${task.content}": ${comment.content}`, namespace: "todoist:comments", tags: [projectMap[task.projectId] || "Inbox"], metadata: { todoist_task_id: task.id, comment_id: comment.id, posted_at: comment.postedAt } }); } }

Step 5: Query Task Context

Now your AI can answer questions about your tasks using natural language:

// "What am I working on for the marketing launch?" const results = await rem.recall({ query: "marketing launch tasks and priorities", namespace: "todoist:tasks", limit: 10 }); results.forEach(m => { console.log(`[${m.score.toFixed(2)}] ${m.content}`); });

Automate with a Cron Job

Run the sync on a schedule to keep your AI memory current:

// Run every 30 minutes with node-cron import cron from "node-cron"; cron.schedule("*/30 * * * *", async () => { console.log("Syncing Todoist to REM Labs..."); await syncActiveTasks(); await syncCompletedTasks(); console.log("Sync complete"); });

Use case: Ask your AI "What did I finish last week?" or "What is the highest priority task for the website project?" and get accurate answers grounded in your actual Todoist data.

Give your AI access to your task list

Free tier. Todoist sync. Natural language recall of your priorities.

Get Started