[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92499":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":26,"discoverSource":27},92499,"notion-workers","colebemis\u002Fnotion-workers","colebemis","My Notion Workers","",null,"TypeScript",108,5,2,0,9,43.23,"MIT License",false,"main",true,[],"2026-07-22 04:02:06","# notion-workers\n\n[Notion Workers](https:\u002F\u002Fdevelopers.notion.com\u002Fworkers\u002Fget-started\u002Foverview) 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.\n\n## Workers\n\n| Worker | What it does |\n| :-- | :-- |\n| [`twitter`](twitter\u002F) | Syncs Twitter bookmarks |\n| [`readwise`](readwise\u002F) | Saves links to Readwise Reader to read or watch later |\n| [`firecrawl`](firecrawl\u002F) | Fetches web pages as markdown or screenshots via Firecrawl |\n| [`openlibrary`](openlibrary\u002F) | Looks up book cover image URLs by ISBN from OpenLibrary |\n| [`pebble-index`](pebble-index\u002F) | Turns Pebble Index 01 ring voice notes into database pages via webhook |\n\n## Using these workers yourself\n\nFeel free to copy any worker into your own setup. The easiest way is to paste this prompt into your coding agent:\n\n```text\nList the workers in https:\u002F\u002Fgithub.com\u002Fcolebemis\u002Fnotion-workers and ask me\nwhich ones I want. Copy those directories here and set them up as my own\nNotion Workers: delete each workers.json (it points at the author's\nworkspace — my first deploy creates my own), help me install the ntn CLI\nand run `ntn login` if I haven't, set the env vars listed in each\nworker's README, then deploy each with `ntn workers deploy --name \u003Cname>`\nand run one test call to verify.\n```\n\nOr by hand:\n\n1. Copy the worker's directory.\n2. Delete `workers.json` (it points at my workspace).\n3. `ntn login`, add any required secrets (see the worker's README), then `ntn workers deploy --name \u003Cname>`.\n\nEverything below is how I develop the workers in this repo.\n\n## Setup (once per machine)\n\n```shell\ncurl -fsSL https:\u002F\u002Fntn.dev | bash   # install the ntn CLI\nntn login                           # authenticate with your Notion workspace\n```\n\nRequires Node ≥ 22.\n\n## Development workflow\n\nEverything happens inside the worker's directory:\n\n```shell\ncd openlibrary\nnpm install                # first time only\nnpm run check              # type-check\n```\n\nTest a capability locally — this runs your code on your machine, auto-loading the worker's `.env`:\n\n```shell\nntn workers exec getBookCover --local -d '{\"isbn\": \"9780140328721\", \"size\": null}'\n```\n\nDeploy (builds in the cloud and updates the worker that `workers.json` points at):\n\n```shell\nntn workers deploy\n```\n\nThen verify the deployed version by dropping `--local`:\n\n```shell\nntn workers exec getBookCover -d '{\"isbn\": \"9780140328721\", \"size\": null}'\n```\n\nDebugging a deployed worker:\n\n```shell\nntn workers runs list            # recent runs\nntn workers runs logs \u003CrunId>    # logs for a run\n```\n\n## Adding a new worker\n\n```shell\n.\u002Fnew-worker.sh my-worker\n```\n\nThis 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:\n\n1. Implement capabilities in `my-worker\u002Fsrc\u002Findex.ts` (see [.agents\u002FINSTRUCTIONS.md](.agents\u002FINSTRUCTIONS.md) for the capability API).\n2. Write a short `README.md` for the worker.\n3. First deploy creates the worker and writes `workers.json`:\n\n   ```shell\n   cd my-worker\n   ntn workers deploy --name my-worker\n   ```\n\n4. Commit everything, **including `workers.json`**.\n\nTo use a tool from a Notion custom agent, add it in the agent's tool settings in Notion.\n\n## Secrets\n\nSecrets live in two places, never in git:\n\n- **Locally:** a `.env` file in the worker's directory (gitignored), used by `ntn workers exec --local`.\n- **Deployed:** worker env vars, managed with the CLI:\n\n```shell\ncd \u003Cworker>\nntn workers env set MY_API_KEY=abc123   # set on the deployed worker\nntn workers env push                    # or push the whole local .env\nntn workers env pull                    # write remote vars into local .env\nntn workers env list\n```\n\nPush secrets *before* deploying code that needs them.\n\n## Conventions\n\n- `workers.json` is 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 deploy` updates 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](#using-these-workers-yourself)).\n- One worker per directory, fully self-contained. Duplication between workers is fine; simplicity beats sharing.\n- `.agents\u002F` holds the official platform guide and skills from the `ntn` scaffold, shared once at the repo root; `.examples\u002F` holds the scaffold's reference example for each capability type. Both are refreshed automatically by `new-worker.sh`. `AGENTS.md` (and the `CLAUDE.md` symlink) document the repo conventions for AI agents — this repo is built to be worked on with Claude Code \u002F Codex.\n\n## Reference\n\n- [Workers documentation](https:\u002F\u002Fdevelopers.notion.com\u002Fworkers\u002Fget-started\u002Foverview)\n- [Platform guide + capability API](.agents\u002FINSTRUCTIONS.md) (from the official scaffold)\n- `ntn workers --help`\n","Notion Workers 是一套基于 TypeScript 的轻量级服务端程序，用于扩展 Notion 自定义智能体能力、同步外部数据至 Notion 数据库，并响应 Webhook 事件。项目包含多个开箱即用的 Worker 示例，如 Twitter 书签同步、Readwise 链接保存、Firecrawl 网页抓取、OpenLibrary 图书封面查询及 Pebble Index 语音笔记转数据库等，均通过 Notion 官方 ntn CLI 部署与管理。适用于个人知识管理（PKM）、自动化数据采集与跨平台信息聚合等低代码集成场景。","2026-07-09 02:30:09","CREATED_QUERY"]