# Daily Note

Creates or looks up the note for a day, week, month, quarter, or year, through the same service the
browser uses.

- Tag: `daily_note`
- Input: `input`
- Output: `output`
- Text fields support `{{ input.* }}` interpolation.

The plugin creates nothing on its own. This node is how a workspace opts back into automation on its
own terms: a workflow that creates the day's note is one somebody wrote, and it can carry the rules a
built-in schedule never could — skip weekends, skip the days already blocked out, only on a week that
has a review in it.

That is the difference worth keeping. A plugin creating notes for everyone produces notes nobody
opened; a workflow you shaped is a decision you made once and can change. `get` is the other half —
scheduled, it answers whether the day has been written yet, without writing it.

## Periods

A note is identified by its **period start** and its cadence, not by the exact date you pass. Any
date inside a period resolves to the same note: Wednesday and Friday both address that week's note,
every day of a month addresses that month's, and every day of a quarter addresses that quarter's.
The weekday a week anchors on is the plugin's `preferred_day` setting.

`date` is a plain `YYYY-MM-DD` string. Leave it empty for today, read in `timezone` or, when that is
empty too, the plugin's configured timezone.

Which cadences are offered is the `enabled` flag per cadence in plugin settings, and it means "offer
this", not "create these automatically". `create` refuses a cadence the plugin does not offer;
`get` and `list` do not, so turning a cadence off stops new notes without hiding the ones already
written.

## Operations

### `create`

Config: `cadence`, optional `date`, optional `timezone`.

Creates the note for the period, or returns the one already there — asking twice yields one note.
Creating writes the document (blank, or from the cadence's configured template) and records the note.
In the template, `{{ date }}` renders the period's date, so a note created ahead of time carries its own date; `{{ time }}` is the creation time.

Output is a note view:

```json
{
  "date": "2026-08-26",
  "cadence": "daily",
  "note": {
    "date": "2026-08-26",
    "cadence": "daily",
    "document_id": "01K3...",
    "title": "2026-08-26"
  },
  "document_missing": false
}
```

### `get`

Config: `cadence`, optional `date`, optional `timezone`.

Answers whether a note exists, creating nothing. Same output shape as `create`, with `note` as `null`
when no note was written for the period.

`document_missing` is `true` when a note was recorded and its document has since been deleted, which
is a different thing from never having written one.

### `list`

Config: optional `cadence` (empty means every cadence), `from`, `to`.

Every note whose period start falls in `[from, to]`, oldest first. `from` and `to` render as
`YYYY-MM-DD`. Output is `{"notes": [...]}` where each entry has the shape of `note` above.

Listing does no document lookups, so a note whose document was deleted still appears here. Use `get`
when you need to know the document is still there.

## Where history comes from

Reads answer from the plugin's Daily Notes Collection — one row per note written — never by
re-rendering the path pattern. Changing where new notes are filed therefore moves new notes only, and
leaves every note already recorded reachable.
