Skip to main content
Notion Workers are small Node/TypeScript programs that extend Notion. You write code, deploy it with the Notion CLI, and Notion hosts and runs it for you. No servers to manage. With Workers, you can:
  • Sync external data into Notion databases on a schedule.
  • Give Notion AI new tools that your Custom Agents can call.
  • Receive webhooks from external services like GitHub, Stripe, or Zendesk.
Workers are designed to be built with AI coding agents. Scaffold a project, describe what you want, and deploy.

What you can build

Sync data

Pull data from Salesforce, Stripe, GitHub, or any API into Notion databases — kept in sync automatically.

Agent tools

Give Notion Custom Agents functions like “create a Jira ticket” or “look up a customer in our CRM.”

Webhooks

Receive HTTP events from GitHub pushes, Stripe payments, or any service that sends webhooks.

How it works

A worker is a single TypeScript file that exports a Worker instance. You register capabilities on it (syncs, tools, webhooks) and deploy with ntn workers deploy:
src/index.ts
Once deployed, Notion takes over:
  • Syncs run on a schedule (default every 30 minutes) and write results to Notion databases.
  • Tools appear in Notion Custom Agents and are called by Custom Agents on demand.
  • Webhooks receive HTTP events from external services and run your handler asynchronously.
Your code runs in a sandboxed Node.js environment. You can make HTTP requests to external APIs, use secrets stored via the CLI, and authenticate with third-party services through OAuth.

Typical workflow

1

Scaffold a project

This creates a new directory with a src/index.ts starter file, TypeScript config, and dependencies.
2

Write your capabilities

Add syncs, tools, or webhooks to src/index.ts. Use an AI coding agent to help. The template includes prompts and skills, like the /sync skill.
3

Deploy

The CLI bundles your code, uploads it to Notion, and starts running your capabilities.
4

Iterate

Edit your code and redeploy.

Next steps

Quickstart

Create and deploy your first worker in less than five minutes.

CLI reference

Install and configure the Notion CLI.

Limits

Rate limits for runs, webhooks, and sync database writes.