A Python tool for two-way sync of notes between Google Keep and Notion.
- Go to https://www.notion.so/ and sign up for a free account.
- In Notion, click the + New Page button in the sidebar.
- Give your page a name (e.g., "Integration Test Page").
- Visit https://www.notion.so/my-integrations.
- Click + New integration.
- Fill in the integration name, select your workspace, and submit.
- Save the generated "Internal Integration Token" (API key).
- Open your Notion page.
- Click Share in the top right.
- Under "Invite", search for your integration by name and invite it.
- Set the integration's access level (usually "Can edit" or "Can read").
- Use the saved integration token in your application (e.g., set it in your
.envfile asNOTION_TOKEN).
Set the following variables in your .env file for Notion:
NOTION_TOKEN: Your Notion integration token (required)NOTION_PARENT_PAGE_ID: The Notion page ID where the database will be created (optional, defaults to your workspace root)
Note: The integration must be added to each page or database you want to access via the API.
This Python app syncs your notes between Google Keep and Notion, using the gkeepapi and notion-client libraries.
- Visit: https://accounts.google.com/EmbeddedSetup
- When the page is stuck on "Loading...", open your browser's developer tools and read the value of the
oauth_tokencookie. - Use this value as your master token.
Set the following variables in your .env file:
EMAIL: Your Google account email (required)GOOGLE_KEEP_TOKEN: Your Google Keep master token (optional, recommended for automation)
How the application finds your Google Keep master token (in order of precedence):
- Environment variable: Set
GOOGLE_KEEP_TOKENin your.envfile.
This will be used if present, even if a different token is stored in your system keyring. - System keyring: If no environment variable is set, the app will use the token stored in your system keyring (if previously saved).
- Prompt: If neither is available, you will be prompted to enter the token at runtime.
If you do not set GOOGLE_KEEP_TOKEN, you will be prompted to enter it on first run.
- Two-way sync between Google Keep and Notion.
- Automatically creates a Notion database ("GoogleKeepReplica") if it does not exist.
- Syncs note title, content, labels, and last update date.
- Keeps both platforms up to date based on the most recent changes.
-
Clone this repository (if not already done).
-
Create and activate a virtual environment:
On Windows:
python -m venv venv venv\Scripts\activateOn macOS/Linux:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Set up environment variables:
Create a
.envfile in the project root with the following content:[email protected] NOTION_TOKEN=your_notion_integration_tokenEMAIL: Your Google account email.NOTION_TOKEN: Create a Notion integration and get your token here.
Make sure your Notion integration has access to at least one page in your workspace.
-
Run the app:
python main.py -
Login:
- The app will prompt for your Google email and master token if not already saved.
- If you have 2FA enabled, use an app password or follow the instructions for master token.
-
Sync:
- The script will check for the "GoogleKeepReplica" database in Notion and create it if needed.
- Notes will be synced both ways based on the last update date.
EMAIL: Your Google account email (required for Google Keep sync)GOOGLE_KEEP_TOKEN: Your Google Keep master token (optional, recommended for automation)NOTION_TOKEN: Your Notion integration token (required for Notion sync)NOTION_PARENT_PAGE_ID: The Notion page ID where the database will be created (optional, defaults to your workspace root)
[email protected]
GOOGLE_KEEP_TOKEN=your_google_keep_master_token
NOTION_TOKEN=your_notion_integration_token
NOTION_PARENT_PAGE_ID=your_notion_parent_page_id