Functions

build-task-payload

fn (content: Str, options: Map): Map

Build the create-task payload. Attio requires deadline_at, linked_records, and assignees to be present (nullable/empty is fine); options overrides any of them. Exposed for testing; create-task uses it.

Example

payload ::attio::tasks/build-task-payload("Send the proposal", {deadline_at: "2026-08-01T12:00:00Z"})
payload.data.deadline_at  // "2026-08-01T12:00:00Z"
payload.data.assignees  // []

create-task

fn (content: Str): Map
fn (content: Str, options: Map): Map
fn (content: Str, options: Map, opts: Map): Map

POST /tasks - Create a task. options: deadline_at (RFC3339 or null), linked_records (Vec of {target_object, target_record_id}), assignees (Vec of {referenced_actor_type: "workspace-member", referenced_actor_id}).

Example

::attio::tasks/create-task("Send the proposal", {
  deadline_at: "2026-08-01T12:00:00Z",
  linked_records: [{target_object: "companies", target_record_id: "7f4e2a10-3b9c-4d2a-8f1e-6a5c9d0b1e23"}]
})

delete-task

fn (task-id: Str): Any
fn (task-id: Str, opts: Map): Any

DELETE /tasks/{id} - Delete a task.

Example

::attio::tasks/delete-task("c2d8e4f1-5a6b-47c9-b0d3-1e2f3a4b5c6d")

list-tasks

fn (): Map
fn (options: Map): Map
fn (options: Map, opts: Map): Map

GET /tasks - The workspace's tasks (limit/offset via the 1-arity options map).

Example

tasks ::attio::tasks/list-tasks({limit: 20})
map(tasks.data, %.content_plaintext)

update-task

fn (task-id: Str, changes: Map): Map
fn (task-id: Str, changes: Map, opts: Map): Map

PATCH /tasks/{id} - Update a task (is_completed, deadline_at, assignees, linked_records).

Example

::attio::tasks/update-task("c2d8e4f1-5a6b-47c9-b0d3-1e2f3a4b5c6d", {is_completed: true})