- Created by m0rtyn
- 🗓 Last Updated: 17/11/21 08:30:00
- 🌟 Stars on GitHub: 28
- Please consider supporting the creator by Starring or Sponsoring them on GitHub!
- Get Source Code
From their README
Fast note to Notion (Alfred workflow)
This workflow allows you to send quick thoughts to your Notion page via Alfred.
Features
- Can add record to the end of Notion document (setted in config, see setup):
- Notes with plain text
- Checkbox with text (task)
- Checked checkbox with text (done task)
- Can add to the Notion table (setted in config, see setup):
- Row (result) with "due date" field setted to tomorrow
- Russian phonetical shortcuts for actions from above:
- add note — адд ноте
- add task — адд таск
- add result — адд ресулт
Usage
You can add notes and tasks to your notion document/table just from Alfred app!
- Trigger Alfred search (e.g.
option + space
) - Start to write: add ...
- Select one of options: "add note", "add task", "add result", "done task". Or press
enter
for first result row - Type text of note or task
- Press
Enter
. Thats all
Setup
There is a bit of setup required to make this project work as intended.
- Have a Notion account
- Have Alfred 4+ with access to workflows (i.e., powerpack)
- Have Python 3 installed on the system
- Have Notion document for notes
- Your Notion Token
- URLs for Several Notion Object
Install
Get the workflow in Alfred
Create a Blank Workflow and dump the contents of ./alfred
sub-directory into it. If nothing change try to reload Alfred.
Or you can right click on workflow and select Open in Finder
. In opedend window dump contents of this directory and reload Alfred.
And another option is to symlink the repository's sub-directory into the workflow directory (paths will vary in the example depending on where things are located):
ln -s ~/path/to/notion-toolbox/alfred ~/PATH_TO_ALFRED/Alfred.alfredpreferences/workflows/notion-toolbox-alfred
For my case i have this path to Alfred:
~/Library/ApplicationSupport/Alfred/Alfred.alfredpreferences/workflows/notion-toolbox-alfred
Python
There are certain Python dependencies that are required for the scripts to work correctly. You need to navigate to the workflow's directory and execute from your terminal:
python3 -m venv ./
pip3 install -r requirements.txt
Finding your Notion Token
The first thing you'll need to do is get your Notion Token (156 character value) from your browser's cookies.
Depending on what browser you are using this process will vary slightly. The following diagram demonstrates how to find it using Chrome on MacOS.
Finding your Notion URLs
We need to identify the Notion URL of your document with notes.
These are can be acquired by finding the correct resource in your Notion and using the Copy Link found in the context menu (i.e., right click or the left-clicking ...).
Configure Data Files
Given the information we've taken note of in the last 2 sections, we can now configure our data files.
- Find
./data/config.sample.json
, and rename to./data/config.json
. - Fill the value out in ./data/config.json with the Notion Token and Notion URLs:
{
"NOTION_TOKEN": ,
"NOTES_PAGE_URL": ,
"RESULTS_DATABASE_URL": ,
}
Note: I know that this is a rather unconventional approach for configurations with an Alfred workflow, but it is what worked best for me. Later on, I might switch it up to something more conventional.
Acknowledgements
- 👍 Respect for Kevin Jalbert's Notion toolbox
- Thanks to Miloslav for repo's design advices