Bi-directional syncing between Todoist and Google Calendar
First and foremost, why ... use Google Calendar with Todoist?
The norm for a To-do app is to display tasks in a linear fashion; yet, one can't help but realize how overwhelming this approach may turn out to be. Nonetheless, Visualization is a plausible solution to this challenge; through this integration, one can visualize and plan ahead by looking at a bird's eye view of the whole landscape available for work.
The instructions below will help you get the tool up and running.
Note: The daemon has only been tested with unix-based systems and python 3.x.
For an always up-to-date list of dependencies - see dependencies.txt
Install dependencies using:
pip3 install -r ./misc/dependencies.txt
- Clone the repo and change dir.
 
git clone https://github.com/alexandrosio/todoist_gcal_sync.git
cd ./todoist_gcal_sync- Create the credentials folder.
 
mkdir credentials- Create the 
todoist_tokenfile. 
touch credentials/todoist_token
cd credentials/
vi todoist_tokenand paste your Todoist API token into todoist_token.
- 
Sign in to your Google account and visit Google Cloud to create a project.
- Click on 
CREATE PROJECT. - Type "todoist-gcal-sync" as Project name and click the 
Createbutton. 
Note: a project todoist-gcal-sync-XXXXX will be created.
- 
Select project todoist-gcal-sync-XXXXX from the drop-down.
 - 
While looking at the project's dashboard, click on the the
Products & serviceslocated at the top left-hand corner of the screen and selectAPIs and Services. - 
Then, click on
ENABLE APIS AND SERVICESand selectGoogle Calendar API. - 
Then, click on the
ENABLEbutton. - 
Then, click on
Credentialsfollowed by theOAuth consent screentab. - 
Now, type "todoist-gcal-sync" under "Product name shown to users" and click
Save. - 
Click on the
Credentialstab, followed by theCreate credentialsbutton and select theOAuth client IDoption. - 
Then, select the
Otheroption, and type "python" as Application type followed by theCreatebutton. - 
Then, download the client secret file in JSON format using the download button.
 - 
Rename the client secret file to
client_secret.jsonand place it under the "/credentials" folder. 
 - Click on 
 - 
Configure the SMTP logging handlder of the log_cfg.json file by replacing
YOUR_GMAIL_USERNAMEandONE_TIME_APP_PASSWORDwith the appropriate information; if you are using Two-Factor Authentication with Gmail, simply create a one-time app password; otherwise, use your existing Gmail password. - 
Now edit settings.json according to your needs; if you'd like to exclude some projects or mark others as standalone, then this is the time to make those changes.
 
Please find attached a sample of my excluded/standalone projects' config.
  ...
 // User Preferences
 "projects.excluded": ["Someday | Maybe"],
 "projects.standalone": ["Side projects", "todoist_gcal_sync"],
  ...- 
Run the app for the first time.
Note: Please initialize todoist-gcal-sync with a root user, if you intend to use systemd to run the script as a service.
 
cd ../src/ 
python3 daemon.py --noauth_local_webserver- Copy the link provided to your browser and paste the 
verification codegenerated to the machine that's running the daemon. 
python3 daemon.pynohup python3 -u ./daemon.py > /dev/null 2>&1&- 
Move and rename the systemd service file.
sudo mv /misc/systemd_service_file /lib/systemd/system/todoist-gcal-sync.service
 - 
Edit the service file,
sudo vi /lib/systemd/system/todoist-gcal-sync.service
and change
PATH_TO_CLONED_REPOto the path of the local copy of this repository on your server. - 
Refresh systemd.
systemctl daemon-reload
 - 
Enable the service, so it persists on reboot.
sudo systemctl enable todoist-gcal-sync.service - 
Run the service.
sudo systemctl start todoist-gcal-sync.service
 
Finally, run the following to confirm the service is up and running:
sudo service todoist-gcal-sync statusWarning: If you experience issues with systemd, use journalctl -u todoist-gcal-sync.service to investigate further.
touch reset_daemon
python3 daemon.pyNote: This will erase all calendars and the app's database, then re-initialize the app.
- Copy contents of .todoist_sync to the destination system.
 - Copy the database to the destination system.
 - Run daemon.py.
 
Please feel free to contribute as the project is still at its infancy. Any help is greatly appreciated.
This project is licensed under the MIT License - see the LICENSE file for details