omnifocusManage OmniFocus tasks via JavaScript for Automation (JXA) scripts. Use when the user asks Clawdbot to interact with OmniFocus, including - (1) Adding tasks to inbox, (2) Listing or searching tasks (inbox, available, flagged, overdue, due soon), (3) Completing tasks, (4) Updating task properties (notes, due dates, flags), (5) Getting OmniFocus statistics, (6) Reporting on task status, or (7) Acting on tasks in OmniFocus based on user queries.
Install via ClawdBot CLI:
clawdbot install shenzo1/omnifocusAutomate OmniFocus task management via JavaScript for Automation (JXA) scripts.
All scripts are located in the scripts/ directory and use JXA. Run with:
osascript -l JavaScript scripts/<script-name>.js [args]
Key Scripts:
add_task.js - Add task to inboxlist_tasks.js - List tasks with filterssearch_tasks.js - Search tasks by keywordcomplete_task.js - Complete a task by nameupdate_task.js - Update task propertiesget_stats.js - Get OmniFocus statisticsosascript -l JavaScript scripts/add_task.js "Task name" ["Note"] ["YYYY-MM-DD"]
Examples:
osascript -l JavaScript scripts/add_task.js "Buy groceries"
osascript -l JavaScript scripts/add_task.js "Review doc" "Check sections 1-3"
osascript -l JavaScript scripts/add_task.js "Submit report" "Q1" "2026-01-31"
Returns: Task ID
osascript -l JavaScript scripts/list_tasks.js [filter] [limit]
Filters:
inbox - Inbox tasksavailable - Available (unblocked) tasks (default)flagged - Flagged tasksdue-soon - Due within 3 daysoverdue - Past dueall - All incomplete tasksReturns: JSON array with task details (name, id, note, dueDate, flagged, project, tags)
osascript -l JavaScript scripts/search_tasks.js "keyword" [limit]
Searches task names and notes. Case-insensitive.
Returns: JSON array of matching tasks
osascript -l JavaScript scripts/complete_task.js "Task name"
Searches inbox first, then all tasks. Completes first match.
osascript -l JavaScript scripts/update_task.js "Task name" [--note "text"] [--due "YYYY-MM-DD"] [--flag true/false]
Examples:
osascript -l JavaScript scripts/update_task.js "Review" --note "Added notes"
osascript -l JavaScript scripts/update_task.js "Submit" --due "2026-02-01"
osascript -l JavaScript scripts/update_task.js "Important" --flag true
osascript -l JavaScript scripts/get_stats.js
Returns: JSON with counts:
Daily Review:
# Statistics overview
osascript -l JavaScript scripts/get_stats.js
# What needs attention
osascript -l JavaScript scripts/list_tasks.js overdue
osascript -l JavaScript scripts/list_tasks.js due-soon
Task Queries:
# "What's in my inbox?"
osascript -l JavaScript scripts/list_tasks.js inbox
# "What are my next actions?"
osascript -l JavaScript scripts/list_tasks.js available 10
# "Show my flagged tasks"
osascript -l JavaScript scripts/list_tasks.js flagged
Task Management:
# "Add a task to call John"
osascript -l JavaScript scripts/add_task.js "Call John"
# "Find tasks about the project"
osascript -l JavaScript scripts/search_tasks.js "project"
# "Mark 'Buy milk' as complete"
osascript -l JavaScript scripts/complete_task.js "Buy milk"
# "Flag the review task"
osascript -l JavaScript scripts/update_task.js "Review" --flag true
Scripts return JSON for structured data. When presenting to users:
Example response format:
Found 3 overdue tasks:
⢠Submit Q1 report (due Jan 20)
⢠Review contract (due Jan 23)
⢠Call vendor (due Jan 24)
And 5 tasks due in the next 3 days:
⢠[list tasks]
Would you like me to flag or update any of these?
Common errors:
Find then act:
# 1. Search for task
RESULTS=$(osascript -l JavaScript scripts/search_tasks.js "meeting")
# 2. Parse and identify target task name
# 3. Complete the task
osascript -l JavaScript scripts/complete_task.js "Team meeting notes"
For detailed API information and advanced usage, see:
references/jxa-api.md - Object model and methodsreferences/automation-guide.md - Detailed script documentation and workflowsRead these files when:
Generated Mar 1, 2026
Individuals use the OmniFocus skill to automate daily task reviews, add new tasks via voice or text commands, and quickly check overdue or flagged items. This streamlines personal organization by reducing manual input and providing instant status updates, helping users stay on top of their to-do lists efficiently.
Freelancers leverage the skill to manage client projects by adding tasks with notes and due dates, searching for specific project-related items, and updating task statuses. It enables seamless integration into their workflow, ensuring deadlines are met and tasks are prioritized without switching contexts.
Small business teams use the skill to coordinate tasks by listing available actions, flagging urgent items, and completing tasks based on shared priorities. It facilitates quick updates and status reports, enhancing collaboration and reducing miscommunication in fast-paced environments.
Researchers and students employ the skill to organize study tasks, set due dates for assignments, and search for specific topics in their task notes. It aids in managing academic workloads by providing structured overviews and reminders, improving time management and focus.
Healthcare administrators utilize the skill to track administrative duties, such as scheduling follow-ups or updating patient records, by adding tasks with notes and due dates. It helps maintain compliance and efficiency in handling routine tasks, reducing administrative burden.
Offer a basic version of the skill for free to attract users, with premium features like advanced analytics or integration with other apps available via subscription. This model capitalizes on the growing demand for personal productivity tools, generating recurring revenue from power users.
License the skill to small businesses as part of a team productivity suite, with pricing based on the number of users or tasks managed. This model targets organizations seeking to automate task management, providing scalable solutions and ongoing support contracts.
Provide consulting services to customize the skill for specific industries, such as healthcare or education, and offer integration with existing systems. This model leverages expertise in automation to deliver tailored solutions, generating revenue from project-based fees and maintenance.
š¬ Integration Tip
Ensure OmniFocus is running and scripts have execute permissions; parse JSON outputs for structured data to present user-friendly results.
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
Create, search, and manage Bear notes via grizzly CLI.
Track water and sleep with JSON file storage
Notion API for creating and managing pages, databases, and blocks.
Smart ClawdBot documentation access with local search index, cached snippets, and on-demand fetch. Token-efficient and freshness-aware.
Work with Obsidian vaults as a knowledge base. Features: fuzzy/phonetic search across all notes, auto-folder detection for new notes, create/read/edit notes with frontmatter, manage tags and wikilinks. Use when: querying knowledge base, saving notes/documents, editing existing notes by user instructions.