Supercharge your All-in-One workspace with the Command Palette within Notion 🕹️
Notion Palette is a free and open source extension, you can create commands and execute scripts within Notion. Such as take a quick note, change page's icon and title, sync your schedule and anything else you can imagine.
Firstly, clone this repo or download the code from website of GitHub, by clicking the green Code button and then click Download ZIP, or just click the link here to download it.
git clone https://github.com/ruter/notion-palette.git
Then, follow the instruction of Load an unpacked extension or below to load Notion Palette extension:
-
If it's ZIP file, extract the contents somewhere
-
In Chrome or any other Chromium browser like Edge and Brave, navigate to
chrome://extensions
-
Toggle on the Developer mode and click Load Unpacked
-
Navigate to the local folder containing the extension’s code and click OK
-
Assuming there are no errors, the extension should load into your browser
Done! You can start to use Notion Palette now 🎉
Press Alt
+ P
(Option
+ P
for macOS) to open the Command Palette, then you can search, select and execute commands.
All operations are done within the Command Palette, so you can use it anywhere in the Notion, there are some shortcuts you can use while you are open the Command Palette.
Shortcut | Action |
---|---|
Alt/Option + P |
Open Notion Palette |
Shift + Enter |
Edit the selected command |
Shift + Backspace |
Delete the selected command |
Enter |
Execute the selected command |
getEnv(key)
Parameter | Type | Description |
---|---|---|
key |
string |
Required. The key of the environment variable |
After called this function, it will return a Promise
object, you might like to use it like
(async () => {
const token = await getEnv('API_TOKEN');
console.log(token);
// do some stuff here...
})();
getCurrentPageId()
Return current page's ID. If any page opened in database with Side peek or Center peek view, this function will return the opened page's ID, otherwise it will return the database page's ID.
copyText(text);
Parameter | Type | Description |
---|---|---|
text |
string |
The text content write to clipboard |
Store text content to the clipboard.
showToast(content)
Parameter | Type | Description |
---|---|---|
content |
string |
Required. The message you want to display |
This function will display a Toast at the page's bottom.
- Add
showDialog()
API - Import command via gist
- Add more API
Contributions are always welcome!
Please feel free to open an issue or create a pull request.
Please adhere to this project's code of conduct.
- Sval - A JavaScript interpreter.
- Flaticon.com - This project using resources from Flaticon.com