How to login 5 times with different credentials saved in asset in 1 Website

Hello Friends…Please guide me

Requirement: Need to login 1 website 5 times with 5 different credentials and URL saved in assets. And download 5 reports saved in 5 different shared folder Path date wise to finally send mail for each login as download successful.

How to design UiPath WorkFlow…?

@Bot_Learner1,

You can design it as a single reusable workflow with input arguments for Username, Password, URL, and Shared Folder Path. Fetch all credentials and paths from the Config or assets, then call this workflow 5 times in your main process, passing the respective arguments for each login. Use this approach instead of duplicating logic, so each execution handles one credential-report pair. Finally, log the download status and send an email after each workflow execution.

1 Like

Hello bro S/W… I can’t design it in single workflow..i need to make it dynamic…like logins 5 times…for downloading 5 report for each user credentials…and send mail for each one… please let me know if have any idea :light_bulb:

@Bot_Learner1

Anything you tried?

Here is basic approach suggested by AI just give it a try and let us know if any issue.

:bullseye: Requirement Summary

You need a bot to:

  1. Login to 1 website 5 times, each with different credentials (and URL from Assets).

  2. Download 5 reports to different shared folders (one per login).

  3. Send a confirmation email for each download.


:gear: Setup in Orchestrator

Before you build the workflow, make sure these Assets exist:

Asset Name Type Description

URL_Asset Text Website URL
Usernames Text Array / List (or store in a Config Excel) List of usernames
Passwords Text Array / List (or Credential Assets) List of passwords
ReportPaths Text Array / List Paths to save downloaded reports

:brain: Tip: You can also keep all in one Config Excel file instead of multiple Assets.


:puzzle_piece: Workflow Steps in UiPath Studio

  1. Initialization

Activities:

Get Asset (for URL_Asset)

Get Asset / Read Range (for credentials list and report paths)

Assign variables like:

URLs = URL_Asset.Split(“,”)

Usernames, Passwords, ReportPaths


  1. Loop Through Each Login

Use a For Each index in Enumerable.Range(0, 4) loop.

Inside loop:

Step 1: Open Website

Use Browser/Application → Chrome/Edge

URL = URL_Asset (or use multiple URLs if different)

Step 2: Login

Type Into: Username field → Usernames(index)

Type Secure Text: Password field → Passwords(index)

Click: Login button

Add a Delay / Element Exists to ensure page loads.


Step 3: Download Report

Navigate (if needed) → click report/download button

Use Click, Type Into (for date or filters)

Use Send Hotkey (Ctrl+S) or Set Download Path in browser

Path = ReportPaths(index) + “\Report_” + Now.ToString(“yyyyMMdd”) + “.xlsx”

Wait until download completes using:

Path Exists

or Wait for Download activity (if available)


Step 4: Send Email Notification

Use Send Outlook Mail Message or Send SMTP Mail Message:

To: “your_email@example.com

Subject: "Download Successful for User " + Usernames(index)

Body: "Report downloaded successfully to: " + ReportPaths(index)

Attach the downloaded file if needed.


Step 5: Close Browser

Use Close Tab or Close Application


  1. Wrap-Up

After loop, you can add:

Log Message (“All reports downloaded successfully.”)

Or summary email to admin.


:magic_wand: Sample Pseudocode Flow

Get Asset: URL_Asset → strURL
Get Asset: Usernames → arrUsernames
Get Asset: Passwords → arrPasswords
Get Asset: ReportPaths → arrPaths

For Each i in 0 to 4
Use Browser (strURL)
Type Into UsernameField: arrUsernames(i)
Type Secure Text PasswordField: arrPasswords(i)
Click LoginButton
Wait for Page Load

    Click ReportsMenu
    Type Into DateField: Today’s Date
    Click DownloadButton

    Wait for File: arrPaths(i) + "\Report_" + Now.ToString("yyyyMMdd") + ".xlsx"

    Send Outlook Mail Message:
        To: "<your email>"
        Subject: "Report Download Successful - " + arrUsernames(i)
        Body: "Report saved to " + arrPaths(i)

    Close Tab

Next


:brain: Recommended Activities List

Step Activity Purpose

1 Get Asset Get URL, credentials, and paths
2 For Each Loop for 5 logins
3 Use Application/Browser Open website
4 Type Into Enter username
5 Type Secure Text Enter password
6 Click Login / Download
7 Wait for Download / Path Exists Confirm file downloaded
8 Send Outlook Mail Message Notify success
9 Close Tab End sesion

1 Like

Dear @Bot_Learner1

High-level Flow

  1. Get Asset ACCOUNTSaccountsStr, then accounts = accountsStr.Split(";"c).Select(Function(s) s.Trim).
  2. For Each accountKey in accounts:
  • url = Get Asset (accountKey + "_URL")
  • cred = Get Credential (accountKey + "_CRED")uName, pWord
  • sharePath = Get Asset (accountKey + "_SHAREPATH")
  • targetFolder = Path.Combine(sharePath, runDate)
  • Create Folder targetFolder if not exists.
  • Try/Catch (per account):
    • Use Browser/Use Application (Edge/Chrome):
      • Navigate to url
      • Type Into username, Type Into password, Click Login
      • (Optional) Validate login via Check App State or Element Exists on a known post-login element
    • Apply date filter if required (Type Into date fields; Click Apply)
    • Wait for Download activity (Modern) wrapped around the Download/Export click:
      • Click “Export/Download”
      • Wait for Download returns downloadedFile full path
    • Move File(s):
      • If single file: Move File from downloadedFilePath.Combine(targetFolder, Path.GetFileName(downloadedFile))
      • If site drops multiple files or a zip:
        • Use Wait for Download multiple times OR
        • After click, Wait with Retry Scope until Directory.GetFiles(downloadFolder).Any(Function f => New FileInfo(f).CreationTime >= startTime)
        • Then move all “fresh” files to targetFolder
    • Send Mail (no Outlook app):
      • Use Send SMTP Mail Message or Send Mail (Exchange/Graph).
      • Subject: [$accountKey] Report $runDate — Download Successful
      • Body: brief summary and target folder path (or attach the file if required)
    • Set result: “Success” for this account
  • Catch → take screenshot, log error (Log Message), Send Mail with failure notice for this account, continue loop
  1. After loop, optionally send a summary email for all 5 accounts.
1 Like

Hello bro..not tired yet..not in front of screen as of now… thanks for your response

1 Like

Hello bro… thanks for your response

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.