Alert management for automation is essential to more effective communication between the project stakeholders. In addition to monitoring errors andmanaging logs , which are essential for orchestrating your robots, alerts can ensure that your team knows what is happening, whether before, during, or after the execution of a process, depending on how you need these alerts to work and the conditions added to your code. In this article, we will understand how to configure an alert according to your needs using Python and how to manage it using BotCity Orchestrator.
What are automation alerts?
Alerts are notifications sent to project participants when specific conditions configured in the automation code’s development happen during execution.
Conditions may vary according to the requirements of each process. Sometimes, you may need to notify the team that a particular point in the execution has just started running or that an error occurred before the robot completed any of the automation steps, among many others.
Alert types for RPA automation
The types of automation alerts we have available to be sent and managed by the Orchestrator are:
- INFO: alert used to bring some information to stakeholders;
- WARN: alert used for warnings that need attention;
- ERROR: alert used to notify errors that have occurred.
How to add alerts to automation with Python RPA
It is necessary to understand which steps to which the alert should be added and what types to add for each step.
But before adding the code, you must ensure your project is ready with the SDK imported and instantiated. Do it as follows: first, add the import:
from botcity.maestro import *
Add the library to the requirements.txt file: botcity-maestro-sdk. Then do the installation:
pip install botcity-maestro-sdk
In your code, remember to instantiate:
# Instantiating the Maestro SDK maestro = BotMaestroSDK.from_sys_args() # Fetching the details of the current task being executed execution = maestro.get_execution()
In this article’s example, let’s consider, for instance, that in your automation, you need to alert when execution starts, alert when a website takes a long time to open, and alert when an error occurs.
If you want to send an informative alert (of the INFO type), you will need to add the function as the code below:
maestro.alert(
task_id=execution.task_id,
title="Starting the process",
message=f"Starting the execution: Task {execution.task_id} started",
alert_type=AlertType.INFO
)
The information added corresponds to the following:
- task_id: is the ID of the task that is running for identification;
- title: is the title of your alert;
- message: the message you want to add about this alert;
- alert_type: this is the type of alert you are sending.
If you want to transmit an alert regarding an error (of type ERROR), you will need to add the function as follows:
maestro.alert(
task_id=execution.task_id,
title="The process failed",
message=f"This page did not open: {site}",
alert_type=AlertType.ERROR
)
And if you want to alert about something that is taking a long time to execute (of the WARN type), you will need to add the function as follows:
maestro.alert(
task_id=execution.task_id,
title="Waiting to open the website",
message=f"Waiting to open the website {site}",
alert_type=AlertType.WARN
)
Learn more: alerts documentation.
How to add who should receive the alert
In your automation already available in Orchestrator through the deployment process, you can add people the configured alerts can notify.
To do this, access the “Automations” screen through the menu on the left side of the Orchestrator, identify your automation and click on the three-dot icon, finally choosing the “Edit” option from the menu.

After that, in the “Notify Users” field, select the people who also need to receive alerts by email. In the “Notification Type” field, select the types of alerts that should be sent by email. Finally, click on the “Save” button.

To find out if everything went well, follow the notification on the screen indicating that it saved successfully. Then, you can follow the notifications you will receive by email regarding the configured alerts.

How to manage alerts at BotCity Orchestrator
You can monitor alerts on BotCity Orchestrator in two ways: through the alerts screen and through the task itself.
Manage alerts by task screen
Within the task itself, you will identify the “Alerts” tab, and by clicking on it, you will be able to monitor the alerts generated.

To expand or close the alert, click on it to access the details in the example screenshot above.
Manage alerts on the Alerts screen
In the menu on the left side, within the “Automation Control” category, identify the “Alerts” item and click on it. You will have access to alerts from different automations. To make things easier, use the filter with the necessary information.

To expand or close the alert, click on it to access the details in the example screenshot above.
Want to test the alerts’ features?
To do everything we shared in practice, you can create your free account, follow the steps step by step, and test this error management in your use case. Then, join our community to exchange experiences about the world of RPA automation.