I am new to UiPath and would like to automate the following workflow:
Login to a Website – Authenticate using a username/email and password.
Retrieve OTP from Gmail – Extract the OTP from an email and enter it on the website.
Navigate to the Reports Section – Scroll to a specific tab and input a dynamic date range (last week’s start and end dates).
Download the Report – Automate the report download process.
Save the Report to a Specific Folder – Move the downloaded file from C:/Users/a/Downloads/report.csv to C:/Documents/TEST/report.csv
Schedule the Bot Execution – Deploy the bot to run daily at 7:00 AM, ensuring it operates even when the system is not logged in.
Could you please advise on the feasibility of this automation in UiPath and recommend the best practices or any necessary configurations to achieve this?
same ui activities and then move file activity…also instead of moving while downloading in type into you can specify full location so that no need to move as well
Yes, this automation is feasible in UiPath, and you can achieve it using the following best practices and configurations:
Step-by-Step UiPath Workflow:
1. Login to the Website
Use the Open Browser activity to navigate to the website.
Use Type Into activities to enter the username/email and password.
Click the Login button using the Click activity.
2. Retrieve OTP from Gmail
Use the Get IMAP Mail Messages or Get Outlook Mail Messages activity to retrieve the email.
Apply a filter to extract the latest OTP email (check for subject/keywords like “Your OTP code”).
Use Regex or String Manipulation to extract the OTP from the email body.
Use Type Into to enter the OTP on the website.
3. Navigate to Reports Section
Use the Click activity to go to the Reports tab.
Use Type Into to enter the start and end dates dynamically:
Use Now.AddDays(-7).ToString("MM/dd/yyyy") for the start date.
Use Now.AddDays(-1).ToString("MM/dd/yyyy") for the end date.
Click the Generate Report button.
4. Download the Report
Use the Click activity to download the report.
If a pop-up appears, use Send Hotkey (Enter or Ctrl+S) to save the file.
Wait until the download completes using a Delay or a File Exists check.
5. Move the File to a Specific Folder
Use the Move File activity:
From: C:/Users/a/Downloads/report.csv
To: C:/Documents/TEST/report.csv
6. Schedule the Bot Execution
Use UiPath Orchestrator to schedule the bot at 7:00 AM daily:
Publish the process to Orchestrator.
Create a Trigger with a daily schedule at 7:00 AM.
To ensure it runs without a logged-in user, configure Unattended Robot settings in Orchestrator.
Best Practices:
Use Secure Credentials: Store passwords in UiPath Orchestrator Assets or Windows Credential Manager. Exception Handling: Add Try-Catch blocks to handle login failures, OTP errors, or missing reports. Dynamic Selectors: Ensure UI elements are stable by using wildcards (*) or anchor-based automation. Logging & Alerts: Use Write Line or Log Message to track execution. Send an email if an error occurs.