I’m working on creating an automated script that can directly access a particular document in my Notion workspace. My current approach involves this code:
tell application "Chrome"
activate
tell window 1
set current tab to (make new tab with properties {URL:"notion://www.notion.so/Daily-Tasks-abc123def456789ghi012jkl345mno678"})
end tell
end tell
The problem is that Chrome always asks for user permission before launching external applications. Is there a way to bypass this authorization prompt? Alternatively, can I trigger the Notion app to open specific pages directly without involving a web browser at all? I’d prefer a solution that doesn’t require manual confirmation each time the script runs.
Yeah, you can’t avoid that Chrome permission dialog with notion:// links. But here’s a workaround that completely eliminates it - use keyboard shortcuts instead. Set up global hotkeys in Notion for your most-used pages, then trigger them with AppleScript. Say you assign Cmd+Shift+1 to your Daily Tasks page in Notion’s preferences. Your script becomes: tell application "Notion" to activate then keystroke "1" using {command down, shift down}. This skips the browser entirely and works without any prompts. You’ll need to set up the shortcuts first in Notion’s settings, but it’s way more reliable than messing with URLs.
You can’t bypass Chrome’s permission dialog - it’s a security feature. But here’s what works better: ditch the notion:// URLs entirely and use regular HTTPS links instead. Format them like https://www.notion.so/your-workspace/page-title-and-id. No external protocol handler needed. Or try using Terminal through AppleScript: do shell script "open 'https://www.notion.so/your-page-url'" - this opens the page in your default browser without any protocol prompts. I’ve had better luck with this approach since it treats everything like a normal web page instead of launching an external app.
maybe consider using the notion app directly instead of chrome. just do: tell application "Notion" to open location "notion://www.notion.so/your-page-url" - it usually skips the prompts. that worked for me!