Nine Minds Logo

Navigation

15.4. Workflow Actions and Control Flow

Understand workflow actions, branches, loops, waits, AI steps, and error handling in business terms for MSP operations.

15.4. Workflow Actions and Control Flow
Understand workflow actions, branches, loops, waits, AI steps, and error handling in business terms for MSP operations.
15. Workflow AutomationUpdated: 5/3/2026

Workflow steps describe what AlgaPSA should do after a trigger starts a workflow. Some steps perform business actions, such as updating a ticket or sending an email. Other steps control the path of the workflow, such as waiting, branching, looping, or handling errors.

Business action groups

Action groupWhat it doesMSP example
TicketCreate, find, update, assign, close, add notes, or add time entries.Assign urgent GreenLeaf Dental tickets to the escalation team and add an internal note.
Client and contactFind client or contact records for later steps.Look up the primary contact before sending an onboarding email.
CommunicationSend email or notifications.Notify dispatch when an appointment is rescheduled.
SchedulingAssign users or teams to scheduled work.Route after-hours visits to the on-call technician.
ProjectCreate or update project tasks.Create onboarding tasks when a new managed services agreement starts.
TimeCreate time entries.Record standard administrative time for a predefined internal process when appropriate.
CRMCreate activity notes.Log that an account manager follow-up was created after an invoice became overdue.
TransformReformat or normalize data between steps.Convert event details into a message format used by email or notification actions.
AIInfer structured information or compose text.Summarize an inbound message and classify whether it looks like a security incident.

Fixed values versus mapped values

Most actions need inputs. There are two common ways to provide them:

Input typeUse it whenExample
Fixed valueThe value is always the same.Send to dispatch@yourmsp.example.
Mapped valueThe value should come from the trigger or an earlier step.Use the ticket title in the notification subject.

A good workflow usually combines both. For example, an overdue invoice workflow may use a fixed accounts-receivable email address and mapped invoice fields for client name, amount, and due date.

Branches: if this, then that

Use an If branch when the workflow should behave differently based on business rules.

Examples:

  • If the client is marked VIP, notify the service manager.
  • If the ticket priority is critical, assign the escalation team.
  • If an invoice is more than 30 days overdue, notify the account manager instead of sending a normal reminder.
  • If an appointment is canceled by the client, create a follow-up task.

Branches help keep one workflow flexible without creating separate workflows for every small variation.

Loops: repeat work for a list

Use For Each when the workflow needs to repeat the same step for multiple records.

Examples:

  • Create onboarding tasks for each standard onboarding checklist item.
  • Notify each assigned project stakeholder when a milestone changes.
  • Process each device returned by an asset lookup.

Keep loops focused. If a loop updates many client-facing records, test it carefully before publishing.

Wait steps

Wait steps pause a workflow until a time or event occurs.

Wait typeUse it forExample
Wait for timeDelay a next step by a duration or until a specific time.Wait two business days after sending an invoice reminder before alerting the account manager.
Wait for eventPause until a related event happens.Wait for payment received after an overdue reminder, then stop further follow-up.

Waits are useful for multi-day processes, but they also make workflows harder to reason about. Document the expected waiting period in the workflow description.

Try/catch and error handling

Some actions depend on outside systems or required data. A Try/Catch block lets you define what should happen if a step fails.

Examples:

  • Try to send an email; if it fails, create an internal ticket.
  • Try to update a project task; if it fails, notify the project manager.
  • Try to call an integration; if it fails, add an audit note for review.

Use error handling for processes that should never fail silently.

Sub-workflows

A workflow can call another workflow. This is useful when several processes share the same standard task.

Examples:

  • A standard Notify Service Manager sub-workflow used by ticket, SLA, and security automations.
  • A standard Create Client Follow-Up Task sub-workflow used by billing and project automations.

Use sub-workflows when the process is stable and reused. Avoid creating sub-workflows too early, before the main workflow is proven.

AI steps

AI steps can help classify, summarize, or compose text. Use them when natural language is part of the process.

Good uses include:

  • summarizing a long inbound email for an internal ticket note;
  • classifying whether a ticket sounds like a security incident;
  • drafting a client-friendly update for manager review;
  • extracting structured details from an integration alert.

For client-facing AI output, consider adding a human review step before sending.