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.

  1. Sign in to your TeamViewer account via https://web.teamviewer.com/ or within the TeamViewer client.
  2. Go to Workflow & Automation.
  3. In Task Automation, click Rule management.
  4. On the top right of the interface, click +Add a rule.
  5. Enter a name and a description for your rule.
  6. Click Condition-based.
  7. Define the conditions of the event you want to monitor.
  8. Select the device.
  9. 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.
  10. Define what should happen when the event occurs.
  11. Select the device.
  12. Select which action the rule should process. In our case, select Restart service and enter Windows Defender Firewall (the service's name).
  13. Select which users should be notified when this event occurs.
  14. Click Add users.
  15. Select the respective users and click Continue.
  16. (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.
  17. 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.

  1. Sign in to your TeamViewer account via https://web.teamviewer.com/ or within the TeamViewer client.
  2. Go to Workflow & Automation.
  3. In Task Automation, click Rule management.
  4. On the top right of the interface, click +Add a rule.
  5. Enter a name and a description for your rule.
  6. Click Time-based.
  7. Define the time when the event should occur.
  8. Select the exact time. In our case, we select 7 AM.
  9. Select the recurrence. In our case, we select daily.
  10. Define what should happen when the event occurs.
  11. Select the device.
  12. Select which action the rule should process. In our case, select Restart service and enter Spooler (the service's name).
  13. Define which users should be notified when this event occurs.
  14. Click Add users.
  15. Select the respective users and click Continue.
  16. (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.
  17. 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:

  1. Go to Workflow & Automation.
  2. In Task Automation, click Rule management.
  3. 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.