Copy & paste Notion urls in Slack, GitHub, or any tool supporting markdown urls.
Generates links like ✅ My todo in GitHub issues.
- Install Tampermonkey (browser extension for Chrome, Safari, Edge, Firefox, Opera).
- Go to the extension's
Dashboard>Utilities>Import from URL. Paste this linkhttps://raw.githubusercontent.com/licarth/paste-notion-urls/main/tampermonkey-script.jsand click Install. - Go (or refresh) to a Notion page, click on top-right "Copy Formatted URL" on the top right.
- You can paste your link in Slack with
cmd/ctrl + V - You can paste your links in Markdown format (for GitHub issues) with
maj + cmd/ctrl + V
Note: The script works on both
notion.soandnotion.com.
- Node.js >= 18
- A Notion account (for E2E tests)
npm install
npx playwright install chromiumThe tests use Playwright to inject the Tampermonkey script into a real Notion page running in Chromium and verify it works end-to-end.
npm run save-authA browser window opens. Log into Notion — the script auto-detects when you're authenticated and saves the session to auth/notion.state.json (git-ignored).
You only need to re-run this when your session expires.
npm testThis runs two tests:
- Button injection — verifies the "Copy Formatted URL" button appears in the Notion topbar.
- Clipboard copy — clicks the button and asserts the clipboard contains a well-formed markdown link (
[title](url)).
If Notion changes their site again and the extension breaks:
npm run test:diagnoseThis dumps the current Notion DOM structure to test-results/dom-diagnostics.json, including:
- Which
notion-*CSS classes exist - The topbar element tree
- All share-related buttons and their attributes
Use this output to update the selectors in tampermonkey-script.js.
tampermonkey-script.js # The Tampermonkey userscript
playwright.config.js # Playwright config (Chromium, CSP bypass, auth)
scripts/
save-auth.js # Interactive auth-state saver
tests/
helpers.js # Script injection shims (GM_addStyle, waitForKeyElements)
extension.spec.js # E2E tests
diagnose-dom.spec.js # DOM diagnostic tool
Contributions are welcome. Issues are in this GitHub project.
