Node app to sync Google Contacts to Notion
After downloading this repo, you'll need to do some configuration to get the app access to your Google account to pull down contacts and a Notion Database to sync your contacts to.
- Create a new Google Cloud Project
- Enable the People API for your project
- Create a Oauth 2 Client ID
- Download the keyfile and place it in the directory above this repo with the filename "gcontact-notion-sync-keyfile.json"
-
Create a "Contacts" database in Notion with the schema (additional fields are ok):
Field Name Field Type Name Title First Name Text Last Name Text Organization Text Title Text contactId Text -
Create a new Notion Integration
-
Share your Contacts database with your new integration
-
Create a
notion.config.json
in the directory above this repo with the following keys. The secret is available on the integrations page from the previous step, and the database_id can be found in the URL when viewing your database Jot down the database ID of your Contacts database:https://www.notion.so/username/DATABASE_ID?
{ notion_token: "integration_secret_goes_here", database_id: "contacts_database_id_goes_here" }
node index.js
to run the sync, a browser window should pop up to ask you to sign into Google and grant permsissionsnpm run test
to run jest tests (run locally)