Automate recurring Notion workflows with a small command-line tool.
notion-toolset connects to the Notion API, reads a YAML config, and runs one focused workflow at a time. Most users should start with a released binary and either run it locally or from GitLab CI.
- Daily journal creation
- Weekly journal creation
- Duplicate page detection
- Flashback resurfacing for older pages
- Page collection into a destination block
- Markdown export and backup of database pages
- LLM-driven summarization or prompt execution on page content
Choose one of these:
- Local run first
- GitLab CI first
In both cases you need the same Notion setup:
- Create a Notion integration by following the official guide.
- Copy the integration token.
- Share the target Notion databases and pages with that integration.
If the integration cannot see a database or page, the command will fail.
This is the fastest way to get a workspace running.
- Create an empty folder for your automation files.
- Download the correct binary for your machine from the GitHub Releases page.
- Create a
configs/folder. - Copy one of the example configs from
example/configs/into your ownconfigs/folder. - Edit the config with your real Notion IDs.
- Set
NOTION_TOKENin your shell. - Run the binary with
--cmdand--config.
PowerShell example:
$env:NOTION_TOKEN="your-secret-token"
.\notion-toolset.exe --cmd=daily-journal --config=.\configs\journal-daily.yamlmacOS/Linux example:
export NOTION_TOKEN="your-secret-token"
./notion-toolset --cmd=daily-journal --config=./configs/journal-daily.yamlIf you want the job to run on a schedule, start with a small GitLab repository that contains only your config files and CI definition.
Recommended folder structure:
your-notion-automation/
.gitlab-ci.yml
configs/
journal-daily.yaml
Setup steps:
- Create an empty GitLab repository.
- Copy a config example from
example/configs/intoconfigs/. - Copy
example/gitlab-ci.ymlinto your repo as.gitlab-ci.yml. - Update the config path, command, and release version in
.gitlab-ci.yml. - Add
NOTION_TOKENin GitLab underSettings>CI/CD>Variables. - Run the pipeline manually once, then add a schedule if needed.
The GitLab example downloads a released Linux binary, so the CI job does not need Go installed.
Use the example that matches the feature you want:
example/configs/journal-daily.yamlexample/configs/journal-weekly.yamlexample/configs/duplicate.yamlexample/configs/flashback.yamlexample/configs/collector.yamlexample/configs/export.yamlexample/configs/llm-summary.ymlexample/configs/llm-summary-json.ymlexample/configs/llm-flashback.yaml
Common values you will need to replace:
databaseID- destination page or block IDs such as
duplicateDumpIDorcollectDumpID - query JSON blocks
- output directory for exports
- prompt text for
llm
If you need a Notion ID, copy it from the page or database URL. The tool expects the 32-character Notion ID.
Each run uses one command plus one config file.
daily-journalweekly-journalduplicateflashbackcollectorexportllm
Example:
./notion-toolset --cmd=export --config=./configs/export.yaml- Empty or unauthorized results usually mean the integration was not shared to the target database or page.
- Startup failures usually mean
NOTION_TOKENis missing. - Export failures can happen when the output directory in the config does not exist yet.
- YAML errors usually mean indentation or quoting is wrong in the config file.
Contributor setup, source builds, and release workflow details are documented in DEVELOPMENT.md.