Automation · Playbook 03
Archive call notes to document store.
Notes taken during calls are saved to the company folder alongside other deal documents, so context is never scattered.
Pure Operations
Reference build
Take a call-notes page written in the notes system (Notion, Granola, Fathom summaries) and drop a clean markdown copy into the company's folder in the document store. This is the curated companion to the transcript archive: the transcript is what was said verbatim, the notes are what the partner decided mattered.
Notes vs transcripts. Transcripts get archived raw, every word, every speaker turn — they're great as a searchable backstop and as LLM context. Notes are the human pass: decisions, follow-ups, conviction, red flags. Both belong in the company folder; they answer different questions.
Flow
01 · Trigger
New call-notes page in notes system (webhook)
Notion 'page created in Call Notes DB' webhook. Fires with the page id.
02 · Fetch notes page + top-level blocks
GET page + children
Returns the page metadata (title, properties) and the array of top-level block ids
03 · Fetch parent page
GET parent — the company page
Convention: every call-notes page lives under its company page. The parent's title is the company name.
04 · Loop top-level blocks
For each block id (limit 500)
Required because synced / linked / nested blocks hide their content one level down
05 · Fetch block children as markdown
GET block_children → markdown
success_on_miss = true so a single missing/empty child doesn't kill the run
06 · Filter empty children
Keep only blocks where markdown exists
Action: continue if markdown iexist — drops empty synced-block stubs
07 · Render full notes page as markdown
Get the notes page itself as a single markdown string
This is what actually gets uploaded; the loop above was just to force the recursive expansion
08 · Sanitize file name
Strip notes-page title to [a-zA-Z0-9 ], collapse whitespace
SharePoint rejects / : * ? \\ < > | in filenames
09 · Find target folder
Search SharePoint drive for '<Company> Notes'
success_on_miss = false. Folder naming convention IS the routing.
10 · Upload notes markdown
Upload .md file into the matched folder
conflictBehavior = rename so re-saved notes don't overwrite prior versions
Fields produced along the way
| Field | What it holds |
|---|---|
| notes_page_id | Notion page id from the webhook payload — the call-notes page itself |
| parent_page_id | Parent of the notes page — by convention this is the company page in our notes workspace |
| child_block_ids | Top-level blocks on the notes page — looped to surface synced / linked content |
| page_markdown | The full notes page rendered as markdown — what actually gets uploaded |
| company_name | Title of the parent (company) Notion page — drives folder lookup |
| clean_title | Notes page title stripped to letters / numbers / single spaces — safe SharePoint file name |
| target_folder_id | ID of the company's '<Company> Notes' folder in SharePoint |
Gotchas
- 01Notes ≠ transcripts: this flow archives the curated human-written summary (decisions, follow-ups, next steps) — not the raw verbatim recording. The transcript automation is the firehose; this is the signal. Run both — the notes are what a partner re-reads, the transcript is what an LLM grep can fall back to.
- 02Parent page = company page (convention is the API): the resolver leans on the notes-workspace convention that every call-notes page is created under its company page. No CRM lookup needed, but the day someone files notes at the wrong level the routing silently misses.
- 03Recursive block fetch: Notion's API returns only top-level blocks by default — toggles, columns, and synced blocks hide children one level down. Loop the top-level block ids and fetch each block's children, otherwise the markdown export drops half the page.
- 04Filter out empty children: the loop produces a row for every block id, but synced/linked blocks often resolve to empty markdown. Pass only rows where markdown exists (iexist) before the upload step.
- 05Markdown, not HTML: SharePoint accepts both, but markdown round-trips cleanly back into Notion, Obsidian, or an LLM context window. Upload .md so the archive stays editable.
- 06Filename sanitization: SharePoint silently rejects / \ : * ? " < > | and trims trailing dots. Strip to [a-zA-Z0-9 ]+ and collapse whitespace.
- 07No-folder = no upload: the SharePoint folder search is success_on_miss = false. If the '<Company> Notes' folder doesn't exist yet, the run halts rather than dumping into the wrong company. Pair with the folder-scaffold automation so new companies auto-provision their Notes folder.
- 08conflictBehavior = rename: same call gets re-saved? SharePoint appends a numeric suffix instead of overwriting — the archive stays append-only.