Todoist ordering

A project for automatically sorting Todoist using AWS.

AWS

Table of contents

Status

Every hour my Todoist labels are automatically sorted. Every four hours, I sort some projects according to my preference. Here is a video example of each:

Click here for the YouTube playlist of the above.

Code

You can find all my code and supporting files for this on my Github page.

Label sorting

  • A CloudWatch event rule triggers a Step Function hourly.
  • The Step Function triggers a Lamda execution which enumerates Todoist labels via a GET request to the Todoist REST endpoint.
  • The labels are bubble sorted.
  • A POST call to the Todoist endpoint with the desired label ordering completes the Lambda execution.

Task sorting

  • A CloudWatch event rule triggers a Step Function every four hours.
  • The Step Function triggers a Lamda execution which utilises a Lambda layer consisting of the official Python library for Todoist.
  • The Lambda function is provided static JSON input which describes the sorting intention for each project.
  • A Sync with Todoist is called to get the current task information.
  • Each project has its tasks bubble sorted by the described intention and another sync with Todoist is performed.

Limitations

  • Labels are assumed to be unordered each execution. As such, there may be superfluous calls to the API if the labels are already in order.
  • The sort rules are static.

Aspirations

In order of preference:

  • Provide a UI for modifying or creating new sort rules.
  • Migrate the label sorting into the Sync API.
  • Review the assumption that the labels are always out of order.

Relevant posts