b8d21e4 · Talk to Notion: read projects, write trails · 2 months ago
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 property | Work field |
|---|---|
| Name | name |
| Scope key | id (falls back to a slug of Name) |
| Admin Channel | room — must already be a room row in the markdown map |
| Status | state — only active, blocked, closed. Any other word the company uses is a gap, not a post. |
| Broadcast TS | anchor |
| Owner | owner |
What it writes
| After | Notion properties |
|---|---|
| post | Broadcast TS (the ts Slack returned), Broadcast Permalink. No ts → no PATCH. |
| gather | Last Status Update (the breadcrumb trail, clipped at 2000 chars with (truncated)) |
| gap / skip | nothing |
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.