Notion Workers are small TypeScript programs hosted by Notion that add tools to Notion custom agents, sync external data into databases, and receive webhooks. These are the workers I use in my personal workspace.
| Worker | What it does |
|---|---|
twitter |
Syncs Twitter bookmarks |
readwise |
Saves links to Readwise Reader to read or watch later |
firecrawl |
Fetches web pages as markdown or screenshots via Firecrawl |
openlibrary |
Looks up book cover image URLs by ISBN from OpenLibrary |
pebble-index |
Turns Pebble Index 01 ring voice notes into database pages via webhook |
Feel free to copy any worker into your own setup. The easiest way is to paste this prompt into your coding agent:
List the workers in https://github.com/colebemis/notion-workers and ask me
which ones I want. Copy those directories here and set them up as my own
Notion Workers: delete each workers.json (it points at the author's
workspace — my first deploy creates my own), help me install the ntn CLI
and run `ntn login` if I haven't, set the env vars listed in each
worker's README, then deploy each with `ntn workers deploy --name <name>`
and run one test call to verify.
Or by hand:
- Copy the worker's directory.
- Delete
workers.json(it points at my workspace). ntn login, add any required secrets (see the worker's README), thenntn workers deploy --name <name>.
Everything below is how I develop the workers in this repo.
curl -fsSL https://ntn.dev | bash # install the ntn CLI
ntn login # authenticate with your Notion workspaceRequires Node ≥ 22.
Everything happens inside the worker's directory:
cd openlibrary
npm install # first time only
npm run check # type-checkTest a capability locally — this runs your code on your machine, auto-loading the worker's .env:
ntn workers exec getBookCover --local -d '{"isbn": "9780140328721", "size": null}'Deploy (builds in the cloud and updates the worker that workers.json points at):
ntn workers deployThen verify the deployed version by dropping --local:
ntn workers exec getBookCover -d '{"isbn": "9780140328721", "size": null}'Debugging a deployed worker:
ntn workers runs list # recent runs
ntn workers runs logs <runId> # logs for a run./new-worker.sh my-workerThis runs ntn workers new and then deletes the boilerplate that already lives at the repo root (agent docs, LICENSE, ignore files), leaving a minimal project. Then:
-
Implement capabilities in
my-worker/src/index.ts(see .agents/INSTRUCTIONS.md for the capability API). -
Write a short
README.mdfor the worker. -
First deploy creates the worker and writes
workers.json:cd my-worker ntn workers deploy --name my-worker -
Commit everything, including
workers.json.
To use a tool from a Notion custom agent, add it in the agent's tool settings in Notion.
Secrets live in two places, never in git:
- Locally: a
.envfile in the worker's directory (gitignored), used byntn workers exec --local. - Deployed: worker env vars, managed with the CLI:
cd <worker>
ntn workers env set MY_API_KEY=abc123 # set on the deployed worker
ntn workers env push # or push the whole local .env
ntn workers env pull # write remote vars into local .env
ntn workers env listPush secrets before deploying code that needs them.
workers.jsonis committed. The official scaffold gitignores it, but it only contains IDs (workspace + worker), not secrets. It's what ties each directory to my deployed worker — I commit it so that when I clone this repo on another machine,ntn workers deployupdates the existing worker instead of creating a new one. If you're copying a worker into your own setup, delete it and let your first deploy create your own (see Using these workers yourself).- One worker per directory, fully self-contained. Duplication between workers is fine; simplicity beats sharing.
.agents/holds the official platform guide and skills from thentnscaffold, shared once at the repo root;.examples/holds the scaffold's reference example for each capability type. Both are refreshed automatically bynew-worker.sh.AGENTS.md(and theCLAUDE.mdsymlink) document the repo conventions for AI agents — this repo is built to be worked on with Claude Code / Codex.
- Workers documentation
- Platform guide + capability API (from the official scaffold)
ntn workers --help