Notion Palette

License language GitHub issues GitHub Repo stars


Notion Palette

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.

Screenshot

Installation

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:

  1. If it’s ZIP file, extract the contents somewhere

  2. In Chrome or any other Chromium browser like Edge and Brave, navigate to chrome://extensions

  3. Toggle on the Developer mode and click Load Unpacked

  4. Navigate to the local folder containing the extension’s code and click OK

  5. Assuming there are no errors, the extension should load into your browser

Done! You can start to use Notion Palette now 🎉

Usage

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.

Keyboard Shortcuts

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

API Reference

Get environment variables

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...
})();

Display a Toast

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.

Roadmap

  • Add showDialog() API
  • Import command via gist
  • Add more API

Contributing

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.

Attribution

  • Sval – A JavaScript interpreter.
  • Flaticon.com – This project using resources from Flaticon.com

GitHub

View Github