# Google Tasks on boxd

> Google Tasks provides a simple to-do list and task management system integrated into Gmail and Google Calendar for quick and easy tracking.

- Page: https://boxd.sh/integrations/googletasks/
- CLI: `run googletasks` (18 commands, 1 marked common)
- SDK: `import { googletasks } from "@boxd/run"`; every parameter and response type is at `@boxd/run/googletasks`
- Triggers: 5
- Connect: `run auth googletasks` (Sign in with Google Tasks), or https://app.boxd.sh/integrations/detail/googletasks
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth googletasks      # once: prints a link to connect your account
run googletasks           # list its commands
run googletasks list-all-tasks
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { googletasks } from "@boxd/run";

const result = await googletasks.listAllTasks({});
console.log(result);

googletasks.on("new-task-created", async (event) => {
  // New Task Created: runs on this machine, once per event
  console.log(event);
});
```

Run it with `run googletasks.run.ts`. A script that calls `.on()` keeps running as a job and handles each event.

## Commands

Required flags are listed; `run googletasks <command> --help` lists the optional ones. "common" marks what `run googletasks` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `batch-execute` | `googletasks.batchExecute()` | `--requests` | 1 | Executes multiple Google Tasks API operations in a single HTTP batch request and returns structured per-item results |
| `bulk-insert-tasks` ·deprecated | `googletasks.bulkInsertTasks()` | `--tasklist-id` `--tasks` | 1 | Use BatchExecute instead |
| `clear-tasks` | `googletasks.clearTasks()` | `--tasklist` | 0 | Permanently and irreversibly clears all completed tasks from a specified Google Tasks list; this action is destructive, idempotent, and cannot be undone |
| `create-task-list` | `googletasks.createTaskList()` | `--tasklist-title` | 0 | Creates a new task list with the specified title and returns a tasklist_id |
| `delete-task` | `googletasks.deleteTask()` | `--task-id` `--tasklist-id` | 0 | Deletes a specified task from a Google Tasks list |
| `delete-task-list` | `googletasks.deleteTaskList()` | `--tasklist-id` | 0 | Permanently deletes an existing Google Task list, identified by `tasklist_id`, along with all its tasks; this operation is irreversible |
| `get-task` | `googletasks.getTask()` | `--task-id` `--tasklist-id` | 0 | Retrieve a specific Google Task |
| `get-task-list` | `googletasks.getTaskList()` | `--tasklist-id` | 0 | Retrieves a specific task list from the user's Google Tasks if the `tasklist_id` exists for the authenticated user |
| `insert-task` | `googletasks.insertTask()` | `--tasklist-id` `--title` | 10 | Creates a new task in a given `tasklist_id`, optionally as a subtask of an existing `task_parent` or positioned after an existing `task_previous` sibling, where both `task_parent` and `task_previous`… |
| `list-all-tasks` | `googletasks.listAllTasks()` | — | 10 | List all tasks across all of the user's task lists with optional filters |
| `list-task-lists` | `googletasks.listTaskLists()` | — | 2 | Fetches the authenticated user's task lists from Google Tasks; results may be paginated |
| `list-tasks` | `googletasks.listTasks()` | `--tasklistId` | 10 | Retrieves tasks from a Google Tasks list; all date/time strings must be RFC3339 UTC, and `showCompleted` must be true if `completedMin` or `completedMax` are specified |
| `move-task` | `googletasks.moveTask()` | `--task` `--tasklist` | 3 | Moves the specified task to another position in the task list or to a different task list |
| `patch-task` | `googletasks.patchTask()` | `--task-id` `--tasklist-id` | 9 | Partially updates an existing task (identified by `task_id`) within a specific Google Task list (identified by `tasklist_id`), modifying only the provided attributes from `TaskInput` (e.g., `title`… |
| `patch-task-list` | `googletasks.patchTaskList()` | `--tasklist-id` | 1 | Updates the title of an existing Google Tasks task list |
| `update-task` ·deprecated | `googletasks.updateTask()` | `--task-id` `--tasklist-id` | 5 | Use patch-task instead |
| `update-task-full` ·common | `googletasks.updateTaskFull()` | `--id` `--task-id` `--tasklist-id` `--title` | 10 | Fully replace an existing Google Task using PUT method |
| `update-task-list` | `googletasks.updateTaskList()` | `--tasklist-id` `--title` | 0 | Updates the authenticated user's specified task list |

## Triggers

`googletasks.on("<event>", handler)` in a script; required config goes before the handler as an object.

| Event | Name | Required config | Description |
|---|---|---|---|
| `"new-task-created"` | New Task Created | — | Triggers when a new task is created in a Google Tasks list |
| `"new-task-list-created"` | New Task List Created | — | Triggers when a new Google Tasks task list is created |
| `"task-details-changed"` | Task Details Changed | `tasklist_id` `task_id` | Triggers when a specific task's details change |
| `"task-list-changed"` | Task List Changed | `tasklist_id` | Triggers when a task list changes (title or content updates) |
| `"task-updated"` | Task Updated | — | Triggers when an existing task is updated in a Google Tasks list |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
