Workflow Rules
Workflow Rules are automation rules that help streamline processes by automatically performing actions when specific events occur.
You can automate tasks such as sending email alerts and in-app notifications, updating fields, and triggering webhooks and functions by creating workflow rules in Zoho Expense. The workflow rule executes automatically once the criteria are met.
Scenario: Bailey is the Finance Manager at Zylker. As expense reports are submitted in Zoho Expense, Bailey wants to ensure that high-value reports are reviewed carefully and that the right approvers stay informed. To avoid manually checking every report, Bailey sets up workflow rules in Zoho Expense. Now, whenever an expense report meets specific criteria, such as crossing a certain amount or being associated with a critical project, the system automatically updates relevant fields and notifies the concerned stakeholders. This helps Bailey maintain control over expense approvals while reducing manual follow-ups.
Create Workflow Rules
To create workflow rules:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Click + New Workflow Rule in the top right corner.
Name Your Workflow
Fill in the following in the New Workflow Rule pop-up:
- Workflow Rule Name: Give a name for the rule.
- Description: Give a small description for the workflow rule, if required.
- Module: Select the module for which you want to create a workflow rule. Click Next after you’ve entered these details.
Choose When to Trigger
Fill in the following details in the Workflow Rule Execution Condition section:
- Workflow Type: Specify how and when the workflow should be triggered.
- Event Based: The workflow will be triggered immediately when a specific action (event) occurs on a record. For instance, when an expense report is created or submitted.
- Date Based: The workflow rule will be triggered on a specific date or relative to a date field in a record. For instance, three days before the report submission date.
Event Based
If you select Event Based as the Workflow Type, fill in the following fields:
- Action Type: Select the specific event that triggers the workflow rule. The following actions are supported for event-based workflows:
- Created
- Edited
- Created or Edited
- Deleted
- Submitted
- Approved
- Rejected
If you choose Edited or Created or Edited as the Action Type, fill in the following fields:
Execute the workflow when: Choose the condition that determines when the workflow should be triggered based on actions taken on the fields. The following options are supported:
- When any field is updated: The workflow will be executed when any field in the selected module is updated.
- When any selected field is updated: Select up to three fields in the module. The workflow will be executed whenever any of the selected fields are updated.
- When all selected fields are updated: Select up to three fields in the module. The workflow will be executed only when all the selected fields are updated.
- Any selected field is not updated: Select up to three fields in the module. The workflow will be executed if any of the selected fields are not updated.
- All selected fields are not updated: Select up to three fields in the module. The workflow will be executed only if none of the selected fields are updated.
Execute when the record is: Choose when the workflow should be triggered based on how often the record is edited. The following options are supported:
- Edited for the first time: The workflow will be executed only the first time the record is edited after it is created.
- Edited each time: The workflow will be executed every time the record is edited.
Date Based
If you select Date Based as the Workflow Type, fill in the following fields:
Note: Date-based workflows will be executed only for records that are created or edited after setting up this workflow.
- Date of Execution: The date at which the workflow will be triggered. You can choose to trigger the workflow on any number of days before or after the selected value. For instance, report submission date.
- Execution Time: Choose the exact time at which the workflow rule should be triggered by providing the hour (HH) and the minute (MM).
- Execution Cycle: Choose the frequency at which the workflow should be triggered. You can choose to trigger it Once, Daily, Weekly, Monthly, or Yearly.
- Click Next after entering the required details in the Workflow Rule Execution Condition section.
Add Criteria
Other than choosing when a workflow is triggered (event or date based), you can use criteria to ensure the workflow runs only when specific conditions are met. Criteria can contain one or more conditions. To add a criteria:
- Click + New Criteria below the Workflow Rule Execution Condition section. You can create up to 10 criteria for one workflow.
- In the following pane, choose Yes for Add criteria for this workflow rule? to define conditions, or No to skip criteria for the workflow. At least one criterion must be configured before additional criteria can be added.
- Specify the criteria by selecting a field, a comparator, and entering the required value. To build the criteria using a formula instead, click Use formula in the value field. In the formula editor, insert Functions, Fields, and Operators using the INSERT buttons, and click Check Syntax to validate the formula. Refer to the Functions Library for the list of supported functions.
- Click + Add Criterion to include additional conditions. Multiple conditions can be set by using AND or OR, based on which you can specify whether both conditions or at least one of the conditions should be satisfied. You can set up to 10 conditions for each criterion.
- To define a custom logic between criteria, click Change Criteria Pattern and enter the pattern in the CRITERIA PATTERN field.
- Click Done after configuring the criteria.
Add Actions
Once you set up the triggers, the next step is to associate actions with the workflow. These include Email Alerts, In-app Notifications, Field Updates, Webhooks, and Functions. You can customise the actions to suit your business needs and choose to trigger the actions immediately when the criteria are satisfied (Immediate Actions) or at a particular time (Time Based Actions).
Immediate Actions
The actions will occur immediately when the record meets the criteria mentioned in the workflow. Once the workflow criteria are met, you can choose what action has to be triggered.
- Email Alerts: An email will be sent to the selected recipients. Learn more about Email Alerts.
- In-app Notifications: The recipients you select will receive a notification in their Zoho Expense organisation. Learn more about In-app Notifications.
- Field Updates: You can select a few fields in a module and they will be updated with the values you configure. Learn more about Field Updates.
- Webhooks: You can communicate with third-party applications by sending instant web notifications from Zoho Expense. Learn more about Webhooks.
- Functions: Functions allow you to simply drag and drop code to automate your business processes. Learn more about Functions.
To add immediate actions to your workflow rule:
- Click + Immediate Actions next to the required criteria.
- In the following pane, select the type of action you want to associate with the workflow rule from the Type dropdown. Next, from the Name dropdown, choose the workflow action you created and configured, or click + New Workflow Action from the dropdown to add a new workflow action.
- Click + Add New Action to add more actions if necessary.
- Click Associate to finish associating actions with the criteria.
Time Based Actions
Triggers actions based on the scheduled time. To add time based actions for your workflow rule:
- Click + Time Based Actions next to the required criteria.
- In the following pane:
- In the Execution Time field, set the time for when the action will be executed. It will execute the action on any number of days before or after the selected value. For instance, report submission date.
- Select the type of action you want to associate with the workflow rule from the Type dropdown. Next, from the Name dropdown, choose the workflow action you created and configured, or click + New Workflow Action from the dropdown to add a new workflow action.
- Click + Add New Action to add more actions if necessary.
- Click Associate to finish associating actions with the criteria.
- After setting up the workflow, click Save to finalise and add the workflow.
Note: You can also enable Get notified when workflow actions fail on a workflow rule to receive failure notifications specific to that rule, in addition to the org-level notification preferences.
Clone Workflow Rules
If you need new workflow rules with the same details present in existing workflow rules, you can clone the existing ones. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Hover over the workflow rule you want to clone, click the Dropdown icon, and select Clone.
- In the New Workflow Rule page, review the cloned details.
- Verify the WORKFLOW RULE EXECUTION CONDITIONS and click Update.
- Click Save.
Change the Order of Workflow Rules
In Zoho Expense, the order of rules in your automation list directly dictates their execution sequence. When a single record triggers multiple workflows, the system processes them from top to bottom as they appear in the list. To ensure your business logic triggers in the correct priority, such as updating a field before an automated notification is sent, you can use the Change Execution Order option to manually drag and drop rules into your preferred hierarchy. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Select the module where you want to change the order of workflow rules by clicking the Module dropdown.
- Click Change Execution Order in the right corner.
- Pick and reorder the rules based on your preference.
- After making the necessary reorder, click Save Reorder.
View Workflow Actions Usage Stats
As workflows enable automation and many day-to-day business operations depend on them for smooth functioning, it is essential for businesses to be aware of the number of workflow actions triggered each day. This helps them plan and manage their automation effectively. Zoho Expense provides a Usage Stats section where you can view the total workflow actions available and the number of actions triggered for the day.
To view the workflow actions usage stats:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation. You can find the total and triggered counts of the functions, webhooks, and email alerts for the day in the Usage Stats section.
Note: To view a complete history of every workflow action executed in your organisation, click View Workflow Logs at the top of the Workflow Rules page. Learn more about Workflow Logs.
Configure Notification Preferences for Workflow Rules
You can set daily limits for workflow alert triggers and add email recipients to get notified when the daily threshold is reached. You can also configure how you receive failure log notifications when a workflow rule fails. To configure:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Click Configure Notification Preferences in the Usage Stats section.
- In the Configure Notification Preferences pop-up, fill in the following fields:
- Usage Limit Notifications: Choose a threshold for sending notifications for workflow actions like email alerts, webhooks, and functions. You can configure separate thresholds for each action type and specify the email recipients to be notified when the threshold is reached.
- Failure Log Notifications: Select the frequency and time for notifications, and specify the email recipients who will receive the failure log updates if needed.
- Click Save.
Edit Workflow Rules
You can make changes to workflow rules by editing them. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Hover over the workflow rule you want to edit, click the Dropdown icon, and select Edit.
- Make the necessary changes and click Save.
Note: You cannot change the module for which you’ve configured the workflow rule. You also cannot change the workflow type.
Mark Workflow Rules As Inactive
If you won’t be using some workflow rules for a while but want to keep them for future use, you can mark them as inactive instead of deleting them. To mark them as inactive:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Hover over the workflow rule you want to edit, click the Dropdown icon, and select Mark as Inactive.
Mark Workflow Rules As Active
If you require workflow rules that were previously marked as inactive, you can enable them again. To mark them as active:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Hover over the inactive workflow rule, click the Dropdown icon, and select Mark as Active.
Filter Workflow Rules
You can access workflow rules quickly by filtering them by the module for which they were created or their status. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- If you want to filter workflow rules by modules, click the dropdown next to Module and select the required option. The workflow rules created for the selected module will be displayed.
- If you want to filter workflow rules by their status, click the dropdown next to Status and select the required option. The workflow rules in the selected status will be displayed.
Delete Workflow Rules
If you don’t require any workflow rules, you can delete them. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select Workflow Rules under Automation.
- Hover over the workflow rule you want to delete, click the Dropdown icon, and select Delete.
- Click Yes in the pop-up to confirm your action.
Related Topics