Understanding optimization workflows

Prev Next

Overview

A Workflow is a background task that runs on a predefined configuration to automate Azure resource management and reduce operational costs. Workflows evaluate target resources against conditions you define and execute actions (such as purging storage data, shutting down virtual machines, or terminating idle sessions) either on a recurring schedule or on demand.

Workflows are scoped to a Cost group and are configured within the Optimization > Workflows section.

Business value

Workflows eliminate the need for manual, recurring resource management tasks. By automating actions such as storage cleanup, VM shutdown, and session termination, they reduce Azure spend and administrative overhead consistently, without requiring engineers to monitor and act on resource states manually.

Prerequisites

A Cost group must exist before you can configure a workflow. Workflows are scoped to a Cost group and are created within it.

Required permissions

The following permissions apply to all workflow types.

Role Permission level Access
Account owner, Owner, Contributor - Full access to Workflows
Custom role Optimization feature enabled + Workflows: Read View workflows
Custom role Optimization feature enabled + Workflows: Manage Full access to Workflows (create, update, delete, run)

The Turbo360 Service principal also requires Azure-level access on the target subscription or resource to execute workflow actions. The specific Azure role required varies by workflow type; refer to the individual workflow articles for details.

How it works

Each workflow is built around three core elements:

  • Target resource: the Azure resource or resource group the workflow acts on (for example, a storage account, a resource group containing VMs, or an AVD host pool).
  • Condition or filter: the criteria that determine when the workflow takes action (for example, blobs older than a specified number of days, VMs below a CPU utilization threshold, or all idle sessions in a host pool).
  • Execution schedule: the timing and recurrence of the workflow. All workflows also support on-demand execution independent of their schedule.

When a workflow runs, it evaluates the target against the configured condition and performs the defined action on any resources that match. Results are available in the View runs section for each workflow.

Workflow types

Cost Analyzer includes three workflow types, each targeting a specific Azure resource category:

Workflow Resource type What it does
Storage account workflow Azure Storage (blob containers, file shares) Purges blobs or files, or changes blob access tiers, based on age or filter criteria
Start/stop virtual machines workflow Azure Virtual Machines Shuts down VMs that drop below a configured utilization threshold during a defined active window
Kill idle sessions workflow Azure Virtual Desktop (AVD) Terminates idle or disconnected user sessions in a host pool

Shared behavior

All workflow types share the following behavior:

  • Scheduling: workflows run on the recurrence and time zone you configure. You can also trigger any workflow manually at any time.
  • Notification channels: each workflow can be configured to send alerts on execution via your organization's notification channels.
  • View runs: each workflow maintains a run history showing completed executions and scheduled runs still awaiting processing.
  • On-demand execution: any workflow can be triggered immediately via the Actions menu next to the workflow, independent of its schedule.

FAQs

  1. What is the difference between a workflow and a schedule?
    Schedules automate the scaling or start/stop state of Azure resources on a time-based recurrence — they apply a predefined resource tier or state at defined Up and Down hours. Workflows automate action-based tasks that evaluate a condition and act on matching resources — such as purging old blobs, shutting down underutilised VMs, or terminating idle sessions. Use schedules for recurring resource state management; use workflows for condition-triggered cleanup and automation tasks.

  2. Can a workflow be run immediately without waiting for its schedule?
    Yes. Any workflow can be triggered on demand at any time using the Actions menu next to the workflow in the Workflows list. On-demand execution is independent of the configured recurrence schedule and does not reset or affect it.

  3. What happens to a workflow's run history if the workflow is deleted?
    Deleting a workflow permanently removes it and its associated run history. Run history is not retained after deletion. If you need to preserve a record of past executions, export or note the relevant run details before deleting the workflow.

Related articles