Rotating user assignment for recurring tasks

I am trying to migrate my chore management from Grocy to Vikunja. However, one feature I don’t see is the ability to assign the next user automatically (i.e. user rotation). In a Grocy chore for example, when the assigned user marks a chore as done, it automatically assigns a different user for the next scheduled occurrence.

I have a “household chores” project with many recurring chores/tasks. I want to configure tasks to assign a different user (rotate project users or users on a specific team) when the currently assigned user marks that task as done. Grocy has the following auto assignment types: alphabetical, random, and who has done it the least. I only use alphabetical since I balance chores during the Grocy configuration.

Currently, there is no way built into Vikunja to do this. You can, however, build something with n8n (or a custom program, depending on your skill) to reassign the task to someone else every time it gets marked as done.

Are you aware of any simple n8n examples? I see n8n | Vikunja but I haven’t used the Vikunja API before and am ramping up on n8n, so just looking for some breadcrumbs so I can give it a shot.

No specific examples that I’m aware of.

Here’s what I would do:

  1. Using a Vikunja task updated trigger (webhook), to start the workflow
  2. When the task was marked as done (done is set to true in the task payload), set the assignee from a js expression like (arr => arr[Math.floor(Math.random() * arr.length)])(['user1', 'user2', 'user3']);

I’ve been using this for a while but am currently having issues with some automations running multiple times. For repeating tasks, vikunja never sets done=true. I currently check task.done_at = task.updated, but that isn’t always reliable as I have no way to change the updated field and waiting before POST to the api doesn’t always help. I’m not sure what impact this would have, but it’d be nice if vikunja would set done=true to the webhook and do another one to set it to false when it modifies the due date.

Maybe I’m going about it completely wrong to workaround that issue with the done attribute, so any advice is welcome.