todoist-due-drafts

Check Todoist for tasks due today (and overdue) that involve pinging, emailing, or following up with someone. Auto-draft the emails using meeting context and notify via WhatsApp. Use when running the daily due-drafts cron, or when user asks to process email tasks from Todoist.

1,868 stars

Best use case

todoist-due-drafts is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Check Todoist for tasks due today (and overdue) that involve pinging, emailing, or following up with someone. Auto-draft the emails using meeting context and notify via WhatsApp. Use when running the daily due-drafts cron, or when user asks to process email tasks from Todoist.

Teams using todoist-due-drafts should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/todoist-due-drafts/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/business-tools/executive-assistant-skills/skills/todoist-due-drafts/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/todoist-due-drafts/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How todoist-due-drafts Compares

Feature / Agenttodoist-due-draftsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Check Todoist for tasks due today (and overdue) that involve pinging, emailing, or following up with someone. Auto-draft the emails using meeting context and notify via WhatsApp. Use when running the daily due-drafts cron, or when user asks to process email tasks from Todoist.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Todoist Due-Today Email Drafts

## Config — read before starting
Read `../config/user.json` (resolves to `~/executive-assistant-skills/config/user.json`).
Extract and use throughout:
- `primary_email`, `work_email` — Gmail accounts
- `whatsapp` — for notification delivery
- `workspace` — absolute path to OpenClaw workspace
- `signature` — email signature

## Debug Logging (MANDATORY)
Read `../config/DEBUG_LOGGING.md` for the full convention. Use `python3 {user.workspace}/scripts/skill_log.py todoist-due-drafts <level> "<message>" ['<details>']` at every key step. Log BEFORE and AFTER every external call (todoist-cli, gog, mcporter). On any error, log the full command and stderr before continuing.

## Steps

### 1. Get today's due tasks from Todoist
```bash
source {user.workspace}/.env
todoist-cli today --json
```

Also check overdue tasks:
```bash
todoist-cli list --filter "overdue" --json
```

### 2. Identify email/ping tasks
Filter for tasks whose content matches outreach intent:
- Keywords: `ping`, `email`, `follow up`, `follow-up`, `send`, `reach out`, `text`, `message`, `intro`, `connect`, `check in`, `nudge`, `reply`, `respond`, `draft`
- Pattern: any task that implies sending a communication to a specific person

Skip tasks that are clearly NOT outreach (e.g. "review doc", "read report", "build proposal").

### 3. For each outreach task, draft the email
Read and follow `~/executive-assistant-skills/email-drafting/SKILL.md` for all drafting rules.

For each task:
1. **Identify the recipient**: Extract person/company name from task content + description
2. **Pull meeting context (if available)**: If the task description references a meeting name, date, or was created by the action-items cron (check for Granola citation links or meeting metadata in description), retrieve the transcript via Granola/Grain. If no meeting reference exists in the task, skip directly to step 3 — draft from email history and task content alone.
   ```bash
   # Find the meeting in Granola
   mcporter call granola list_meetings --args '{"time_range": "custom", "custom_start": "<meeting-date>", "custom_end": "<meeting-date+1>"}'
   # Query for what was discussed with this person
   mcporter call granola query_granola_meetings --args '{"query": "What did {user.name} discuss with <recipient> and what did he promise or commit to do?", "document_ids": ["<meeting_id>"]}'
   ```
   Then cross-check with Grain for the full transcript:
   ```bash
   mcporter call grain.list_attended_meetings --args '{}'
   # Note: Grain's schema does not support `start_date`/`end_date` filters. Call with empty args and filter the results manually by `start_datetime` to match the meeting date range.
   mcporter call grain.fetch_meeting_transcript --args '{"meeting_id": "<grain_meeting_id>"}'
   ```
   When meeting context is available, the email draft must reflect what was actually said — not just the task title. Look for: specific commitments, timelines discussed, names/projects mentioned, tone of the conversation, and any docs/links promised.
3. **Search email history**: Find the latest thread with this person across both Gmail accounts to get context, their email address, and the right account to reply from. If no prior thread exists with this recipient, default to `{user.work_email}` for professional/business contacts or `{user.primary_email}` for personal contacts. When ambiguous, use `{user.work_email}`.
4. **Determine email type**: follow-up, ping/check-in, intro, send-doc, etc.
5. **Draft the email**: Create a Gmail draft on the correct account (the one with the existing thread). If it's a reply, use `--thread-id` to keep it in the same thread.
6. **Use all context together**: Combine the meeting transcript (what was actually discussed), task description, and email history to write a specific, contextual draft. Never write generic follow-ups — reference concrete topics from the conversation.

#### Draft rules
- Mirror the language of the existing thread (English or Spanish)
- Keep it short — these are follow-ups and pings, not essays
- Sign with `{user.signature}`
- If the task says "ping" or "check in" — write a brief, friendly nudge
- If the task says "send [thing]" — draft the email with the attachment reference (or attach if path is known)
- If the task says "intro" — follow intro format from email-drafting skill
- If recipient email can't be found — report it, don't skip silently

### 4. Notify via WhatsApp
Send a single WhatsApp message to {user.whatsapp} with:

```
📬 *Due-today drafts*

<N> email drafts created from today's Todoist tasks:

1. **<recipient>** — <one-line intent> (draft in <account>)
2. ...

Review and send when ready.
```

If tasks exist but none are outreach-type, report:
```
📋 *Due-today tasks (no drafts needed)*

<list of today's tasks — quick reference>
```

If no tasks due today → NO_REPLY (skip notification entirely).

### 5. Infrastructure
```bash
python3 {user.workspace}/scripts/cron_canary.py ping todoist-due-drafts
```

## Error handling
- If `todoist-cli` fails: notify via WhatsApp "⚠️ Todoist due-drafts failed: <error>", ping canary, exit.
- If Granola/Grain lookup fails for a task: continue without meeting context — draft from email history + task content only.
- If Gmail draft creation fails for one task: continue with remaining tasks, report failures in the notification.
- If no `.env` file or token expired: report "⚠️ Todoist token unavailable — check agent-secrets lease" and exit.

## Rules
- Don't complete the tasks — just draft and notify. User decides when to send.
- Before drafting, check if user already replied: `gog --account <account> --no-input gmail search "to:<recipient> in:sent newer_than:14d" --json`. If recent sent mail exists in the same thread, skip drafting and note "already replied" in the notification.
- Check for existing drafts before creating: `gog --account <account> --no-input gmail drafts --json`. If a draft already exists for the same thread (matching thread ID or recipient + subject), skip and note "draft already exists."
- Overdue outreach tasks get a ⚠️ prefix in the notification.

## Overview

Scans Todoist for due and overdue tasks that involve outreach (pinging, emailing, following up), auto-drafts contextual emails using meeting transcripts and email history, and notifies via WhatsApp.

## Prerequisites

- `todoist-cli` installed with valid API token in workspace `.env`
- `gog` CLI configured with both Gmail accounts
- `mcporter` with Granola and Grain MCP connections for meeting context lookup
- WhatsApp delivery endpoint configured in `user.json`
- OpenClaw workspace with `skill_log.py` and `cron_canary.py` scripts

## Instructions

See the Steps section above (Steps 1 through 5) for the full execution workflow.

## Output

- Gmail drafts created on the appropriate account for each outreach task
- A single WhatsApp notification summarizing all drafts created, or a task list if no drafts were needed
- NO_REPLY if no tasks are due today

## Examples

```bash
# The skill runs todoist-cli to find due tasks, identifies outreach items,
# pulls meeting context from Granola/Grain, drafts emails via gog, and notifies.
# Example WhatsApp output:
# "2 email drafts created from today's Todoist tasks:
#  1. Sarah Chen — follow-up on advisory scope (draft in work account)
#  2. David Park — intro to Marcos (draft in personal account)"
```

## Resources

- [Todoist REST API](https://developer.todoist.com/rest/v2/)
- [Gmail API](https://developers.google.com/gmail/api)
- [Granola API](https://granola.ai/docs)
- [Grain API](https://grain.com/docs)

Related Skills

action-items-todoist

1868
from jeremylongshore/claude-code-plugins-plus-skills

Extract action items from today's Granola/Grain meetings, create Todoist tasks, complete fulfilled tasks, and draft meeting-triggered follow-up emails. Use when running the daily action items cron, post-meeting cron, or when user asks to process meeting action items. NOT for general email drafting without meeting context.

schema-optimization-orchestrator

1868
from jeremylongshore/claude-code-plugins-plus-skills

Multi-phase schema optimization workflow orchestrator. Creates session directories, spawns phase agents sequentially, validates outputs, aggregates results. Trigger: "run schema optimization", "optimize schema workflow", "execute schema phases"

test-skill

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test skill for E2E validation. Trigger with "run test skill" or "execute test". Use this skill when testing skill activation and tool permissions.

example-skill

1868
from jeremylongshore/claude-code-plugins-plus-skills

Brief description of what this skill does and when the model should activate it. Use when [describe the user's intent or situation]. Trigger with "example phrase", "another trigger", "/example-skill".

testing-visual-regression

1868
from jeremylongshore/claude-code-plugins-plus-skills

Detect visual changes in UI components using screenshot comparison. Use when detecting unintended UI changes or pixel differences. Trigger with phrases like "test visual changes", "compare screenshots", or "detect UI regressions".

generating-unit-tests

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions. Use when creating test coverage for functions, classes, or modules. Trigger with phrases like "generate unit tests", "create tests for", or "add test coverage".

generating-test-reports

1868
from jeremylongshore/claude-code-plugins-plus-skills

Generate comprehensive test reports with metrics, coverage, and visualizations. Use when performing specialized testing. Trigger with phrases like "generate test report", "create test documentation", or "show test metrics".

orchestrating-test-execution

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test coordinate parallel test execution across multiple environments and frameworks. Use when performing specialized testing. Trigger with phrases like "orchestrate tests", "run parallel tests", or "coordinate test execution".

managing-test-environments

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test provision and manage isolated test environments with configuration and data. Use when performing specialized testing. Trigger with phrases like "manage test environment", "provision test env", or "setup test infrastructure".

generating-test-doubles

1868
from jeremylongshore/claude-code-plugins-plus-skills

Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".

generating-test-data

1868
from jeremylongshore/claude-code-plugins-plus-skills

Generate realistic test data including edge cases and boundary conditions. Use when creating realistic fixtures or edge case test data. Trigger with phrases like "generate test data", "create fixtures", or "setup test database".

analyzing-test-coverage

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze code coverage metrics and identify untested code paths. Use when analyzing untested code or coverage gaps. Trigger with phrases like "analyze coverage", "check test coverage", or "find untested code".