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
  • 9 months later...
  • 3 weeks later...

Hello there,

I just downloaded everything and it totally works! thanks a lot for the workflow :) However I have a little issue, as I am typing the shortcut into alfred "td" and then the task itself, the taks is shown in todoist with "td" in front of it. 
in alfred: td buy apples
shows in todoist: tdbuy apples

How can I fix that? 

aaand is it possible to change the language of the natural processing languages to something else than english?

Link to comment

I'm not sure how you could be getting 'tdbuy apples', as the "td" should be the alfred action. Open a github issue with your debug log and we can take a look. Did you configure "td" as your task_prefix by chance? (you probably want that blank)


Todoist NLP is done by Todoist, not me. I have no control over it. According to Todoist, they support several languages, but you would have to reach out to their support to confirm. I believe it works based on what your language setting in your Todoist account is set to.

Link to comment
  • 11 months later...

Just for information, I had to update the zsh script of the work flow to work with the latest Tod version. The arguments changed. 


export PATH=$PATH:~/.cargo/bin/
if tod t q -c ${task_prefix}${1}${task_suffix} > /dev/null; then
    echo -n 0
    echo -n 1



Link to comment

Thx for the heads up! That change was already made in the latest version as on Github as of about two weeks ago. I went ahead and submitted for Packal.


If anyone is aware of a way to fix update version checking, please let me know. From what I can tell, I can't use the alfred gallary yet because I don't have the homebrew dependencies configured, but I don't have that setup yet and can't find any good documentation on how to configure it. 

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...