A workflow to make API requests using keywords to create tasks in a Todoist project, using alfred
This workflow allows users to make API calls to Todoist, using Alfred, with the primary function being to create new tasks with pre-assigned rules..
For example, for a work project, I might create a workflow that allows me to:
- Type "tdwork" followed by "finish my assignment"
- This workflow will then, using pre-defined rules, create a new task with a pre-defined: priority, language, due date, label and project.
- The outcome could be: "finish my assignment", priority: 3, due date: today at 5pm, project: work, labels: "30 mins"
This allows you to:
- Create an Alfred keyword for each project
- Create an Alfred keyword for each label
- Create an Alfred keyword for each label/project combo
- Create specific language rules for all of the above
- Create due date/time rules for all of the above
- Create priority rules for the above
- Alfred for MacOS including the Alfred Powerpack required before using: https://www.alfredapp.com/
- A Todoist Premium license is required before using: https://todoist.com/r/andy_wingrave_errvgl
- Download the workflow from github
- Drag and drop it into Alfred workflows
- Navigate to https://todoist.com/prefs/integrations
- Scroll down to the bottom for your integration token
- Copy it to your clipboard
- Within the workflow, navigate to [x] in the top right - Environment Variable
- Create an environment variable with the name "bearer"
- Insert the value in your clipboard as the corresponding value
- Using your alfred shortcut type "projectstodo"
- This will copy all of your projects to your clipboard - you will need these to create your own bespoke workflows
- Using your alfred shortcut type "labelstodo"
- This will copy all of your lables to your clipboard - If you use lables, you might want to consider this
In the list filter (with keyword "td"), Configure your projects by doubleclicking on the step. There is a placeholder - edit or delete it.
- Name: Project Name
- Subname: (Whatever you want)
- Arg: Project ID
In my own project, I have a number of filters, and variable that depend on specific projects being chosen, but in the example app, I've kept it simple - Every project gets the same variables.
Please let me know if you'd like me to add some instructions on how to manage this bit, and I'll try to update it
- content: Leave this as '{query}' - This will be the To Do item content
- due_lang: Two letter language code - Default is English: https://en.wikipedia.org/wiki/ISO_639-1
- due_string: Human Defined due string - Default is "today at 5pm" https://get.todoist.help/hc/en-us/articles/205325931-Dates-and-Times
- label1: Default is blank, but if you'd like to add a labels, you can get a list of the ones you use by typing "labelstodo"
- priority: Task priority from 1 (normal) to 4 (urgent).
- project_id: Enter your copied project id from step 1, above
You should now be able to create your first Todoist task using Alfred by launching Alfred and writing "todo" followed by your query