Python App that Gets ISBN numbers from Notion and populates book data using the Google Books API
Duplicate the Notion Books_Template
This repository helps in managing ISBNs with Notion. Follow the instructions below to clone the repository and install it via Docker CLI or using docker-compose
.
If you'd like to receive notifications when new books are processed or error details pushed to your mobile device, Pushbullet is supported.
In the docker-compose.yaml
file - configure USE_PUSHBULLET=yes
and enter your Token in the line provided.
Removed support for Pushover in v1 release May add this back in a future update, but the original library was out of day and not supported in current versions of Python.
If you want the app to generate banner style Notion Page Covers like the image above, you'll need to have an AWS S3 bucket. This will allow the app to upload and store the images in a location where Notion can import them.
In the docker-compose.yaml
file - configure USE_AWS=yes
and enter your Access and Secret Keys in the lines provided.
First, you need to clone this repository to your local machine.
git clone https://github.com/allaboutduncan/notion-isbn.git
cd notion-isbn
For the app to run, you must edit the docker-compose.yaml
fle and configure the following environment variables with the appropriate values.
- USE_AWS=yes/no
- AWS_ACCESS_KEY_ID=ENTER-YOUR-ACCESS-KEY-HERE
- AWS_SECRET_ACCESS_KEY=ENTER-YOUR-SECRET-KEY-HERE
- AWS_BUCKET=bucket-name
- NOTION_TOKEN=notion_secret
- NOTION_DATABASE_ID=notion-database-id
- GoogleAPIKey=Google-Books-API-Key
- USE_PUSHBULLET=yes/no
- PB_TOKEN=pushbullet_access_token
Use docker-compose
to install to load the variables in the yaml file needed to run the app:
-
Ensure you have Docker Compose installed:
Docker Compose is typically included with Docker Desktop on Windows and Mac. On Linux, you may need to install it separately.
-
Navigate to the project directory:
cd notion-isbn
-
Run Docker Compose:
docker-compose up -d
This command will build and start the services defined in the
docker-compose.yaml
file in detached mode.
Copy the following and edit the environment variables
version: '3.9'
services:
notion-books:
image: allaboutduncan/notion-isbn:latest
container_name: notion-books
restart: always
ports:
- '3331:3331'
environment:
- AWS_ACCESS_KEY_ID=ENTER-YOUR-ACCESS-KEY-HERE
- AWS_SECRET_ACCESS_KEY=ENTER-YOUR-SECRET-KEY-HERE
- AWS_BUCKET=bucket-name
- NOTION_TOKEN=notion_secret
- NOTION_DATABASE_ID=notion-database-id
- GoogleAPIKey=Google-Books-API-Key
- USE_PUSHBULLET=yes/no
- PB_TOKEN=pushbullet_access_token
Once the application is running, you should be able to view the logs or in the console see the status, which should read... 'Next scan scheduled...'
The app will check your Notion database every 60 seconds for new books. To create a new book:
- Duplicate the Notion Books_Template
- Create a new database entry / book
- Enter "New Book" for the book title
- Enter the 10-digit or 13-digit ISBN
- Wait for the data to be popluated (when the process runs every 60-seconds)
If you'd like to contribute to this project, please fork the repository and use a feature branch. Pull requests are warmly welcome.
This is my first public project and I've been working/running this personally for 9 months. It's by no means perfect, but I'm interested to get feedback, requests, etc at this point and share it in a more usable way.
If you enjoyed this, want to say thanks or want to encourage updates and enhancements, feel free to
This project is licensed under the GNU General Public License. See the LICENSE file for details.