Rule-based task automation in TeamViewer allows you to create condition-based rules, which respond to specific system events, and time-based rules, automating actions at set intervals. This functionality enhances operational efficiency by minimizing manual tasks and ensuring timely responses to critical events. Furthermore, rule-based task automation seamlessly integrates with Monitoring policies, providing a cohesive solution for managing and optimizing device performance.
This article applies to all TeamViewer Remote customers who purchased the Monitoring add-on. This feature is not included in legacy Monitoring & Asset Management licenses and only available in the web app.
Rules
There are two types of rules you can create:
- condition-based
- time-based
A condition-based rule triggers an action based on specific system events, while a time-based rule triggers an action at predefined intervals or schedules.
📌Note: Rule-based task automation is directly connected with the Monitoring policy. To learn how to create and manage Remote Management policies, please read this article.
How to create a condition-based rule
In this example, we'll show how to create a condition-based rule. Our rule will automatically restart the Windows Defender Firewall service after it crashes twice.
- Sign in to your TeamViewer account via https://web.teamviewer.com/ or within the TeamViewer client.
- Go to Workflow & Automation.
- In Task Automation, click Rule management.
- On the top right of the interface, click +Add a rule.
- Enter a name and a description for your rule.
- Click Condition-based.
- Define the conditions of the event you want to monitor.
- Select the device.
- Select the Windows Defender Firewall service.
- 📌Note: The parameters below are the ones that you have defined in your Monitoring policy. To edit them, go to Policies.
- Define what should happen when the event occurs.
- Select the device.
- Select which action the rule should process. In our case, select Restart service and enter Windows Defender Firewall (the service's name).
- Select which users should be notified when this event occurs.
- Click Add users.
- Select the respective users and click Continue.
- (Optional) Select the external users that should be notified. After typing the e-mail address, make sure you hit "," (comma) to save your entry and click Done.
- Click Save.
You have successfully created your condition-based rule.
How to create a time-based rule
In this example, we'll show how to create a time-based rule. Our rule will restart the spooler service of a specific device daily at 7 AM.
- Sign in to your TeamViewer account via https://web.teamviewer.com/ or within the TeamViewer client.
- Go to Workflow & Automation.
- In Task Automation, click Rule management.
- On the top right of the interface, click +Add a rule.
- Enter a name and a description for your rule.
- Click Time-based.
- Define the time when the event should occur.
- Select the exact time. In our case, we select 7 AM.
- Select the recurrence. In our case, we select daily.
- Define what should happen when the event occurs.
- Select the device.
- Select which action the rule should process. In our case, select Restart service and enter Spooler (the service's name).
- Define which users should be notified when this event occurs.
- Click Add users.
- Select the respective users and click Continue.
- (Optional) Select the external users that should be notified. After typing the e-mail address, make sure you hit "," (comma) to save your entry and click Done.
- Click Save
You have successfully created your time-based rule.
How to edit, duplicate or delete a rule
To edit, duplicate or delete a rule:
- Go to Workflow & Automation.
- In Task Automation, click Rule management.
- Select a rule and click Edit, Duplicate or Delete.
How to check the rule execution history
You can check all the details about the executed rules within the Rule execution menu.
Click a rule and all the details will appear on the right side of the interface.