b8d21e4 · Talk to Notion: read projects, write trails · 2 months ago

39 lines · 1.3 KB

Notion

Notion is the live work ledger. Markdown is still the wall.

The agent talks to Notion. It does not wait for a dumped file.

What it reads

The Projects database. One row per unit of work.

Notion propertyWork field
Namename
Scope keyid (falls back to a slug of Name)
Admin Channelroom — must already be a room row in the markdown map
Statusstate — only active, blocked, closed. Any other word the company uses is a gap, not a post.
Broadcast TSanchor
Ownerowner

What it writes

AfterNotion properties
postBroadcast TS (the ts Slack returned), Broadcast Permalink. No ts → no PATCH.
gatherLast Status Update (the breadcrumb trail, clipped at 2000 chars with (truncated))
gap / skipnothing

Do not write Owner. The card does not change who owns the work.

Dry-run GETs the database and prints the write plan. It does not PATCH.

Run

export NOTION_TOKEN=ntn_...
python agent/python/relay.py --mapping examples/mapping.md --notion-db  --dry-run

Share the integration with the Projects database. Channel ids still have to be in the markdown map — Notion cannot invent a room.