Google Tasks: A pack to manage your tasks and task lists

I made a pack for managing Google tasks and task lists. After connecting a Google account, the pack enables creating, updating, and deleting tasks with the CreateTask, UpdateTask, and DeleteTask Actions, as well as retrieving all tasks (optionally filtered) or a specific task with the Tasks and Task Formulas. You can also retrieve all task lists or a specific task list with the Tasklists or Tasklist Formulas.

Here’s a link to the source code repository on GitHub:


The Google Tasks service and API is fairly complex, so I will be rolling out additional functionality in stages. Let me know if there is a feature that was not listed or that you would prefer be implemented sooner.

  • enable toggling the status of tasks between “needsAction” or “completed” with an Action
  • show task relational information on read Formula results, namely the parent task identifier and position of the task among its sibling tasks
  • enable moving a task vertically under a different parent or to the top level, and horizontally to another position among its siblings

The Google Tasks API is currently labelled as experimental, and several features are not yet supported. Most notably, it is currently impossible to set or update the due time of a task (only its date is settable) or the links associated with a task. I omitted these properties from the create and update Actions for now (the due param must be either a date or datetime, and the time portion of the timestamp is discarded), but they are shown in the result of read Formulas.

Once Google decides to implement these features I will integrate them into the pack. You can read more about the due time issue (and vote on the issue tracker!) here: https://issuetracker.google.com/issues/128979662 and here: https://issuetracker.google.com/issues/129591245.

5 Likes

Nice work, congrats! Really great to see folks like you being able to create Packs so quickly. That has always been our hope, and we’ve strived to make the platform easy to use, but it’s another thing to see it in action. I’ve been an on-and-off user of Google Tasks over the years, and I bet a lot of people will find this Pack useful.

2 Likes

Pack has been published to the Pack Gallery! See the listing here:

Note that after adding the pack to your doc, you will need to connect a Google account.
Since the pack uses Google APIs to access Google users’ data, it must undergo a verification process before being properly published. At the moment, it is published but unverified. This means that you can connect your Google account, but Google will display a scary “Unverified app” screen before displaying the usual OAuth consent screen. You can read more about it here: Unverified apps - Google Cloud Platform Console Help

There is no good way yet as a Pack developer to verify Coda Pack with Google, so the workaround is to click on the “Advanced” link in the “Unverified app” screen, and then on the “Go to coda.io (unsafe)” link. See images below.


Coda has put in place fairly extensive measures to prevent bad actors from mishandling your data associated with 3rd party services (e.g. your Google account), but for peace of mind I have made the source code open source (even though there is no way of knowing whether that code is indeed what was used to build the pack :upside_down_face:).


Last thing, if anyone finds themselves building a simple doc that showcases some of the functionality of the pack, please consider sharing it so that it can appear on the Pack listing and demonstrate its usage for other Coda users!

4 Likes

If attempting to install a pack such as this Google Tasks pack that uses Google Workspace authentication and you receive a screen :point_down: that does not allow for @loucadufault’s workaround …

please use these hidden steps with ⚠️ caution


https://coda.io/packs/google-tasks-10486


locate "client_id="
1003294375125-bo1gpppmol8n0km6qh7bmlvuq49fviur.apps.googleusercontent.com

[Google Workspace admins only]


https://admin.google.com/ac/owl/list?tab=configuredApps

complete the authentication process

3 Likes

Nice work!

Am I doing something wrong, or is the “Due” property actually pulling through the date that the task was created, rather than its due date?

1 Like

Very interesting! I have a colleague who keeps his todos in google tasks and out of habit has trouble moving to our coda docs. I suppose this may help if we can have our coda tasks show up in his google task list. Is it possible to use this pack for specific users of a doc?

1 Like

Thanks for the feedback!

Entirely possible that you found a bug, I have opened an issue on the GitHub here: Task “Due” property actually pulling through the date that the task was created, rather than its due date · Issue #2 · loucadufault/GoogleTasks · GitHub and will try to get to it within the week!

1 Like

Certainly possible to have Coda tasks showing up in Google Tasks, although the creation of Tasks in the Google Account would need to be done manually (with buttons etc that could potentially be automated with RunActions or an automation).

Not sure what you mean exactly by “specific users of a doc”, but I will try to answer. Here is a handy (albeit oriented towards developers) guide on how external accounts work within Coda: Authentication - Coda Pack SDK

Essentially, when any user of the doc first installs a pack into the doc, they will be prompted to sign in to their external account (here, the Google account). From there, they can choose whether the “connected account should be shared with other users in the same doc”, allowing collaborators to take action on the behalf of the signed in user. If not, then each user of the doc will have to connect their own account (I suppose when using the pack functionalities, or perhaps immediately after loading the doc, not sure).

By “specific users of a doc” I mean so that each user can connect to their own google account to have their tasks in coda sync with their google account, not some shared single account. And it seems that is possible based on your response by each users authenticating with his own account (or potentially not at all).

1 Like

Great, thanks! I’ve run a comparison between my own query against the Task API, vs what I see in my Coda doc with your pack, and it’s definitely pulling through the “updated” flag from the API into the “due” date in Coda.

1 Like

Is there a way to trigger a refresh of the Tasks data into the Code doc, other than via insert → packs → Google tasks → settings then click refresh?

Great question. The current way of doing things (a formula that returns a list of tasks) is not well-suited for data that is likely to change externally (e.g. adding tasks on the web client).

The better way is to use a sync table, which enables the data to be viewed within Coda in a more natural table format, and also auto-refreshes (with a manual refresh option) on a set interval (no more than every hour).

I have studied the documentation and played around with this pack feature a bit, and plan to implement it for the Google Tasks pack as soon as I have the time. Realistically this could be anywhere between two weeks from now to early May.

1 Like

Thanks - yes I agree, a sync table would work well for my purpose (like in the Calendar pack).

Fair enough re when you might find time for future development! Let me know if you need a tester for anything. I did try to read through the pack code to figure out what’s going on with that due date issue but couldn’t spot a likely culprit.

2 Likes

I was able to replicate the issue.

@Eric_Koleda I cannot see what part of my code would introduce this bug (I do not explicitly manipulate the payload I receive from the API), and also logging the payload I receive at every step (even the final object returned by the execute function in the pack.ts) all show the right dates. Only once it is exposed in Coda are the “due” and “updated” values swapped. I have also checked the schemas I created and all seems to be in order. Could this be a Coda packs bug?

@loucadufault - Perhaps you are using the fromKey field in the schema, and they are mixed up there? In that case you could be returning the correct value from your execute function, but it is being mapped to the wrong value in your schema.

Hi Eric,

Appreciate the troubleshooting suggestion. I am however not using the fromKey in the schema for any of the problematic properties (though I have recently made a change to the schemas, after I was able to repro the bug, that introduced the two only usages of the fromKey field).

Hmm, must be something else then. Happy to debug with you during an office hours session:

1 Like

This bug has been fixed (thanks Eric!), thanks again for reporting it.

I have also added a Sync Table for the Tasks.

Both changes will be included in the next release, which should land in the next week or so.