Skip to content

floffimedia/tasksync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taskSync

Share Google Tasks lists with other users

How to install

This script needs to run inside a new Google Apps Script project. All data and permissions are tied to that project. Data is never shared with anyone except Google and the group of users of that specific, newly created project. Use at your own risk and only if you understand the consequences.

  1. Create a new Google Apps Script project

  2. Copy the contents of Code.gs into the editor, replacing the existing content

  3. On the first line, replace My Shared Tasks with the name of the Google Tasks list you want to turn into a shared list and save

  4. In the menu on the left-hand side, click on the plus symbol next to Services, highlight Tasks API and add

  5. Open the share menu by clicking on the Share this project with others button

  6. For each user you want to have access to your list, enter their email address. Change the permission from Editor to Viewer

  7. Go to the triggers tab by clicking on the Trigger button

  8. Click on Add Trigger

  9. Select the following options

    • Choose which function to run: taskSync

    • Choose which deployment should run: Head

    • Select event source: Time-driven

    • Select type of time based trigger: Minutes timer

    • Select minute interval: Every 5 minutes

    • Failure notification settings: Notify me weekly

  10. Save and in the pop up, select your account, click on Advanced and then Go to [Your Project Name] (unsafe)

  11. If you feel confident in giving this script access to your Google Tasks account, click Allow

  12. Tell each of your collaborators to perform steps 7 to 11 on their end. You can point them to the right menu by copying the URL from the address bar of your browser

  13. All done! Everyone who granted access to their account should now see the shared list anywhere they can access Google Tasks

Additional information

Read the announcement on my blog

Known issues

  • If task’s due date is set, only the date part is synchronised, not the time of day. Google doesn't expose this information through the API

  • For the same reason, repeating tasks are not synchronised correctly. Only the initial due date is set

  • Merge conflicts are resolved by choosing the most recent version. See the example below

    User A User B
    00:01 🍎 00:01 🍎
    00:02 Replace(🍎, 🍐) 00:03 Replace(🍎, 🍊)
    00:04 🍐 00:04 🍊
    00:05 taskSync() 00:06 taskSync()
    00:07 🍐 00:07 🍊
    00:08 taskSync() 00:09 taskSync()
    00:10 🍊 00:10 🍊

Tests

The tests in Tests.gs can be performed from a single user account. Synchronisation is simulated by creating temporary lists which are deleted once no longer needed.