Automatically set task end date based on start date and a label

I have some tasks that are “long” (end date = start date + 10) and some that are “short” (end date = start date + 3). When creating these tasks I label them “short” or “long” and I’m wondering if there is a way to automatically set the end date based on the start date and the label?

There isn’t really a way to do this in Vikunja itself. You could build this with the n8n integration though.

Thank you for the quick reply @kolaente, I really appreciate it! Can you point me towards an example of such an integration?

There isn’t really a ready-made example for what you’re doing that I know of. Here’s how you could approach this:

  1. Set up a Webhook trigger in n8n that activates when a label is updated or added to a task. This is the task.updated event, which is also triggered when a label is added to a task.
  2. Create a workflow that checks the label of the task:
    • If the label is “short”, set the end date to the start date + 3 days
    • If the label is “long”, set the end date to the start date + 10 days
  3. Use n8n nodes to update the task’s end date based on the calculation.

I would recommend installing n8n and the Vikunja nodes and then playing around with it a little

1 Like

Thank you for your guidance!