Jump to content

TOD Todoist Wrapper

Recommended Posts

My primary workflow within Todoist and Alfred is to quickly capture any ideas on my mind and put them into my Todoist inbox for later GTD processing, categorization, and labeling during my daily/weekly review sessions. (I use my Todoist Inbox as my single GTD Inbox across all platforms and clients - from Email, phone, camera, etc)


I previously used the https://github.com/moranje/alfred-workflow-todoist workflow, but the structured format was offputting, and it began to truncate many of my tasks after the last update (so I would get tasks in my Inbox that only contained half of what I had entered). Since my primary workflow requires fast input of a single entered string, I went looking for a new solution, and I found a great CLI app that adds tasks extremely efficiently here (https://github.com/alanvardy/tod)


So, I wrote an Alfred wrapper for it that adds the tasks to the Inbox and makes my workflow much more efficient. I wanted to share in hopes that it is helpful - I'm fairly new at this, so I would love any feedback on the way I did it :) 

Workflow can be found here https://github.com/stacksjb/AlfredTodWorkflow (or on Packal once approved)

Link to comment
3 minutes ago, Stacks said:

I'm fairly new at this, so I would love any feedback on the way I did it


Took a quick look and nothing is inherently “wrong”, so take these as mere tips for you to pick and choose:

  • The Workflow’s name includes “Rust”. I recommend against that because the language is irrelevant to users. If in the future you need to change the tool to another written in a different language, it won’t match.
  • In the Run Script, you can replace everything with tod -t "${1}", the query assignment is redundant. Also, always quote your variables in Bash and Zsh.
  • Assuming it can be done, shipping the command-line tool with the Workflow is a better experience for users. I don’t think cargo installs to a location Alfred sees by default (the PATH), so further instructions should be required if you’re not shipping the tool.
  • The GitHub repo only includes the packaged Workflow, not the contents. That makes it harder for someone to contribute with a pull request, as you won’t be able to easily see the changes.

Let me know if you have specific questions about any of those.

Link to comment

Appreciate the Feedback - thank you! I will work to get those updated.


On the github repo notes - do you have a guide for how to upload the files? I saw that on other repos, but didn't see a way to export the files from Alfred (only the final .alfredworkflow bundle)

Link to comment

Thanks, updated.


Two questions:

1) Is there a better way to compile the alfred workflow without manually uploading the release each time? (I saw some Github actions, but wasn't sure how to use them)

2) For my workflow, I need to take the input from the keyword and I want to be able to post a notification with that text (while also passing it to the script input and parsing the output). So, I set the input as a variable, and then used the $1 you mentioned above throughout the script to pass in the input/output of each stage, while then calling input at the end. Is there a better or built-in way of doing that?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...