Something went wrong

Thank you for being patient! We're working hard on resolving the issue

Tasks - Lona Docs Log in

Tasks

Tasks are a row type with status and importance tracking. They also have a dedicated API for CRUD operations independent of sheet context.

Task rows

A task row appears in the sheet tree like any other row:

const taskRow = sheet.row({ type: "task" });
console.log(taskRow?.label);       // "Buy groceries"

Task properties

PropertyDescription
labelTask title
attributes.statusTask status (e.g., "todo", "inProgress", "done")
attributes.importancePriority level (e.g., "low", "medium", "high")
const attrs = taskRow?.attributes<{
  status: string;
  importance: string;
}>();
if (attrs) {
  console.log(attrs.status);     // "done"
  console.log(attrs.importance); // "high"
}

TasksClient

client.tasks provides CRUD operations for tasks:

Listing tasks

const tasks = await client.tasks.list();

for (const task of tasks) {
  console.log(`${task.title} — ${task.status}`);
}

Creating a task

const task = await client.tasks.create({
  title: "Review PR",
  status: "todo",
  importance: "high",
});

Getting a single task

const task = await client.tasks.get(taskId);

Updating a task

await client.tasks.update(taskId, {
  status: "done",
});

Deleting a task

await client.tasks.delete(taskId);

See also

  • Rows — row types and tree structure
  • Cells — reading cell data for task rows