Visualyze Documentation
Visualyze Documentation
Visualyze Documentation
  • Welcome to Documentation
  • Requirements
  • Tutorials
    • Sample Robots
      • Email Reminder Bot
      • Automate: Password Generator
      • Robot For Periodic Covid19 Status Reports
      • Remove Blank Rows From Excel File
      • Translate Any Language to English
      • Gmail Attachment Sort Bot
      • Data Table Extraction (Pdf to Excel)
  • Courses & Certifications
    • Automation Courses & Guides
    • Level 1 - Beginner
  • Getting Started
    • Robot Studio
      • User Interface
        • Workflow Designer
      • Robots
      • Workflows
      • Activities
      • Document AI
        • Document Classifier
          • Create Classifier Window
          • Configure Classifier Window
          • Types
            • Keyword Classifier
        • Document Extractor
          • Create Extractor Window
          • Configure Extractor Window
          • Types
            • Regex Extractor
            • Form Extractor
            • Skill Extractor
            • LLM Extractor
          • Extractor Constraints
        • Document Viewers
          • Image Document Viewer
        • Text Preprocessing
        • Document Validation
          • Validation Window
      • Variables
        • User-defined variables
        • Activity variables
        • Objects
      • Arguments
      • Input & Output
      • Handling Files
      • Data Manipulation & Conversion
      • Editor Windows
        • String Modifications Window
        • PDF Viewer Window
        • XPath Helper
        • JSONPath Helper
        • Web Request Builder
        • Desktop Element Selector Editor Window
        • Web Element Selector Editor Window
        • Configure Scrape Data Window
        • Filter DataTable Window
        • Filter Data Tables Window
        • Build Data Table Window
        • Add Data Row Window
        • Html Editor Window
        • Create Document AI Client Window
        • Configure Task Data Window
      • Record & Execute
        • Desktop Recorder
          • Desktop Actions
          • Desktop Element Property
          • Desktop Element Conditions
        • Web Recorder
          • Web Actions
          • Web Properties
          • Web Element Conditions
      • Publish a Robot
      • Create Bot - Hello Human!
      • Debugging
    • Visualyze Assistant
      • Human Tasks
        • Introduction
        • Tasks Listing
        • Validation Task Window
    • Robot Cloud
      • Tenant & Workspaces
      • Robots
      • Hosts
      • Executions
      • Schedule
      • Storage
    • Document AI
    • Robot AI
    • Human Tasks
      • Creating a Robot with Human Tasks
      • Task Assignments
      • Completing Tasks
      • Managing Tasks
      • Advanced Topics
      • Troubleshooting
  • Activities
    • Overview
    • Workflow
      • Control
        • Invoke Method
        • Condition
        • Start
        • Assign
        • Assign Multiple
      • Loop
        • Repeated Loop
        • For Each
        • Loop End
        • Examples
      • Run Workflow
      • Write Log
    • DateTime
      • Subtract Date Time
      • Get DateTime
      • Convert DateTime
      • Add DateTime
      • DateTime Formats
        • Standard date and time format
        • Custom date and time format strings
    • Local System
      • Wait For Text On Screen
      • Wait For Hot Key
      • Show Desktop
      • Suspend Service
      • Wait For Service
      • Wait For Process
      • Resume Service
      • Stop Service
      • Start Service
      • Set Default Printer
      • Empty Recycle Bin
      • Run Command
      • Run VBScript
      • Power
      • Play Sound
      • Ping
      • Invoke Python Script
      • Get System Info
      • Get Display Info
      • Get Default Printer
    • Network
      • Web
        • Send Notification
        • Wait For Notification
        • Send HTTP Request
      • SSH
        • SSH Run Command
        • SSH Disconnect
        • SSH Connect Scope
      • FTP
        • Synchronize FTP Folder
        • Move FTP Files
        • Upload Folder
        • Upload File
        • Rename File
        • List FTP Folder
        • Invoke FTP Command
        • Folder Exists
        • File Exists
        • Enumerate Items
        • Download Files
        • Download Multiple Files
        • Download Multiple Files
        • Delete FTP Folder
        • Delete FTP File
        • Create FTP Folder
        • Close FTP Connection
        • Open FTP Connection
    • File
      • Common
        • List Folders
        • Rename File
        • Increment
        • Decrement
        • Print File
        • File Exists
        • Path Exists
        • Read Lines
        • Folder Exists
        • Read File Metadata
        • Wait For Files
        • Compress File/Folder
        • Write File
        • Decompress File
        • Read Text File
        • Move Folder
        • Move File
        • List files
        • Delete Folder
        • Delete File
        • Encode Text
        • Decode Text
        • Create Temp Folder
        • Create Temp File
        • Create Folder
        • Copy Folder
        • Copy File
        • Append Line
        • Sanitize Filename
      • XML
        • Set Element Value
        • Set Element Attribute
        • Insert Element Value
        • Get HTML Element
        • Get Element Value
        • Get Element Attribute
        • Evaluate XPath
        • Delete Element
        • Delete Attribute
      • PDF
        • Print PDF File
        • Append Image To PDF
        • Digitally Sign PDF
        • Validate PDF Digital Sign
        • Extract Image From PDF
        • Extract PDF Page
        • Extract Table From PDF
        • Extract Text From PDF
        • Merge PDF Files
        • Read PDF Elements
      • JSON
        • Filter JSON Array
        • Filter JSON Keys
        • Get Entry By Index
        • List JSON Properties
        • Json Array Entry Count
        • Data table to JSON Array
        • JSON Array to Data table
        • Set Key Value
        • Evaluate JSON Path
        • Delete Key Value
        • Create JSON
      • CSV
        • Write Csv File
        • Read Csv File
    • Collection
      • Find Item In Collection
    • Data
      • List
        • Create List
        • Add To List
        • Apply List Operation
        • Filter List
        • List to File
      • Dictionary
        • Add To Dictionary
        • Lookup Dictionary
        • Create Dictionary
      • String
        • Modify Text
        • Calculate Text Similarity
        • Replace Character
        • Find and Replace
        • Remove Character
        • Format Text
        • Trim Text
        • Split Text
        • Replace Text
        • Pad Text
        • Join Text
        • Get Text Length
        • Get Sub Text
        • Generate Random Text
        • Convert To Text
        • Compare Text
        • Change TextCase
        • Apply Regex
        • Append a Line
      • Datatable
        • DataRow
          • Get Data Row Values
          • Remove Data Row
          • Add Data Row
          • Find Row
          • Apply Row Filter
          • Remove Duplicate Rows
        • DataColumn
          • Rename Data Column
          • Remove Data Column
          • Add Data Column
          • Insert Data Column
          • Get Data Column
        • Apply DataTable Operations
        • Filter Data Tables
        • String To Data Table
        • Append Data Table
        • Extract Row/Column
        • Sort Data Table
        • Merge Data Table
        • LookUp Data Table
        • DataTable To String
        • Clear Data Table
        • Build Data Table
        • Join Data Table
      • Database
        • Execute Non Query
        • Execute Query
        • Close Connection
        • Open Connection
      • Image
        • Barcode
          • Encode String
          • Decode Barcode
          • Decode Multiple Barcode
        • Take Screenshot
        • Image To File
        • QR to Image
        • Image to QR
      • Cryptography
        • Hash File
        • Hash Text
        • Decrypt Text
        • Decrypt File
        • Encrypt Text
        • Encrypt File
    • Application
      • PowerShell
        • Invoke PowerShell
      • Mail
        • Outlook
          • Archive Outlook Mail
          • Replyto Outlook Mail
          • Save Outlook Attachment
          • Save Outlook Mail
          • Delete Outlook Mail
          • Move Outlook Mail
          • Get Outlook Contact List
          • Send Outlook Mail
          • Get Outlook Mail
        • Save Mail
        • Save Attachment
        • Get POP3 Mail
        • Send SMTP Mail
        • Move IMAP Mail
        • Get IMAP Mail
    • System
      • Kill Process
      • Start Process
      • ClipBoard
        • Set To Clipboard
        • Get From Clipboard
      • Launch Application
    • Environment
      • Play Beep
      • Get Environment Variable
      • Get Environment Folder
      • Get Credential
      • Request Credentials
      • Set Credential
    • Microsoft Office
      • Excel
        • Cell
          • Write Cell Value
          • Set Cell
          • Replace Cell
          • Read Cell Value
          • Read Cell Formula
          • Get Cell Color
          • Find Cell
          • Get Cell
        • Sheet
          • Copy Paste Sheet
          • Get Workbook Sheets
          • Get Workbook Sheet
          • Rename Sheet
          • Delete Sheet
          • Create Sheet
          • Read Sheet
        • Rows
          • Find Row
          • Read Row
          • Insert Row
        • Range
          • Apply Style
          • Write Range
          • Read Range
          • Fill Data Range
          • Delete Cell/Range
          • Copy Paste Range
          • Excel Range To Image
        • Columns
          • Read Column
          • Insert Column
        • Open Excel File
        • Close Excel File
        • Delete Row Column
        • Save Excel File
        • Find Duplicates
        • Excel To HTML
      • Word
        • Open Word Document
        • Close Word Document
        • Insert DataTable
        • Insert Image
        • Read Text
        • Write Text
        • Replace Text
        • Save Word Document
        • Append Text
        • Get Element
        • Get DataTables
        • Set Bookmark Content
    • UI Automation
      • Vision
        • Wait For Text
        • Image Exists
        • Indicate On Screen
        • Run OCR on Image
        • Run OCR on Screen
        • Check Text Exists
        • Find Image Position
        • Get Text Position
        • Get Element From Position
        • Hover Image
        • Hover Text
        • Click Text
        • Wait For Image
        • Click Image
      • Forms
        • Select File
        • Select Folder
        • Show Confirmation
        • Show Desktop Alert
        • Show Form
        • Show Input Message Box
        • Show Message
      • Web Browser
        • Take WebPage Screenshot
        • Goto URL
        • Wait
        • Get Table
        • Get Attribute
        • Select
        • Get Text
        • Find Elements
        • Goto URL
        • Set Text
        • Open Web Browser
        • Close Web Browser
        • Click
        • Set Attribute
        • Set Property
        • Scrape Data
        • Switch To
        • Web Automation Session Activity
        • Send Keys
      • SAP
        • Row
          • Set Scroll Position
          • Get All Rows
        • Connection
          • Get Active Session
          • Create Connection
          • End Transaction
          • Start Transaction
        • Action
          • Select Radio Button
          • Set CheckBox
          • Send Virtual Key
          • Set Focus
          • Select Menu Item
          • Click ComboBox
          • Get Text
          • Read Statusbar Info
          • Select ComboBox Item
          • Click Button
        • Column
          • Select Column
        • Find
          • Wait For Element
          • Find By Id
          • Find By Name
      • Desktop
        • Press Key
        • Type
        • Click
        • Focus Window
        • Change Window State
        • Change Window Position
      • CMD
        • Wait For Text
        • Write to Cmd Session
        • Read from Cmd Session
        • Close Cmd Session
        • Open Cmd Session
    • Document AI
      • Create Document AI Client
      • Text
        • Extract Text
        • Extract Entity
        • Invoke LLM
      • Tasks
        • Classify Document
        • Run Extractor
        • Preprocess Document
        • Show Validation Window
        • Update Extracted Field
    • Robot Cloud
      • Analytics
        • Update DataSet
        • Create DataSet
      • DataStore
        • Get Variable
        • Update Variable
        • Get Credential
        • Run Document Query
        • Update Document
        • Get Document
      • Human Task
        • Get Tasks
        • Remarks
          • Add Remark
        • Show Tasks
        • Update Task Status
        • Create Task
    • SAP
      • BAPI
        • Create SAP BAPI Connection
        • Invoke SAP BAPI
  • Integrations
    • GSuite
      • Setup
      • Activities
        • Create GSuite Connection Activity
        • Get Google Token
        • Drive
          • Upload File
          • Move File
          • Get File Info
          • Find Files And Folders
          • Download File
          • Delete File
          • Create New Spreadsheet
          • Create Folder
          • Create Document
          • Copy File
        • Sheets
          • Delete Filter
          • Find And Replace Cells
          • Column
            • Read Column
            • Add/Delete Columns
            • Insert Column
            • Hide/Unhide Columns
          • Row
            • Append Row
            • ReadRow
            • Add/Delete Rows
            • Insert Row
            • Hide/Unhide Row
          • Sheet
            • Download Spreadsheet
            • Get Sheet Info
            • Read Sheet
            • Hide Sheet
            • Unhide Sheet
            • Get Sheets
            • Copy Sheet
            • Rename Sheet
            • Delete Sheet
            • Add New Sheet
          • Range
            • Auto Fill Range
            • Copy Paste Range
            • Merge Range
            • UnMerge Range
            • Delete Range
            • Write Range
            • Clear Range
            • Read Range
          • Cell
            • Write Cell
            • Read Cell
    • Office 365
      • Setup
      • Activities
        • Excel
          • Create WorkBook
          • Add Sheet
          • Get Sheets
          • Read Cell
          • Write Cell
          • Read Column
          • Read Row
          • Read Range
          • Write Range
          • Append Range
          • Delete Range
          • Clear Range
          • Rename Sheet
          • Copy Range
          • Copy Sheet
          • Create Table
          • Delete Column
          • Delete Rows
          • Insert Column
          • Insert Rows
          • Get Table Range
          • VLookup Range
          • Get Cell Color
          • Set Range Color
        • Get Microsoft Token
        • Create Office365 Connection
        • Outlook
          • Get Mail
          • Get Contacts
          • Delete Mail
          • Send Mail
          • Move Mail
          • Forward Mail
          • Set Mail Categories
        • Files
          • Copy Item
          • Create Folder
          • Delete Item
          • Download File
          • Export As PDF
          • End Drive Loop
          • Find Files And Folders
          • Foreach File/Folder
          • Get Item Info
          • Move Item
          • Share Item
          • Upload File
        • Calendar
          • Add Attachment
          • Add Attendee
          • Add Location
          • Create Event
          • Delete Event
          • Find Meeting Times
          • Get Calendars
          • Modify Event
          • RSVP
          • Search Events
    • Azure
      • Run Form Recognizer
Powered by GitBook
On this page
  • For Each Activity
  • Repeated Loop Activity
  1. Activities
  2. Workflow
  3. Loop

Examples

PreviousLoop EndNextRun Workflow

Last updated 2 years ago

Here detailed examples of each of the loop activities will be shown

For Each Activity

To show the basic working of the For Each activity, we can create a sample bot that goes through each of the mails in an email account of your choice and save the attachments of each of the mail messages, if it has any. The following are the steps to create the specified bot:-

  • Create a new workflow and Drag and drop the get IMAP mail activity to the workspace. Connect the start activity to the Get IMAP mail activity.

  • Specify the required field inputs like account credentials, mail folder, Server Configurations etc..

  • Drag and drop the For Each activity and connect the two activities. Specify the output variable of the Get IMAP mail activity in the Collection property field of the For Each activity and also give a loop name.

  • Connect the For Each activity with a Save Attachment activity. Provide the Output folder path where the attachments are to be saved and specify the Mail Message property field of the Save attachments activity with the output(Item) variable of the For Each activity which contains each of the mail in the current iteration of the collection.

  • Add the End loop activity at the end and connect the Save attachment activity to it and specify the same Loop name that we have given in the For Each activity.

The final workflow would be like in the following screenshot :

Click on the Run button in the studio to start the execution of the bot. We can view the downloaded attachments from the mails (if any) in the specified output path in the Save attachments activity.

Repeated Loop Activity

To show the basic working of the Repeated loop activity, we can create a sample bot to search and get the top 10 news of a user-specified city and save the retrieved data in a text file with Datetime with the given city as its filename. The following are the steps to create the specified bot :

  • Create a new workflow and Drag and Drop the Show Input Message box activity to input the desired city whose top 10 news that are to be retrieved.

  • Create a web-recorded session using Web Recorder in the Ui Automation tab item in the studio.

  • Drag and drop Create Counter activity to create an index (NewsIndex) to iterate through each element in the website.

  • Drag and drop 2 Format Text activities and a Get DateTime activity, and use one Format text activity to store the text content to be given in the output file (ex: "Top 10 News in ${CityName} City are as follows:") and use the other Format text and Get date time activities to create a file path with current date time and specified city.

  • Create a text file using the Write File activity with the new filename.

  • Drag and Drop Repeated Loop activity to iterate all the activities (between Repeated loop and End loop activities) a specific number of times (ex: 10 times) to retrieve the essential news from the website.

  • Create a web-recorded session to extract each headline from the website.

  • Use the Append Line activity to append each headline obtained from the preceding web-recorded session to the text file created using Write text file activity.

  • Drag and drop Increment activity to increment the NewsIndex created earlier using create counter activity and connect the Increment activity to an end loop activity to complete the workflow.

The final screenshot of the workflow is as follows :

Click on the studio Run button to start the execution of the bot. An input prompt will appear next to input the city as soon as the bot is executed.

We can view the retrieved new headlines from the given file path where the output file is saved.

Sample workflow diagram
Output folder
Web Recorded session
Output file