A simple Python tool to export and import Google Tasks items from one Google account to another.
- Browser login to Google accounts
- Transfer of multiple task lists
- Preserving completion/todo status
- Automatic retry upon hitting API quota
- Does not support recurrence at the moment as info not available in Google's API
Contribution to this tool is welcomed!
Follow steps in the official quickstart guide in section Authorize credentials for a desktop application. Place the downloaded credentials.json
in the same directory root of migrate.py
in this project.
$ pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
Run python migrate.py
in your shell. A browser page will be opened and you will be prompted to log into your Google account to provide Tasks access. You will need to log in to your source (from which tasks will be exported) and destination (into which tasks will be imported) accounts in order.
Once you're done with logging in to both accounts, the transfer process will commence and you will see terminal outputs similar to the following:
(googleapi) ➜ python migrate.py
Please visit this URL to authorize this application: [REDACTED]
Please visit this URL to authorize this application: [REDACTED]
Found 3 task lists in the source account.
Working on task list: My Tasks
Found 300 tasks in the source account.
Importing tasks to VkdYTmo2bUpkSVZKS2dzVw: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 300/300 [04:10<00:00, 1.20it/s]
Working on task list: Work
Found 400 tasks in the source account.
Importing tasks to ZmxWdV9hTEtNSDBPWm51Mw: 6%|███████ | 26/400 [00:12<02:43, 2.28it/s]
Quota Exceeded. Retrying in 60 seconds (Attempt 1/3)
Importing tasks to ZmxWdV9hTEtNSDBPWm51Mw: 6%|███████ | 26/400 [00:23<05:37, 1.11it/s]
...
Wait until transfer of each task lists is complete. Log into your Google Tasks on the destination account and verify.
This tool was programmed with the help of OpenAI ChatGPT 3.5.