Skill: byungkyu/microsoft-to-do (version 1.0.3)

--- name: microsoft-to-do description: | Microsoft To Do API integration with managed OAuth. Manage task lists, tasks, checklist items, and linked resources. Use this skill when users want to create, read, update, or delete tasks and task lists in Microsoft To Do. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key. metadata: author: maton version: "1.0" clawdbot: emoji: 🧠 requires: env: - MATON_API_KEY --- # Microsoft To Do Access the Microsoft To Do API with managed OAuth authentication. Manage task lists, tasks, checklist items, and linked resources with full CRUD operations. ## Quick Start ```bash # List all task lists python <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://api.maton.ai/microsoft-to-do/v1.0/me/todo/lists') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF ``` ## Base URL ``` https://api.maton.ai/microsoft-to-do/{native-api-path} ``` Maton proxies requests to `graph.microsoft.com` and automatically injects your OAuth token. ## Authentication All requests require the Maton API key in the Authorization header: ``` Authorization: Bearer $MATON_API_KEY ``` **Environment Variable:** Set your API key as `MATON_API_KEY`: ```bash export MATON_API_KEY="YOUR_API_KEY" ``` ### Getting Your API Key 1. Sign in or create an account at [maton.ai](https://maton.ai) 2. Go to [maton.ai/settings](https://maton.ai/settings) 3. Copy your API key ## Connection Management Manage your Microsoft To Do OAuth connections at `https://api.maton.ai`. ### List Connections ```bash python <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://api.maton.ai/connections?app=microsoft-to-do&status=ACTIVE') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF ``` ### Create Connection ```bash python <<'EOF' import urllib.request, os, json data = json.dumps({'app': 'microsoft-to-do'}).encode() req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') req.add_header('Content-Type', 'application/json') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF ``` ### Get Connection ```bash python <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF ``` **Response:** ```json { "connection": { "connection_id": "{connection_id}", "status": "ACTIVE", "creation_time": "2025-12-08T07:20:53.488460Z", "last_updated_time": "2026-01-31T20:03:32.593153Z", "url": "https://connect.maton.ai/?session_token=...", "app": "microsoft-to-do", "metadata": {} } } ``` Open the returned `url` in a browser to complete OAuth authorization. ### Delete Connection ```bash python <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF ``` ### Specifying Connection If you have multiple Microsoft To Do connections, specify which one to use with the `Maton-Connection` header: ```bash python <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://api.maton.ai/microsoft-to-do/v1.0/me/todo/lists') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') req.add_header('Maton-Connection', '{connection_id}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF ``` If you have multiple connections, always include this header to ensure requests go to the intended account. ## Security & Permissions - Access is scoped to task lists, tasks, checklist items, and linked resources within the connected Microsoft To Do account. - **All write operations require explicit user approval.** Before executing any create, update, or delete call, confirm the target resource and intended effect with the user. ## API Reference ### Task List Operations #### List Task Lists ```bash GET /microsoft-to-do/v1.0/me/todo/lists ``` **Response:** ```json { "value": [ { "id": "AAMkADIyAAAhrbPWAAA=", "displayName": "Tasks", "isOwner": true, "isShared": false, "wellknownListName": "defaultList" } ] } ``` #### Get Task List ```bash GET /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId} ``` #### Create Task List ```bash POST /microsoft-to-do/v1.0/me/todo/lists Content-Type: application/json { "displayName": "Travel items" } ``` **Response (201 Created):** ```json { "id": "AAMkADIyAAAhrbPWAAA=", "displayName": "Travel items", "isOwner": true, "isShared": false, "wellknownListName": "none" } ``` #### Update Task List ```bash PATCH /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId} Content-Type: application/json { "displayName": "Vacation Plan" } ``` #### Delete Task List ```bash DELETE /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId} ``` Returns `204 No Content` on success. ### Task Operations #### List Tasks ```bash GET /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks ``` **Response:** ```json { "value": [ { "id": "AlMKXwbQAAAJws6wcAAAA=", "title": "Buy groceries", "status": "notStarted", "importance": "normal", "isReminderOn": false, "createdDateTime": "2024-01-15T10:00:00Z", "lastModifiedDateTime": "2024-01-15T10:00:00Z", "body": { "content": "", "contentType": "text" }, "categories": [] } ] } ``` #### Get Task ```bash GET /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId} ``` #### Create Task ```bash POST /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks Content-Type: application/json { "title": "A new task", "importance": "high", "status": "notStarted", "categories": ["Important"], "dueDateTime": { "dateTime": "2024-12-31T17:00:00", "timeZone": "Eastern Standard Time" }, "startDateTime": { "dateTime": "2024-12-01T08:00:00", "timeZone": "Eastern Standard Time" }, "isReminderOn": true, "reminderDateTime": { "dateTime": "2024-12-01T09:00:00", "timeZone": "Eastern Standard Time" }, "body": { "content": "Task details here", "contentType": "text" } } ``` **Task Fields:** | Field | Type | Description | |-------|------|-------------| | `title` | String | Brief description of the task | | `body` | itemBody | Task body with content and contentType (text/html) | | `importance` | String | `low`, `normal`, or `high` | | `status` | String | `notStarted`, `inProgress`, `completed`, `waitingOnOthers`, `deferred` | | `categories` | String[] | Associated category names | | `dueDateTime` | dateTimeTimeZone | Due date and time | | `startDateTime` | dateTimeTimeZone | Start date and time | | `completedDateTime` | dateTimeTimeZone | Completion date and time | | `reminderDateTime` | dateTimeTimeZone | Reminder date and time | | `isReminderOn` | Boolean | Whether reminder is enabled | | `recurrence` | patternedRecurrence | Recurrence pattern | #### Update Task ```bash PATCH /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId} Content-Type: application/json { "status": "completed", "completedDateTime": { "dateTime": "2024-01-20T15:00:00", "timeZone": "UTC" } } ``` #### Delete Task ```bash DELETE /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId} ``` Returns `204 No Content` on success. ### Checklist Item Operations Checklist items are subtasks within a task. #### List Checklist Items ```bash GET /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId}/checklistItems ``` **Response:** ```json { "value": [ { "id": [REDACTED_SECRET], "displayName": "Create draft", "createdDateTime": "2024-01-17T05:22:14Z", "isChecked": false } ] } ``` #### Create Checklist Item ```bash POST /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId}/checklistItems Content-Type: application/json { "displayName": "Final sign-off from the team" } ``` #### Update Checklist Item ```bash PATCH /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId}/checklistItems/{checklistItemId} Content-Type: application/json { "isChecked": true } ``` #### Delete Checklist Item ```bash DELETE /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId}/checklistItems/{checklistItemId} ``` Returns `204 No Content` on success. ### Linked Resource Operations Linked resources connect tasks to external items (e.g., emails, files). #### List Linked Resources ```bash GET /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId}/linkedResources ``` **Response:** ```json { "value": [ { "id": [REDACTED_SECRET], "webUrl": "https://example.com/item", "applicationName": "MyApp", "displayName": "Related Document", "externalId": "external-123" } ] } ``` #### Create Linked Resource ```bash POST /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId}/linkedResources Content-Type: application/json { "webUrl": "https://example.com/item", "applicationName": "MyApp", "displayName": "Related Document", "externalId": "external-123" } ``` #### Delete Linked Resource ```bash DELETE /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks/{taskId}/linkedResources/{linkedResourceId} ``` Returns `204 No Content` on success. ## Pagination Microsoft Graph uses OData pagination. Use `$top` to limit results and `$skip` for offset: ```bash GET /microsoft-to-do/v1.0/me/todo/lists/{todoTaskListId}/tasks?$top=10&$skip=0 ``` Response includes `@odata.nextLink` when more results exist: ```json { "value": [...], "@odata.nextLink": "https://graph.microsoft.com/v1.0/me/todo/lists/{id}/tasks?$skip=10" } ``` ## Code Examples ### JavaScript ```javascript const response = await fetch( 'https://api.maton.ai/microsoft-to-do/v1.0/me/todo/lists', { headers: { 'Authorization': `Bearer ${process.env.MATON_API_KEY}` } } ); const data = await response.json(); ``` ### Python ```python import os import requests response = requests.get( 'https://api.maton.ai/microsoft-to-do/v1.0/me/todo/lists', headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'} ) data = response.json() ``` ## Notes - Task list IDs and task IDs are opaque strings (e.g., `AAMkADIyAAAhrbPWAAA=`) - Timestamps use ISO 8601 format in UTC by default - The `dateTimeTimeZone` type requires both `dateTime` and `timeZone` fields - `wellknownListName` can be `defaultList`, `flaggedEmails`, or `none` - Task `status` values: `notStarted`, `inProgress`, `completed`, `waitingOnOthers`, `deferred` - Task `importance` values: `low`, `normal`, `high` - Supports OData query parameters: `$select`, `$filter`, `$orderby`, `$top`, `$skip` - IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets to disable glob parsing - IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments ## Error Handling | Status | Meaning | |--------|---------| | 400 | Missing Microsoft To Do connection or invalid request | | 401 | Invalid or missing Maton API key | | 404 | Resource not found | | 429 | Rate limited | | 4xx/5xx | Passthrough error from Microsoft Graph API | ### Troubleshooting: API Key Issues 1. Check that the `MATON_API_KEY` environment variable is set: ```bash echo $MATON_API_KEY ``` 2. Verify the API key is valid by listing connections: ```bash python <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://api.maton.ai/connections') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF ``` ### Troubleshooting: Invalid App Name 1. Ensure your URL path starts with `microsoft-to-do`. For example: - Correct: `https://api.maton.ai/microsoft-to-do/v1.0/me/todo/lists` - Incorrect: `https://api.maton.ai/v1.0/me/todo/lists` ## Resources - [Microsoft To Do API Overview](https://learn.microsoft.com/en-us/graph/api/resources/todo-overview) - [todoTaskList Resource](https://learn.microsoft.com/en-us/graph/api/resources/todotasklist) - [todoTask Resource](https://learn.microsoft.com/en-us/graph/api/resources/todotask) - [checklistItem Resource](https://learn.microsoft.com/en-us/graph/api/resources/checklistitem) - [linkedResource Resource](https://learn.microsoft.com/en-us/graph/api/resources/linkedresource) - [Maton Community](https://discord.com/invite/dBfFAcefs2) - [Maton Support](mailto:[REDACTED_SECRET])


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)