Todoist label by section

Hi all - hoping someone smarter than me can help me out here.

I’m trying to create a scenario for Todoist whereby when I add a task to my Work Backlog project in Todoist, we look for a label. Where none is found, a label gets added to the task corresponding to the section the task is in (perhaps after having been created if a suitable label doesn’t already exist). So, a half made up (to avoid explaining the nuances of my work projects) example would be:

An unlabeled task gets added to the Social Media Campaign section of the WORK BACKLOG project. My scenario should look for a label “WORK | Social Media Campaign” - if it exists, it should be added to the new task; where it doesn’t exist, it should be created and then added to the new task.

To explain why I want this set up as I know I can use the Todist shortcuts to quickly add the label…

My set up essentially uses two projects:
My Work Backlog is where all my work tasks go, broken down by section (one for every real work project, i.e not a Todoist project) and the corresponding section also added as a label. This label is essentially for the second project…

My second project is dedicated to this week and is broken down by task status, i.e. still to do, started doing, do today and doing later. At the start of each week I move tasks from my work backlog (and other backlogs from different parts of my life) into “This Week”. From there, I then try and ‘move them across the board’ to use a stolen agile phrase. Its this second project where the label, corresponding to the real work projects come into their own.

If I could get it that a task added to my work backlog looks for a label and if it doesn’t find one, adds / created and adds one based on the section the task is in, it would be a nice to have…certainly not a need to have though but figure this is a good automation to learn a little with.

Any help is much appreciated.

You can use the Todoist app in Make. Here is a basic outline of the steps you need to follow.

  • Use the new event module of Todoist, create a webhook and select the event “Task added”. So this will trigger every time a task is added.

  • Then you need to use a filter to check if the task is added to the Work Backlog project. Then you use the List All Label module to get all the labels.

  • You use another filter to check if the label exists from the List All Label module response.

  • Then you use a router which will be split into two paths with two filters.

  • one filter will be if the label exists, you use the update a task module and add the label.

  • if the task does not exist, you use the create a label to create the label and then use update a task module to add the label to the task.

If you need additional help, Feel free to dm me.

1 Like

Hi @_Mark - thanks for taking the time to reply.

So it turns out I wasn’t a million miles off but neither was I scraping the sides! I’ve followed your advice - with a guessed addition that gets all my sections also - but it’s still not quite working for me.

This is my scenario…

  1. I use the Todoist webhook to look for a new task
  2. I filter all new tasks by project ID to get only the ones added to my Work Backlog project
  3. I get all the labels using the list labels module
  4. MY GUESSED ADDITION - I list all sections
  5. I use the router and two filters to split my scenario…
    Route A: If the label I need already exists
    Route B: if the label I need doesn’t already exist

A1. The task created at step 1 is updated with the label

B1. The label I need is created
B2. The task is updated with this new label

The issues seem to be relating to the logic around the part of the scenario where I’m trying to compare the section name against the list of labels and, if a label exists that matches the section name, apply it to the new task and, if it doesn’t exist, create it and then apply it to the new task. In basic tests - where I was simply entering the word test as the the “new” label - the scenario runs through route b. For the first new task it creates the new label but it doesn’t assign it. For the second task, the scenario fails with the error ‘label already exists’ - which is right but this should have resulted in route A being followed.

If the label does not exist, it shouldn’t follow that second path after the router. It should’ve gone to the first path. That means there must be something wrong in the filters that you applied. I need to see how you have applied the filter.

2 Likes