Functions

build-note-payload

fn (parent-object: Str, parent-record-id: Str, title: Str, content: Str): Map

Build the create-note payload (plaintext format). Exposed for testing; create-note uses it.

Example

::attio::notes/build-note-payload("people", "record-1", "Intro call", "Wants a demo.").data.format  // "plaintext"

create-note

fn (parent-object: Str, parent-record-id: Str, title: Str, content: Str): Map
fn (parent-object: Str, parent-record-id: Str, title: Str, content: Str, opts: Map): Map

POST /notes - Attach a note to a record.

Example

::attio::notes/create-note("people", "7f4e2a10-3b9c-4d2a-8f1e-6a5c9d0b1e23", "Demo call", "Positive; follow up Friday.")

delete-note

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

DELETE /notes/{id} - Delete a note.

Example

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

list-notes

fn (parent-object: Str, parent-record-id: Str): Map
fn (parent-object: Str, parent-record-id: Str, opts: Map): Map

GET /notes?parent_object=&parent_record_id= - The notes on a record.

Example

notes ::attio::notes/list-notes("people", ::attio::recordsEC)
map(notes.data, %.title)