Features

Automation — Workflow Engine

The Automation module lets agencies define trigger-based rules that execute automatically when business events occur. It replaces the manual follow-up checklist that every agency relies on but rarely maintains.

  • Free: Automation hidden entirely
  • Studio: Automation unlocks — 3 active workflows, 200 runs/month, run history log
  • Higher plates: caps scale up (Sales 10/500, Growth 25/2,000, Full Loop 50/10,000, Agency 100/25,000)

Triggers

TriggerWhen it fires
deal_stage_changeA deal moves to any stage (configurable: from/to stage)
lead_convertedA lead is converted to a contact and deal
no_activity_daysA deal sits without any new activity for cfg.days days (hourly cron)
task_overdueA task crosses its due_date and is still not done (hourly cron)
task_assignedA task is assigned to a user
bill_approvedAn AP bill is approved
invoice_overdueAn invoice crosses its due date unpaid (hourly cron)

Actions

Action typeWhat it does
create_taskCreates a task in a chosen project (requires one — tasks.project_id NOT NULL)
notify_userIn-app notification (honours user notification preferences)
send_emailSends an email via the connected Gmail/Outlook channel (Resend fallback)
update_fieldUpdates a deal field; skips with no_deal_context on non-deal triggers
create_projectCreates a project, linked to the triggering deal when present
create_dealCreates a deal, linked to the triggering contact when present
add_tagAdds a tag to the triggering contact / lead
log_activityLogs a note activity on the triggering deal / contact (supports {{tokens}})

User-facing behavior

  • Workflow list (/crm/automation): Active and inactive workflows with name, trigger type, action count, last run, status toggle.
  • Create workflow: Select trigger, configure conditions (from/to stage for deal triggers), add actions in order. A Template Gallery row offers 6 one-click starter recipes that pre-fill name + trigger + action + conditions.
  • Activate/deactivate: Toggle without deleting.
  • Run History (Studio, automation:workflow-logs): Accordion list of recent executions below the workflow list. Shows time, trigger type, entity link, run status. Expanding shows per-action results.

Run history schema

Each workflow execution creates a row in workflow_runs and per-action rows in workflow_run_actions.

FieldMeaning
trigger_typedeal_stage_change or lead_converted
trigger_entity_idUUID of the deal or lead that triggered the run
statusstarted, completed, partial, or failed
metadatae.g. { fromStage, toStage, dealTitle }
Important: Workflow logging is non-blocking — if the log write fails, the actions still complete. The monthly automation:runs allowance is a different thing and it does block: it is checked before any action runs, so an org that has spent its allowance has its workflows skipped entirely (nothing fires, nothing is logged, nothing is metered) until the next calendar month or an upgrade.

Technical reference

FilePurpose
actions/workflows.tsTrigger + action CRUD — createWorkflowTrigger, updateWorkflowTrigger, setWorkflowActive, deleteWorkflowTrigger, createWorkflowAction, deleteWorkflowActionsForTrigger (there is no workflow-actions.ts)
actions/workflow-runs.tsRun history — listWorkflowRuns (cursor-paginated)
actions/workflow-execution.tsrunDealStageChangeWorkflows, runLeadConvertedWorkflows
actions/workflow-execution-events.tsrunBillApprovedWorkflows, runTaskAssignedWorkflows
lib/automation/workflow-execute-action.tsShared action executor (all 8 action types)
lib/automation/workflow-run-logging.tstryStartWorkflowRun, logWorkflowActionResult, completeWorkflowRun

Cookie preferences

We use cookies to improve your experience, analyze site traffic, and personalize content. You can choose which categories to allow.
Automation — OpsDash Docs | OpsDash