Repository navigation
Troubleshooting
Start with:
notion-md-sync verify
notion-md-sync <command> --verboseThe settings weren't found. Check that:
-
NOTION_MD_SYNC_NOTION_TOKENandNOTION_MD_SYNC_NOTION_PARENT_PAGE_IDare set, or a.envwith them is in the current folder,~/.notion-md-sync/, or up to three folders above. - Your
config.yamlis somewhere the tool looks:./config.yaml,./configs/config.yamlor~/.notion-md-sync/config.yaml. Anywhere else, pass-c path/to/config.yaml. The repo'sconfig/folder is not searched.
See Configuration.
init reads answers from the terminal, so it fails when stdin isn't interactive (CI, scripts, some IDE consoles). It also ignores NOTION_MD_SYNC_NOTION_TOKEN and always asks for the token. In those cases, write config.yaml and .env by hand (Configuration).
- Share the parent page with your integration (
•••→ Connections). - Check the page ID: it's the 32-character hex string at the end of the page URL.
- Check that the token is current. Tokens start with
ntn_, orsecret_for older ones.
push takes zero or one file. For several files:
notion-md-sync add a.md b.md c.md
notion-md-sync pushOr push everything under the root with notion-md-sync sync push.
- Its frontmatter may have
sync_enabled: false. - It may match
excluded_patterns, sit in a hidden folder, or be outsidemarkdown_root. -
pushwith no argument only pushes staged files. Checknotion-md-sync status.
Text between <!-- notion:TYPE ID begin --> and <!-- notion:end ... --> is a read-only copy of a block Markdown can't express. Edit that block in Notion. See Directory Layout and Kept Blocks.
You changed title in the frontmatter, and someone also edited the page in Notion. Pull first, then change the title again.
Databases are exported on pull only. See Databases.
- The integration needs access to every sub-page. Pages that were shared separately, or moved in from elsewhere, may not inherit access.
- Run with
--verboseto see which pages were found.
Commands stop after --timeout (default 30m). Raise it for very large workspaces:
notion-md-sync pull --timeout 2hWhat happens depends on sync.conflict_resolution. With diff (the default), or with newer when a timestamp is missing, you're shown both versions and asked to choose. That needs an interactive terminal. In scripts, set notion_wins or markdown_wins instead.
-
notion-md-sync --helpandnotion-md-sync <command> --help - Issues
- Discussions