Google Keep Sync is an unofficial custom integration for Home Assistant that allows users to synchronize their Google Keep lists with Home Assistant. This project is in no way affiliated with, created, or endorsed by Google.
Bidirectional synchronization of lists between Google Keep and Home Assistant. You select the lists you wish to sync, and they are created as todo entities in your Home Assistant instance.
The integration requires Home Assistant 2023.11 or later, due to the fact that todo entities were introduced in that version.
Ensure that you have HACS installed.
Add Integration via HACS:
After you have HACS installed, you can simply click this button:
Download
.Alternatively, you can follow these instructions to add it via HACS:
Add Custom Repository:
Integrations
....
in the top right corner and select Custom repositories
.https://github.com/watkins-matt/home-assistant-google-keep-sync
Integration
and click Add
.Install the Integration:
Google Keep Sync
in the HACS Integrations.Download
.Configure Integration:
Settings
-> Devices & Services
.Add Integration
.Google Keep Sync
.You can use the Docker container created by @Brephlas.
You need a computer that you can install Docker on. This can be any Linux computer, or you can even use a Windows machine by installing WSL. Note that you do not run these commands on your Home Assistant server itself, it must be a separate machine. Raspberry Pi machines will likely not work due to the ARM architecture.
If you want to use a Windows machine, you can install WSL2 and Docker. Follow the instructions here to install WSL2. Then, open Ubuntu
and run the command sudo apt-get install docker.io
.
If you are using a Linux machine, you can install Docker using the package manager of your choice. For Ubuntu, you can use the following commands:
sudo apt-get update
sudo apt-get install docker.io
After you have Docker installed, enter the following commands.
docker pull breph/ha-google-home_get-token:latest
docker run -it -d breph/ha-google-home_get-token
Copy the returned container ID to use in the following command.
docker exec -it <ID> bash
Inside the container, enter the following command and answer the prompts to generate a master token. For the password, you should preferably use an app password,
python3 get_tokens.py
The script will generate two tokens, a "master token" and an "access token". Copy the entire master token, including the "aas_et/" at the beginning.
Use this token in the integration's configuration process by entering it into the token field (make sure you leave the password field blank).
After setup, your selected Google Keep lists will be available in Home Assistant. You can view and interact with these lists, and any changes you make in Home Assistant will be instantly synced to Google Keep.
As a result of the fact that we are working directly with native todo entities, you can use the built-in services to add, remove and update items from your synchronized lists.
todo.add_item
todo.remove_item
todo.update_item
google_keep_sync.request_sync
This service can be used to trigger a manual sync of all of your lists. This is
helpful because you can use it from an automation or script. While you can use also
use homeassistant.update_entity
to trigger a sync, that service requires you
to specify a certain entity id, while this service targets all of your lists.
There is a built in cooldown to ensure that this service is not called too frequently. Instead, it will log a warning if you call it too quickly.
Note that in some cases, the Google Keep Android app does not immediately send changes you have made to Google's servers. This means that if you call the service right after making the change on the Android app, it may not pick it up. It is recommended to add a delay before calling the service if you are trying to capture changes made on the Android app.
If you are using the Google Keep website or webapp, you can see the sync progress icon in the top right corner of the screen. Once it has finished spinning and you see the cloud icon with a checkmark, you can safely call the service.
Google recently removed third party integrations from Google Assistant. Now you can re-create these integrations.
When a new item is added to a synced list via Google Assistant or from Google Keep, an add_item
service call event will be triggered. This allows Home Assistant to pick up new items from Google Keep and sync them with third party systems such as Trello, Bring, Anylist etc.
This plugin extends Home Assistant's events so that the add_item
service call is fired regardless of where the new item was added. The origin
field in the event will be REMOTE
if the item was added remotely to Google Keep, or LOCAL
if it was added within Home Assistant.
Note: Only new items that are not completed at the time of syncing will trigger the event.
Below are some examples of how to do this, click to expand.
Polling Interval: While changes made in Home Assistant are instantly reflected in Google Keep, changes made in Google Keep are not instantly reflected in Home Assistant. The integration polls Google Keep for updates every 15 minutes. Therefore, any changes made directly in Google Keep will be visible in Home Assistant after the next polling interval.
Authentication: Using a token is strongly encouraged. Password login usually doesn't work and is deprecated by the underlying library this integration uses.
Checkboxes in Keep: Only Google Keep notes with Show checkboxes
selected will appear as options to sync with Home Assistant using this integration.
As an additional security precaution, you can sign up for a new Google account to use exclusively with this integration. Afterward, on your primary account, add this new Google account as a collaborator on any lists you wish to synchronize.
Then provide the credentials for this new account (using a token) to the integration. This will allow the integration limited access your Google Keep lists without having access to your entire primary Google account.
Encountering issues? Here are some common problems and their potential solutions:
If you're experiencing Invalid authentication
errors, these are due to incompatible versions of certain underlying libraries used by the integration, such as OpenSSL. To resolve this, make sure you are using a manually-generated token for authentication instead of a password.
custom_components
directory to verify that the google_keep_sync
folder is present and correctly named.This is an unofficial integration and is not created, endorsed, or supported by Google.