Script to clear the trash of all the workspaces of your Notion account.
This repository is strongly inspired from the project notion-clear-trash of the user axyyu. However, some modification has been done in order to delete the trash of all the workspaces instead of only the current workspace.
pip install git+https://github.com/thomashirtz/notion-clear-trash#egg=notion-clear-trash
notion-clear-trash "<YOUR-TOKEN>"
The token is the API token, the steps to get it are the following:
- Go to www.notion.so.
- Press*
F12
to get to display theBrowser Developer Tools
. - Go to the
Storage
section, then theCookies
section, finally search for the value oftoken_v2
.
You can also run the Python code using Docker with the following steps:
-
Clone the repo and build the Docker image with the following commands:
git clone --depth=1 https://github.com/chriskyfung/notion-clear-trash.git cd notion-clear-trash/ docker build -t notion-clear-trash .
-
Create and run a new container from the image by using:
docker run --rm -it notion-clear-trash:latest
-
Run the Python script on the running container with the following command:
python notion_clear_trash.py "<YOUR-TOKEN>"