## 4 Case Study
### Robot Process Automation (RPA) Protocol  
The RPA protocol was developed using the UiPath software [99]. This program has been employed in numerous applications in the literature (as seen in references [100] and [101]), and it was chosen due to the availability of a substantial portion of its functionalities in an unlimited trial mode. The developed code is presented in Figure 7a, and the flow of information is presented in Figure 7b. This protocol includes the following steps:  
1. Weather information extraction: The RPA reads the weather information according to the predefined time triggers outlined in Table 1 and stores it within a Google Sheet hosted on a Google Drive account. This information encompasses various weather parameters, including temperature, humidity, rainfall, wind speed, wind direction, and wave height, along with their respective timestamps and update intervals. Additionally, it incorporates the studied weather hazards (fire, wind, and swell conditions) and the associated severity levels (normal, warning, or danger), as calculated from Tables 2 and 3. A screenshot of the Google sheet used is presented in Figure 8;
2. Alert dispatch: In those cases where the predefined thresholds are surpassed, the RPA is programmed to transmit digital alerts to the stakeholders via Gmail;
3. Integration of weather data into the BIM model: The RPA lunches a Dynamo script to automate the introduction and representation of the weather data collected in Step 1 into the BIM model. One iteration of the RPA protocol described in Figure 7 takes, on average, 1 min and 43 s. The same process performed manually could take a similar amount of time depending on the user's expertise and familiarity with the websites. However, the main advantage of using RPA in this process is the possibility of the RPA bot working continuously 24/7. In \begin{table}
\begin{tabular}{c c c} \hline \hline
**Alert** & **Risk Index** & **Wind Speed [km/h]** \\ \hline Normal & \textless{}40 & \textless{}38 \\ \hline Warning & \textgreater{}40 and \textless{}55 & \textgreater{}38 and \textless{}88 \\ \hline Danger & \textgreater{}55 & \textgreater{}88 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Alerts for fire [96] and wind [97] hazards in Chile. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Alert** & **Wave Direction** & **Wave Height [m]** & **Wave Period [m]** \\ \hline Normal & Not considered & \textless{}2 & \textgreater{}18 \\ \hline Warning & NW & \textgreater{}2 and \textless{}4 & \textgreater{}14 and \textless{}18 \\ \hline Danger & SW or W & \textgreater{}4 & Not considered \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Alerts for swell conditions in Chile [98]. To assess the RPA bot's performance, a key feature of the RPA tool (UiPath, in this research) is its ability to track each step of the automated process through detailed logs. As shown in Figure 8, UiPath's output window displays a list of timestamps for each activity performed. These logs can be exported as a text file for further analysis. The highlighted section of Figure 8 shows an identified error that is recorded and can be reviewed to correct the code. Additionally, RPA tools can use these logs to generate more accurate alerts for users, such as detecting specific types of errors using regular expression (RegEx) pattern matching [102]. The quality of the data is controlled by the success of the process. If any automated process activities (described in Figure 9) are unsuccessful, the bot immediately reports the error to the users via email. This functionality could even be complemented with SMS messages sent to a group of phones to make this alert timelier. A similar RPA-based solution has been proposed in [43]. In line with this research, the critical activity is the data gathering, and the possible errors come from the source (the sensor in the referenced paper or the websites in the present study) rather than the RPA software tool.