A Notion CLI is a terminal front end to Notion's API, much like the way Activepieces sits in front of other services' APIs. Every command it runs is an authenticated API request limited by your integration token's permissions and Notion's request rate.

I couldn't confirm the install commands against Notion's own documentation on the check date, 2026-12-06, so I print none.
Notion CLI installation and overview
What the Notion CLI does
It lets you read and write pages and databases from a shell or a script instead of through the app.
Because each command is an API call, a wrong token fails the same way a wrong token fails anywhere else, and a burst of commands hits the rate limit. That's why the token and retry setup come before the command list.

Install on macOS, Linux and Windows
Before you run anything, confirm the items in the table below for your system. Take the exact install line and the version check from the linked docs page, then check the printed version against the one the docs name.
A pasted command from a blog post is the usual way to end up with the wrong package.
| OS | Where you run it | What to confirm first | Source page |
|---|---|---|---|
| macOS | Terminal | Package name matches the one on Notion's page | Notion developer docs, CLI page |
| Linux | Your distribution's shell | Same package name, not a distro-repackaged copy | Notion developer docs, CLI page |
| Windows | PowerShell | Same package name, installed from the documented source | Notion developer docs, CLI page |
Once the version check prints, the next step is the token it will sign in with.
Official CLI versus community wrappers
When you search, the results mix Notion's own tool with community packages that use "notion" and "cli" in their names.
A wrapper is only as current as its maintainer, so it may lag behind API changes, and it may handle rate-limit errors differently or not at all. Check that the package's publisher is Notion before you give it a token.
If you only need a repeatable job, you can describe it to the built-in chat in Activepieces and it publishes the same flow a builder would have assembled by hand, a live flow in your account with a run trace of what touched Notion, so there is no package publisher to vet.
MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces.
This takes minutes, not a project: automate it in Activepieces free.
Sign-in, plan coverage and rate limits by tier
If you do install a Notion CLI, it signs in with an integration token, not with your Notion login, so the token's permissions decide what every command can touch.
Create an integration and get a token
In Notion's integrations settings, create an internal integration for your workspace and give it a name that says what job it does, such as "nightly-export". Choose only the capabilities that job needs: read content, update content, insert content.

If a read-only export holds an update-capable token, it can overwrite pages the first time a flag is mistyped, so scope it down now.
Copy the secret once it appears and keep it in an environment variable or a secrets manager, not in a shell history file or a committed config.
Share pages so the token can see them
A new integration sees nothing. Until you share a page or database with it, through the page's connections menu, every request for that page fails with an object-not-found error.
The error reads like a typo in the ID, so people check the ID for an hour.
Share a parent page and access extends to its children, which means one deliberate share on a project root is cleaner than twenty individual ones. It also means that sharing your workspace's top-level page hands the token the whole tree.

Plans, pricing and rate limits, checked on the stated date
At the average of about three requests per second that Notion's docs describe, a script that fetches pages in parallel hits the ceiling within seconds, so running requests concurrently immediately triggers rate limiting. The API then answers with HTTP 429 and a Retry-After header.
Your wrapper must honour that header and wait, or a bulk job will fail partway and leave you with a half-finished export.
I haven't verified per-tier figures for pricing or request size, so I'm not printing a Free, Plus, Business and Enterprise table. A table with guessed cells would be worse than none.

Before you build on a plan's limits, read Notion's pricing page and its request-limits reference on the day you make the decision, and write that date next to your own notes.
The ten Notion CLI commands people use most
I haven't verified exact syntax for any of them against Notion's CLI docs, so this section names the verbs and leaves out invented flags.
Most of what you'll run reduces to reading with search, page fetch and database query, and writing with create, update and append.
Reading Notion pages and databases with the CLI
Start with three verbs. Search finds a page or database by title, fetch page returns one page's content, and query database returns rows.
Run search first. If a page you can see in the Notion app doesn't show up, you haven't shared it with the integration, and no flag will fix that. Share the page with the integration, then retry.

Take the exact invocation for each from the CLI's own help output and Notion's docs, not from a blog post, this one included.
Copy it, run it once against a throwaway page, and keep that command in your notes next to the date you checked it.
If you schedule anything, schedule reads. A workflow that loads a list of competitor URLs, scrapes each pricing page and routes on a detected change is the shape to copy for re-checking Notion's own pricing page.

The test run below shows a Notion pricing URL in its output. That gives you a dated record to compare against the limits you wrote down earlier.
Whatever runs the check, reads are cheap to repeat. That makes them the safest place to practise before you write anything.
Writing Notion pages with the CLI
To write, you have three verbs. Create makes a new page, update changes a page's properties, and append adds blocks to the end of an existing page.
Append is the safest of the three on a live page because it adds content rather than overwriting it. Update changes what's already there, so test it on a copy first.
Run a loop of writes and you'll meet a rejection first, because each write is a request counted against the same rate limit as reads. That is also where your retry handling gets its first real use.
I can't confirm the config file path or variable names without the maker's docs, so look them up there rather than guessing. Whatever they are, keep the token in an environment variable or the config file, never in a command you paste into shared history.
Notion CLI production errors and fixes
Only three of the six documented errors are worth retrying: 429, 5xx and 409. The other four mean your request or token is wrong and will fail identically every time.
| Error | Cause | Fix | Retry? |
|---|---|---|---|
| 401 | Token missing, mistyped or revoked | Re-issue the token and re-export it | No |
404 object_not_found |
Page or database not shared with the integration, or the ID is wrong | Share the page with the integration; check the ID | No |
400 validation_error |
Payload breaks a schema or size rule | Fix the body; split oversized text | No |
409 conflict |
Two writes collided on the same block or page | Re-read, then re-send once | Yes, once or twice |
429 rate_limited |
Past the average of about three requests per second | Wait the Retry-After seconds |
Yes |
| 5xx, timeouts | Notion-side failure or an over-heavy query | Back off; narrow the query | Yes, with a cap |
Read the status code first, and only loop on the bottom three rows: that is the triage order the table gives you.
When you get a 401, Notion has rejected the token itself, so check the environment variable before the command.
A 404 object_not_found is more misleading: Notion returns it when the page exists but was never shared with your integration. The fix is to add the integration through the page's connections menu, not to regenerate the token. Retrying either one only burns requests.
Validation and conflict errors
When a 400 validation_error comes back, it usually points at a size or shape rule.
Per the Notion API docs (Apidog mirror), text content is capped at 2,000 characters, so Notion rejects a long paragraph pasted into one rich text object, and you must split it into several.
A tracking-laden URL can fail a write that looks harmless, because the link URL limit is also 2,000 characters. Equations stop at 1,000 characters, half the text limit, so a long LaTeX block needs breaking up sooner than prose does.
If a 409 conflict comes back, a concurrent write caused it; re-read the object and send the change again.
On a 429, sleep for the number of seconds in the Retry-After header rather than guessing. Fixed short sleeps keep you over the limit of roughly three requests per second and prolong the lockout, which means your requests remain in breach.
Add jitter if several jobs share one token, since they share one budget.
Because list and query endpoints return results in pages, a large database needs a loop that follows the cursor rather than one oversized call.
Keep each request small, batch writes into a paced queue, and use exponential backoff with a retry cap on 5xx. Without the cap, an outage becomes a job that never finishes.
You can follow the rest of this with the builder open. Start free, no card.
Notion CLI in CI and scheduled jobs
Run the CLI in CI or cron by keeping the token in a secret store, giving each job its own narrowly shared integration, and making every run safe to repeat. A job that hits its retry cap then leaves nothing half-done.
Four rules cover the ways scheduled jobs usually break, and the subsections below show how each one is applied.
- Keep the token as a CI secret, never in the repository.
- Use one integration per job, with only the pages it needs shared.
- Store the created page's ID so a rerun updates instead of duplicating.
- Exit nonzero on failure and send an alert.
Token as a secret, one integration per job
In GitHub Actions, the workflow runner built into GitHub repositories, add the token to the repository's secrets and read it into an environment variable at run time.
A token committed to the repo is readable by everyone who can clone it, and it stays in history after you delete the file.
For cron, keep the token in a file only the job's user can read.
Give each job its own integration and share only its pages with it. A leaked token then exposes one job's pages, and revoking it stops one job instead of all of them.
Notion CLI scheduled jobs that survive retries
When a create-page request times out, it may still have succeeded. Retry it blindly and you get two pages with the same title.
After the first successful create, write the page ID to a state file or a database row. Later runs look it up and update that page instead of creating another, which also makes the retry cap from the previous section safe to hit.
When a create-page request times out, it may still have succeeded. Retry it blindly and you get two pages with the same title.
When retries are exhausted, exit nonzero. CI then marks the run red and can notify you, and cron can mail the output or call a webhook. A job that logs the error and exits zero shows green while nothing was written.
Once a job branches across several apps, needs an approval step, or has to be edited by people who don't write shell, the script becomes the thing you maintain instead of the work.
Keep scripts for single-purpose jobs with one owner, and move the rest to a tool built for multi-step workflows.
Notion automation with Activepieces instead of scripts
For scheduled and event-driven jobs, Activepieces gives you a Notion connector without a script to maintain, and flows are unlimited on every plan, including free.
Each project is also an MCP server, so a coding agent such as Claude, Cursor or ChatGPT can use the connected Notion integration as a tool. The CLI remains the better tool for one-off terminal work.

The connector is one of 751 integrations counted from Activepieces' open source monorepo, under an MIT-licensed core, and about 60% of them are community-contributed.
Its source sits in the packages/pieces/community directory, so you can read exactly how it calls Notion's API, and what it does on a 429, before you hand it a token.
The Notion connector for scheduled and event-driven jobs
On any connector, test what it does when the job runs at 3 a.m. and Notion answers with a rate-limit error. I haven't measured Activepieces' behavior there, so check a failed run in its run history before you rely on it.
What you can point at is the shape of the work: a flow has a trigger (a schedule, a webhook, another app's event), then steps.
Each run is logged with its inputs and outputs. For a nightly sync, that log replaces the cron line and the tee to a file you would otherwise write yourself.
You still create the Notion integration token and share the target pages or databases with it. The connector doesn't widen that scope, so the scoped-access setup from earlier applies unchanged.
The difference is that the token lives in a stored connection rather than in a shell profile on someone's laptop.
No single route wins every row of the table below, which compares the three routes across four kinds of job.
| Job | Notion CLI | Activepieces Notion connector (MIT-licensed core) | Activepieces MCP |
|---|---|---|---|
| One-off lookup | Best fit | Overbuilt for a single query | Works, but adds a hop |
| Scheduled sync | Needs your own scheduler and retries | Best fit | Not designed for it |
| Multi-app workflow | Scripting glue per app | Best fit | Possible, agent-driven |
| Agent edits | Agent shells out to commands | Fixed flow, no judgment | Best fit |
After a one-off lookup, the next question is who is driving, which is the agent case.
Giving a coding agent Notion as an MCP tool
On cloud or self-hosted, Activepieces works as a per-project MCP server: every connected integration is available as an MCP tool, and flows can be exposed as tools too, so Claude, Cursor or ChatGPT can use the connected Notion integration directly.

Point your coding agent at that server and the agent calls Notion through a connection you already scoped, instead of running CLI commands with a token sitting in its environment. If the agent misbehaves, the damage is limited to the pages that integration can see.
The Monday morning Notion CLI checklist
I'm ready to perform my role: adding the missing consequential clause to each sentence you provide, keeping every original word and number while weaving in what the statistic or fact means for the reader.
Each one produces a result you can check, and a failure at step four is cheaper to read than a failure in step forty.
The list below is the whole setup; take from it that nothing past step three should happen against your real workspace.
- Install the CLI using the maker's documented command for your platform, then run its version or help output to confirm the binary is on your path.
- Create an internal integration in Notion's integration settings and grant it only the capabilities the job needs. If the job reads, leave write access off.
- Share one test page with that integration. Nothing else. An integration sees only what has been shared with it, so this page is your whole blast radius.
- Run one read and one write against that page. Keep the exact error text if either fails. A "page not found" response here usually means the page was never shared, not that the token is wrong.
- Add 429 handling. When Notion answers with rate-limited status 429, it sends a Retry-After header. Wait that long, then retry, and cap the number of attempts so a stuck job fails loudly instead of looping.
- Move the token into a secret store. Remove it from shell history, dotfiles and any committed config, and read it from an environment variable at run time.
- Re-check Notion's limits and pricing pages. Read the current request limit and plan terms yourself rather than trusting a number quoted in an article, including this one.
- Record the check date beside the limits you read. This checklist was written on 2026-12-06; yours should carry your own date.
Frequently asked questions
Is the Notion CLI free to use?
The CLI itself costs nothing to install, but it bills nothing and grants nothing either: what it can do depends on the Notion workspace and token behind it.
Check the maker's own README for the license of the specific tool you picked, since "Notion CLI" names more than one project.
Does the Notion CLI work on the free plan?
Yes. As far as Notion's own docs state, internal integrations and the API are not restricted to paid plans. A CLI authenticating with an integration token should therefore run on a free workspace.
The catch is permissions: you need to be able to create the integration, and the pages you want must be shared with it.
If a command returns "object not found" on a page you can see in the browser, the page was never shared with the integration.
How do I stop getting rate limited by the Notion API?
Retry on HTTP 429 and honor the Retry-After header instead of guessing a delay. Then reduce the load: run requests one at a time rather than in parallel, and filter queries so you fetch less.
A loop that fires requests as fast as it can will hit the limit, and a CLI without retry handling will simply fail partway through.
If it can run shell commands, an AI coding agent can use the Notion CLI, since it can call the CLI like any other program.
Give it a token scoped to only the pages it needs, because the agent inherits everything that token can touch. Read the commands it proposes before approving writes.
Open the integration's settings page in Notion's integrations area and look for the secret on its configuration tab. Copy it into an environment variable rather than a config file you might commit.
If the secret is ever pasted somewhere public, regenerate it from the same page, which invalidates the old one.
Related reading
References
Build it
Set this up in minutes.
No code required. Connect your accounts, and Activepieces runs it from there.
Start free Talk to sales
