Features
Automations

Automations

Automations help you reduce manual work by automatically performing actions when certain conditions are met.

How Automations Work

When [TRIGGER] happens → Then [ACTION] is performed

Example: "When status changes to Done → Notify the team"

Trigger Types

TriggerDescription
status_changeWhen task status changes
date_arrivesWhen a due date approaches
item_createdWhen a new task is created
person_assignedWhen someone is assigned
priority_changeWhen priority changes

Status Change Trigger

{
  type: "status_change",
  config: {
    fromStatus: "working",  // Optional
    toStatus: "done"        // Required
  }
}

Date Arrives Trigger

{
  type: "date_arrives",
  config: {
    daysBeforeDue: 3  // Trigger 3 days before due date
  }
}

Action Types

ActionDescription
notifySend notification to users
change_statusUpdate task status
assign_personAssign user to task
move_to_groupMove task to different group
create_itemCreate a new task
send_emailSend email notification

Notify Action

{
  type: "notify",
  config: {
    message: "Task marked as done!",
    notifyPersonIds: ["user-1", "user-2"]
  }
}

Change Status Action

{
  type: "change_status",
  config: {
    status: "review"
  }
}

Creating Automations

Via UI

  1. Open a board
  2. Click Automations in the header
  3. Click + Add Automation
  4. Select trigger type
  5. Configure trigger conditions
  6. Select action type
  7. Configure action
  8. Save automation

Via Store

import { useAppStore } from '@/lib/store'
 
const addAutomation = useAppStore((s) => s.addAutomation)
 
addAutomation({
  boardId: 'board-id',
  name: 'Notify on completion',
  trigger: {
    type: 'status_change',
    config: { toStatus: 'done' }
  },
  actions: [{
    type: 'notify',
    config: {
      message: 'Task completed!',
      notifyPersonIds: ['user-id']
    }
  }],
  enabled: true
})

Automation Schema

interface Automation {
  id: string
  boardId: string
  name: string
  trigger: AutomationTrigger
  actions: AutomationAction[]
  enabled: boolean
  runCount: number   // How many times it's run
  createdAt: string
}

Managing Automations

// Toggle automation on/off
const toggleAutomation = useAppStore((s) => s.toggleAutomation)
toggleAutomation(automationId)
 
// Update automation
const updateAutomation = useAppStore((s) => s.updateAutomation)
updateAutomation(automationId, {
  name: 'New name',
  enabled: false
})
 
// Delete automation
const deleteAutomation = useAppStore((s) => s.deleteAutomation)
deleteAutomation(automationId)

Example Automations

Notify Manager on High Priority

{
  name: "Alert on high priority",
  trigger: {
    type: "priority_change",
    config: { toPriority: "critical" }
  },
  actions: [{
    type: "notify",
    config: {
      message: "Critical priority task needs attention!",
      notifyPersonIds: ["manager-id"]
    }
  }]
}

Auto-Assign New Tasks

{
  name: "Auto-assign to John",
  trigger: {
    type: "item_created",
    config: { groupId: "group-id" }
  },
  actions: [{
    type: "assign_person",
    config: { personId: "john-id" }
  }]
}

Due Date Reminder

{
  name: "Remind 2 days before due",
  trigger: {
    type: "date_arrives",
    config: { daysBeforeDue: 2 }
  },
  actions: [{
    type: "notify",
    config: {
      message: "Task due in 2 days!"
    }
  }]
}