Archive curated articles into the right company folder.
Every article (or YouTube transcript) saved to the firm's article database lands as a file in the matching company's document folder — routed by an LLM against the live list of company folders, with no keyword maps to maintain.
Reference build
Someone on the team saves an article — a piece of research, a competitor announcement, a YouTube interview with a founder. A row lands in the firm's article database. A few seconds later the article (or, for YouTube, the full transcript) is sitting as a file inside the right company folder in the document store, ready to be picked up by every downstream workflow that reads from those folders.
The article database in Module 5 of the Thematic Work playbook is the contract this automation runs against — it doesn't listen to Reader, Slack, or browser extensions directly. They all funnel into the database first, and this Zap fires off the database row.
Fields the workflow reads
| Field | What it holds |
|---|---|
| Title | Article title. Drives the filename in SharePoint and the prompt context for the folder picker. |
| URL | Source URL. Used by the branch step (`icontains youtube`) and embedded into the file body. |
| Body / Notes | Whatever the user captured at save time — clipped article text, summary, personal note. Becomes the file contents for non-YouTube items. |
| Transcript | Populated only on the YouTube path. Apify pulls the captions, JS flattens them into a single text block, the result is appended to the Notion page AND used as the file body. |
| Company (derived) | Not a DB field — derived at runtime by Claude from the title + URL + the firm's known company-folder list. This is the routing key. |
Why this collapsed two automations into one
There used to be two Zaps here — one that filed an article into a specific company folder when there was a clear match, and a sibling that dumped articles into a general document store when there wasn't. They shared the same trigger, same body-shaping logic, and same SharePoint upload step.
They're now one workflow. The AI folder picker IS the routing. When it returns a known company, the file lands in that company's folder. When it returns 'none' (or the SharePoint search misses), the upload step is skipped and the article stays in the database — which is the right behaviour: the DB is the durable record, SharePoint is the projection.
Gotchas
- 01The article database is the contract. This Zap doesn't accept arbitrary inputs — it only fires when a row lands in the firm's article DB. Anything that gets a row in (Reader save → DB, browser extension, Slack /save command, manual paste) flows through here for free. Anything that doesn't land in the DB is invisible to the workflow.
- 02YouTube needs a transcript fetch; everything else doesn't. The branch on `URL icontains youtube` is the whole reason this Zap has two paths. The youtube path adds: transcript-actor run, a delay (because run-sync isn't reliably synchronous), a dataset fetch, and a JS step to flatten the transcript chunks into one body. Articles go straight to the AI folder picker.
- 03Apify run-sync still needs a delay step after it. The actor can return before the dataset is materialized; the delay is a small price for not having to poll.
- 04Transcript is also written back into the Notion page. So the database row becomes the canonical, searchable copy of the transcript — useful for memo generation later. SharePoint gets the same content as a file so it lives in the company folder alongside other artifacts.
- 05The LLM picks the company folder by name match against a known list, not by free-form judgement. The Anthropic step is given the firm's roster of company folder names as context; its job is to pick the closest match or say 'none'. Keeping the prompt narrow is what makes this reliable — the model is a classifier, not an analyst.
- 06Two LLM calls + two SharePoint lookups, one per branch. Both paths run the same 'pick folder → find folder → upload' tail. They're duplicated rather than merged because Zapier paths don't rejoin — keep them in sync when you change one.
- 07Single SharePoint site / drive. Both branches write to the same site + drive; the only variable is the directory (the company folder). If you fan out to multiple sites, the folder picker needs to return a {site, drive, folder} tuple.
- 08Filename collisions are handled by the upload action's conflict behavior. Default is replace/version — fine for re-saves of the same article, less fine if two different articles share a title. Title-suffix with the date or domain if collisions matter.
- 09No company folder match = no file. If the LLM returns 'none' or the SharePoint search misses, the upload step is skipped and the article still lives in the DB. That's the right failure mode: the DB row is the source of truth, SharePoint is the projection.
- 10This is why the 'specific company folder' and 'general document store' automations collapsed into one. Earlier versions had a separate Zap that uploaded to a generic SharePoint folder when no company matched. We folded that into this Zap — the AI folder picker IS the routing, and 'no match' is the general-store case in disguise.