Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Tasks & Project Management

Tasks & Project Management

Enforce Time Tracking on Closed Awork Tasks

When Awork sends a task status webhook, it checks that time was tracked on completed tasks, comments and rolls the task back to its previous state if not.

What it does

## Enhanced time tracking features for awork This workflow offers several additional features for time tracking with https://www.awork.com: * Check whether time has been tracked when closing a task. If not, tasks are reopened and the user is notified. May be restricted to specific tasks by tags. * Minimum time tracking for tasks to comply with "at least 15-minute intervals are billed" scenarios. May be restricted to specific tasks by tags. * Time tracking cleanup to match billing intervals. * Add a start time to time entries if it is missing. * This workflow does not use the Awork community nodes package, as this package does not support all required API calls and is therefore not used here. If you would like to use that package, you can find more information at https://support.awork.com/en/articles/9826591-n8n-integration and replace the HTTP nodes with matching community nodes if applicable. ### The following configuration settings are possible or required in the “Workflow config” node (following the webhook call): * finishedStateLabels (Array, required): Label text of the task status entities that have the “Done” state. Must be stored as an array. Allows you to control whether the workflow is skipped for certain status changes, even if the task has been marked as completed. * forceTimeTracking (Boolean, optional): Boolean setting indicating whether users are forced to track time on tasks before closing them. * limitForceTimeTrackingToTags (Array, optional): Label text of the task tag entities. Must be stored as an array. Allows you to limit forced time tracking to specific tasks. * addComments (Boolean, optional): Boolean setting indicating whether a comment is added to a task if a status change is undone by the workflow. * commentTimeNotTracked (String, optional, required if addComments is true): Comment text added to a task when the status change is undone due to missing tracked time. Serves as a hint for the user. * setMinTimeTracking (Float (minutes), optional): Defines a minimum time to be tracked for each task. For example, use "15" to track at least 15 minutes for any client request. If set to "0", minimum time tracking is disabled. Provide minutes as the parameter, e.g., "15" for a 15-minute minimum tracked time. * cleanupTimeTracking (Boolean, optional): Boolean setting indicating whether to adjust time tracking to match a specific time interval

The steps

  1. Workflow config
  2. Fetch task changes
  3. Split out task changes
  4. Filter task status change
  5. Check if task done
  6. Webhook call by Awork
  7. Check if force time tracking enabled
  8. Process tags and check if found in configured tags
  9. Check if tags listed in config node
  10. Check if comments are enabled
  11. Add comment to tasks
  12. Roll back task status from done to previous state
  13. Check tag restriction
  14. Check tracked time

31 steps in total.

Similar automations