×
×
×
×

Managing Workflows in DEX

The Workflows feature in DEX lets IT administrators automate routine endpoint management tasks using a visual, logic-based canvas. A workflow checks real-time device conditions and runs actions based on rules you define, and it can run automatically the moment a DEX alert is triggered on an endpoint.

Use workflows to restart endpoints based on uptime or update status, prompt users before cleaning up unused files, notify IT teams of threshold violations, or automatically remediate an issue as soon as an alert condition is detected on a device.

Working with workflows happens in two stages: build the automation logic in Workflows, then run it on your devices by creating a deployment in the Deployments module. This page covers building the workflow.

Prerequisites
  • Devices must meet the DEX system requirements. See System Requirements.
  • You must have the Workflows role to create, edit, and deploy workflows.
  • To run a workflow from an alert, the DEX alert must already be configured. See Configuring DEX Alerts.
  • Alert-triggered workflows (deployed in Trigger mode) are supported on Windows endpoints only.
  • To generate workflows using Ask Zia, Zia must be enabled under Admin > Zia Configuration.

What Is a Workflow?

A workflow is a logic-driven automation that responds to device conditions with predefined actions. It works as a decision tree — every step is a stage shown visually on the canvas. A workflow starts at a Start stage, flows through connected stages, and every path ends at an End stage so the logic terminates cleanly.

Workflows are non-linear: each stage runs only if its conditions are met, and branching lets you define different outcomes within the same workflow. You design a workflow around a goal — such as remediating a specific issue or preparing systems for an upgrade — so the structure follows whatever outcome you need.

A workflow can exist in one of the following states:

  • Draft: The workflow is being built and is not yet available for deployment
  • Active: The workflow is complete and ready for deployment
  • Inactive: The workflow exists but is not available for deployment
  • Trashed: The workflow has been moved to the trash and can be restored
  • Deleted: The workflow has been permanently removed and cannot be recovered

Open the Workflows Page

To open Workflows, go to DEX in the top navigation bar and click Workflows Tab.

Workflows page showing the list of existing workflows and their details.

The Workflows page lists all existing workflows along with their name and description, status (Active/Inactive), last modified by, creation method (Manual/Extension), and Platform and creation details.

Workflow Stages

A workflow is assembled from the following stages. Each Stage is configured in the right-hand pane. Every workflow must have a Start stage and an End stage. The Start stage is the default entry point of the workflow, and every final child stage must lead to an End stage to ensure the workflow terminates properly.

StageDescriptionWhen to Use
SensorRetrieves real-time data from managed devices to assess their current state.To collect device information required for workflow evaluation.
SwitchEvaluates data against defined conditions and directs the workflow to the appropriate path.To branch the workflow based on a condition or response.
ScriptExecutes a predefined script on the device to perform an automated action.To apply changes or remediate issues on the device.
FunctionRuns a custom function to perform actions and automate processes within the workflow.To execute custom logic that extends the workflow's capabilities.
EngageDelivers a message or question to the end user on their device and records their response.When user input or acknowledgment is required before the workflow proceeds.
Send MailSends an email notification to one or more specified recipients.To notify administrators or teams about workflow activity or outcomes.
DelayPauses workflow execution for a specified duration before proceeding to the next stage.When an interval is needed between two stages.
RestartRestarts the target device.When a system restart is required as part of the workflow.
EndMarks the conclusion of a workflow path.Required to close every path in the workflow.

How to Create a Workflow

Click + Create Workflow and select the target platform — All Platforms, Windows, or Mac — then choose a creation method.

Create Workflow menu showing platform and creation method options.

Workflows can be created in three ways:

MethodHow
Create NewBuild the workflow manually from scratch on the canvas
Choose from ExtensionPick a pre-built workflow from the Extensions library
ZiaDescribe what you need — Zia generates the workflow automatically

Drag the required stages onto the canvas, connect them, and configure each stage in the right-hand pane. Begin by defining the objective of the workflow, then select the required stages to build the workflow logic. Stages such as Sensor, Switch, Script, Engage, Delay, Send Mail, Restart, and Function can be used based on the required outcome. There is no mandatory sequence — connect the stages in any order based on the logic you want to implement.

Note: Every path must start from the Start stage and end at an End stage.

Variables in Workflow

Variables allow you to pass values between stages and define conditions within the workflow. While building a workflow, you can use three types of variables to drive your logic:

  • Device Properties: Built-in device details—such as network, disk, and battery readings—that DEX can collect from a managed endpoint.
  • Previous stage outputs: Values generated by earlier stages in the same workflow, such as Sensor/Engage stage.
  • Sensor fields: Device data collected through a Sensor stage. These values are also available when the workflow has no Sensor stage of its own — the sensor is called during execution to fetch them.

All three variable types can be referenced across the following stages:

StageHow variables are usedHow to insert
SwitchEvaluate values as conditions to route the workflowPick from the field dropdown
EngageEmbed values in the question text or the message after submissionType $
Send MailInclude values in the subject or message bodyType $
FunctionPass values as parameters, for Zoho Deluge functionsPick from the parameter dropdown
Switch stage showing device properties available for workflow conditions.

For details on each variable type, how to use them across workflow stages, and the full list of available device properties, see Device Properties in DEX Workflows.

Example: Inactive Local Users Management

Inactive local user accounts across managed endpoints create security and compliance risks. This workflow automatically detects and disables local user accounts that have been inactive for more than 90 days.

Workflow that detects and deactivates local users inactive for more than 90 days.
  • Sensor: Retrieve local user account details and last logon activity from the device.
  • Switch: Evaluate user inactivity based on last logon data.
    • Case — User inactive more than 90 days: Script runs to deactivate the local user account > End.
    • Default (inactive less than 90 days):End (no action needed).

Each branch evaluates last logon data so that deactivation runs only on accounts inactive for more than 90 days. Specific accounts such as Administrator and Sysadmin can be excluded from deactivation by updating the sensor script arguments.

Once built, save the workflow. To run it on your devices, create a deployment from the Deployments module, a separate area of the product where you control execution across device groups. To run it automatically on an alert, see Run a Workflow Automatically on an Alert.

Run a Workflow Automatically on an Alert (Enable Deployment Trigger)

To run a workflow automatically when an alert fires, turn on Enable Deployment Trigger and map an Alert Profile while building the workflow. This marks the workflow as alert-aware. The workflow runs only after you deploy it in Trigger mode from the Deployments module.

Enable the trigger while building the workflow

  1. While creating or editing the workflow, find the Event Based Deployment section in the workflow panel.
  2. Turn on Enable Deployment Trigger. This option marks the workflow as alert-aware so it can later be deployed in Trigger mode.
Workflow settings showing Enable Deployment Trigger and the mapped alert profile.
  1. Under Available Alert Profiles, select the alert profile that should start the workflow (for example, Wi-Fi signal strength is less than 95%).
    • If you need a new profile, click Create Alert Profiles.
  2. Build the workflow stages on the canvas, then click Save.

The workflow header now shows the mapped profile as Event Trigger: [profile name].

Deploy in Trigger mode

Enabling the trigger here does not run the workflow. To make it run automatically: Go to the Deployments module and deploy the workflow in Trigger mode. For the full procedure, see Deploying in Trigger Mode.

Note

Only workflows with Enable Deployment Trigger turned on can be deployed in Trigger mode. If you deploy such a workflow in Immediate or Scheduled mode instead, the trigger settings are bypassed and the workflow runs without waiting for the alert condition.

Example: Auto-Remediate Low Disk Space on Alert

  • Alert Profile: Free disk space drops below 20% on a managed device.
  • Workflow Stages: Sensor (checks disk space) → Switch (evaluates threshold) → Engage (informs the user) → Switch (branches on user response) → Script (performs disk clean-up) → Send Mail (notifies the IT team) → End, with Enable Deployment Trigger turned on and the low disk space alert profile mapped.
  • Trigger Setting: Enable Deployment Trigger turned on and low disk space alert profile mapped
  • Deployment: The workflow is deployed in Trigger mode to the target Custom Group from the Deployments module.
  • Result: Whenever any targeted device drops below the threshold, clean-up runs immediately on that device, without an administrator needing to monitor alerts manually.

Note: A user's Engage response can only be read by a Switch stage. Place a Switch anywhere after the Engage to branch on their answer.

Generating Workflows Using Ask Zia

DEX includes Ask Zia — an AI-powered virtual assistant built into the Workflows module. Instead of manually configuring a workflow from scratch, you can describe your automation requirement in plain language and Zia generates a ready-to-use workflow instantly.

Before you begin: Zia must be enabled before use. Go to Admin > Zia Configuration to enable it. For details, see the Zia Configuration Guide.

Steps to Generate a Workflow Using Ask Zia

  1. Go to DEX > Workflows.
  2. Click Zia — available next to the Add Workflow button or within the Add Workflow view.
  3. A chat panel opens on the right side of the screen.
  4. Select a suggested prompt or type your own requirement. For example:
    • "Create a workflow to restart devices that have not been rebooted in the last seven days"
    • "Generate a workflow to clear temporary files when disk usage exceeds 90%"
  5. Based on your requirement, Zia generates a workflow with the appropriate triggers, conditions, and actions.
  6. Review the generated workflow on the canvas, make any necessary modifications and click Save.

Common Workflow Patterns

Most workflows follow one of a few shapes. These are the ones you'll build most often — use them as a starting point.

PatternDescription
Evaluate and actCheck a condition, then apply an action if it matches — for example, "If CPU is over 80%, stop the process."
Prompt the user firstAsk the end user before making a change — for example, "Ask before clearing files."
Branch several waysCheck several conditions and respond differently to each — for example, "If X, do A; if Y, do B."
Notify and concludeSend a status update to admins, then end the workflow — for example, "Send Mail > End."
Fix on alertStart the workflow automatically the moment an alert condition is met — for example, "On low disk space, clean up the disk and notify IT."

Best Practices

  • Use descriptive labels for each stage to keep workflows readable and easy to collaborate on.
  • Make sure every case — including the automatic Default — leads to an End stage.
  • Use Engage stages sparingly to avoid excessive prompts to end users.
  • Add a Delay only when needed, for example before a restart, after informing the user.
  • Test workflows on a pilot group before deploying organization-wide. Pilot deployments are created and managed from the Deployments module.
  • For time-sensitive, unpredictable issues, use Trigger mode in the Deployments module; reserve Immediate and Scheduled modes for one-time fixes and routine maintenance.
  • Before going to the Deployments module to deploy in Trigger mode, confirm Enable Deployment Trigger is turned on and an alert profile is mapped for the workflow.
  • Review device-level execution summaries in the Deployments module periodically. A device where the same alert is repeatedly triggered may need deeper investigation rather than repeated remediation.

Troubleshooting

The workflow runs immediately instead of waiting for the alert
If a workflow has Enable Deployment Trigger turned on but is deployed in Immediate or Scheduled mode, it runs immediately (or on its schedule) instead of waiting for the alert. In this case, the trigger settings are bypassed. To make the workflow wait for the mapped alert condition, go to the Deployments module and redeploy it in Trigger mode.
The alert fires but the workflow does not run
Check that the workflow has Enable Deployment Trigger turned on and is mapped to the correct alert profile. Then confirm in the Deployments module that the workflow was deployed in Trigger mode, and that the target device is running Windows. A workflow already running on that device will also cause the new trigger to be skipped (see below).
A repeated alert does not start the workflow again
Concurrent executions of the same workflow are prevented. If the mapped alert is triggered again while the workflow is still running on an endpoint, the new trigger request is skipped until the current execution completes. This prevents duplicate remediation actions from repeated alerts.
The workflow does not appear in the Trigger mode list in the Deployments module
Trigger mode in the Deployments module lists only workflows with Enable Deployment Trigger turned on. Open the workflow here, turn on Enable Deployment Trigger and map an alert profile, save, then return to the Deployments module and try again.

Frequently Asked Questions

Where can I see the results of a workflow after it runs?
Go to DEX > Deployments Tab, open the relevant deployment, and select a device. The execution flow shows triggered, executed, and completed times, execution status, and the stage-by-stage results — across deployment, device, and event views.
The deployment shows "Success" but the workflow status still shows "Yet to Start." What does this mean?
A successful deployment means the workflow was pushed to the device. "Yet to Start" means the DEX agent on the device has not begun execution yet. Confirm that the DEX agent is active and reachable on the target device.
Why can't I see the Workflow module in DEX?
The Workflows module is visible only to users with the Workflows role assigned. If you can't see it, ask your administrator to check your role under Admin > Roles and assign Workflows access.
Can I write sensors and scripts in any language?
No. Sensors must be PowerShell (.ps1) for Windows or Shell (.sh) for Mac. Scripts accept a wider set — PowerShell (.ps1), VBScript (.vbs), or Batch (.bat) for Windows, and Shell (.sh) for Mac.
I added new devices to my group. Will the workflow automatically cover them?
No. The workflow only runs on the devices that were in the group when you created the deployment. For newly added devices, you need to create a new deployment targeting the updated group.
Where can I see the output of a sensor used in a workflow?
Sensor output is captured during workflow execution and is visible in the Deployments module. Open the deployment, select the target device, and review the Sensor stage result in the execution flow.
Does a workflow run once, or does it run repeatedly?
It depends on the deployment mode selected in the Deployments module:
  • Immediate — runs once as soon as it is deployed.
  • Scheduled — runs once at the defined date and time.
  • Trigger — runs automatically each time the mapped alert condition is met on the device.
Can I modify a workflow that is already active?
Yes. Open the workflow and make your changes. After modifying, click Deploy Now to save the updated version and run it again on the deployed devices. If you do not click Deploy Now, the changes are not applied.
Will the user be notified before the workflow restarts their device?
No. The Restart stage runs without any user-facing message by default. To notify the user before a restart, add an Engage stage before the Restart stage so the user can save their work first.
What is Trigger mode?
Trigger is a deployment mode available in the Deployments module. When you deploy a workflow that has Enable Deployment Trigger turned on using Trigger mode, the workflow runs automatically on a target device when its mapped alert condition is met.
What is Enable Deployment Trigger?
Enable Deployment Trigger is a workflow setting (under Event based deployment) that maps an alert profile to the workflow and defines the alert condition that starts it. Turning this on is a prerequisite for deploying the workflow in Trigger mode from the Deployments module.
Do I need to deploy the alert and the workflow separately?
No. You map the alert profile on the workflow here (using Enable Deployment Trigger), then deploy that workflow in Trigger mode from the Deployments module. You do not deploy the alert profile separately.
When does the workflow run?
When deployed in Trigger mode from the Deployments module, it runs automatically on a device when the mapped alert condition is met. Saving a workflow here does not run it — execution always requires a deployment.
What happens if the workflow is already running when the alert is triggered again?
The new trigger request is skipped until the current execution completes, preventing duplicate executions of the same workflow on that device.
What if I deploy a Deployment Trigger workflow in Immediate or Scheduled mode?
The trigger settings are bypassed and the workflow runs based on the selected mode from the Deployments module. It does not wait for the alert condition.
Can I use any workflow in Trigger mode?
Only workflows with Enable Deployment Trigger turned on. Turn it on here and map an alert profile before going to the Deployments module to deploy the workflow in Trigger mode.