Skip to main content
Robotic Process Automation
Chapters 1 to 5
Complete technical guide covering RPA Foundations, UiPath Ecosystem, Control Flow,
Recorders, Exception Handling, Document & Office Automation, Mail & File Systems.
RPA Masterclass Series Slide 1
Dr. N. Juber Rahman, AP, SRCAS, CBE
Chapter 1: RPA Foundations Chapter 2: Control Flow Chapter 3: Recorders & UI
Chapter 4: Office Automation Chapter 5: Mail & File Systems
RPA History & Market Growth
Vendor Ecosystem (UiPath, AA, Blue Prism)
UiPath Stack (Studio, Robot, Orchestrator)
RPA Types & Workflow Basics
Decision & Loop Structures (If, While, For Each)
Assign, Delay, Break & Switch
Variables, Data Types & Scope
Arguments & Data Tables
Recording Types (Basic, Desktop, Web)
Input & Output Methods
Screen Scraping (FullText, Native, OCR)
Exception Handling & Debugging
Word Automation (Set Bookmark, Read, Replace, PDF)
Excel Automation (COM Scope vs Workbook File Parsing)
PowerPoint Presentation Automation & Dynamic Tables
Mail Integration (Gmail, Outlook, IMAP, SMTP)
Email Filtering, Attachment Processing & Archiving
File System Operations, Directory Scanning & CSV Manipulation
Curriculum Overview
Curriculum Overview Slide 2
Evolutionary Timeline of Business Automation
Era Technology / Paradigm Key Characteristics
1950s–1980s Mainframe & Early BPA
Centralized batch processing, early ERP
systems.
1990s Screen Scraping
Interacting with mainframe legacy apps
without APIs.
2000s BPM & Workflow Tools
Rule-based process modeling & system
integration.
2011–2020 Commercial RPA & AI
UI-level software bots, OCR, NLP & ML
integration.
2021–Present Hyperautomation
RPA + AI + Process Mining + IDP end-to-
end.
Drivers of RPA Adoption
Financial crisis efficiency demands, legacy system modernization without
backend refactoring, regulatory compliance in BFSI/Healthcare, and fast
deployment ROI.
Chapter 1: RPA Foundations & Evolution
Chapter 1: Foundations & Evolution Slide 3
Automation Anywhere UiPath Blue Prism
What Should Be Automated? Automation Techniques Spectrum
Cloud-native RPA platform.
IQ Bot for cognitive document processing.
Bot Store ecosystem for pre-built components.
Bot Insight real-time operational analytics.
Complete End-to-End Automation Stack.
Studio (Design), Robot (Execute), Orchestrator
(Manage).
AI Center & Intelligent Document
Understanding.
Extensive drag-and-drop activity libraries.
Enterprise-grade, secure & scalable
architecture.
Digital Workforce central administration.
Object Studio & Process Studio modular
separation.
Partner-centric deployment model.
Repetitive, high-volume, time-consuming tasks.
Rule-based processes with structured digital inputs.
High-risk manual processes prone to human error.
Pre-RPA: Macros, Shell Scripts & IT Runbooks.
RPA Core: UI Desktop & Web Automation, Wrappers, APIs.
Cognitive / Intelligent: Machine Learning, Computer Vision & IDP.
Chapter 1: RPA Platforms Comparison
Chapter 1: Platform Ecosystem Slide 4
UiPath Core Architecture Triad
1. UiPath Studio: Graphical IDE for developers to build workflows visually using
sequences, flowcharts, and state machines.
2. UiPath Robot: Execution agent on client/server host. Runs tasks compiled
from Studio.
3. UiPath Orchestrator: Centralized web-based management server for
scheduling, monitoring, license management, assets, queues, and audit logs.
UiPath Studio Panels Overview
Classification of RPA Robots
Robot Type Operational Characteristics & Use Cases
Attended RPA
Triggers directly on employee workstation. Operates alongside
humans for front-office assistance (call centers, desk validation).
Unattended
RPA
Runs autonomously in background/virtual machine, managed
remotely by Orchestrator. Ideal for high-volume back-office batch
jobs.
Hybrid RPA
Combines attended human verification with unattended back-
office processing loops.
Cognitive / AI
Handles unstructured data (emails, PDFs) using OCR, NLP, and
Machine Learning models.
Activities Panel: Search and drag pre-built activities.
Properties Panel: Configure activity parameters & arguments.
Project Panel: File explorer, dependencies & version control (TFS/SVN).
Output Panel: Execution logs, trace details & debugging output.
Chapter 1: UiPath Stack & Robot Types
Chapter 1: UiPath Stack Slide 5
Core Decision & Iteration Blocks
Utility Activities
Assign Activity: Assigns values or calculated expression results to variables.
Delay Activity: Pauses workflow execution for a defined duration (`hh:mm:ss`).
Workflow Types Comparison
Workflow Type Best For Key Feature
Sequence
Linear, step-by-step
processes
Simple, continuous execution flow
without complex branching.
Flowchart
Complex processes with
decision paths
Supports multi-branching logical
decisions and visual loops.
State Machine
Large enterprise automation
(REFramework)
Uses finite states, transitions,
entry/exit actions & event triggers.
If Activity: Evaluates boolean condition; executes Then block if true, Else
block if false.
Switch Activity: Routes execution to multiple branches based on an
expression outcome (Integer, String, TypeArgument).
While Loop: Evaluates condition before executing loop body.
Do While Loop: Executes loop body at least once before evaluating
condition.
For Each Activity: Iterates through collections, arrays, or data tables
sequentially.
Break Activity: Forces immediate termination of a loop.
Chapter 2: UiPath Control Flow Architecture
Chapter 2: Control Flow Slide 6
Essential DataTable Manipulation Methods
Variables & Types UiPath Arguments Data Structures
GenericValue: Proprietary UiPath auto-
converting dynamic type.
String: Enclosed in quotes (`"Text"`).
Int32 / Double: Numeric computations.
Boolean: `True` / `False` flags.
DateTime: System time parsing (`Now`).
Pass data between different workflows.
In: Input passed to invoked child workflow.
Out: Output passed back to caller.
In/Out: Two-way data exchange.
Naming convention: `in_Config`, `out_Result`.
Arrays (`T[]`): Fixed-size indexed storage.
Lists (`List `): Dynamic resizing collection.
Dictionaries: Key-value pair lookup
(`Dictionary `).
DataTable: Tabular memory structure
(rows/columns).
Build Data Table: Interactively define columns, data
types, and initial schema in Studio.
Filter Data Table: Apply logical conditions to keep or
remove specific rows matching rules.
For Each Row: Iterate through each `DataRow` inside a
`DataTable` memory object.
Chapter 2: Data Structures & Manipulation
Chapter 2: Data Manipulation Slide 7
UiPath Recorders Overview
Recorder Container / Selector Type Best Used For
Basic
No containers, full selectors
per activity
Single, independent actions on
standalone controls.
Desktop
Attach Window container +
partial selectors
Multiple desktop application
actions (Faster execution).
Web
Open/Attach Browser +
Simulate input
Web browser tasks (Chrome, IE,
Edge).
Citrix /
Image
Manual image anchors & OCR
selectors
Virtualized apps, VNC, RDP, SAP &
non-accessible UIs.
UI Automation Input Methods
Default Hardware Events: 100% compatibility, uses physical
mouse/keyboard, cannot run in background.
Window Messages: Sends OS messages directly to control, supports
background execution & hotkeys.
Simulate Click/Type: 100% fast background execution, auto-clears fields,
does not support hardware hotkeys.
Chapter 3: UiPath Recording & UI Interaction
Chapter 3: Recorders & Input Slide 8
Screen Scraping Methods Comparison
Method Speed Accuracy Background Key Characteristics
FullText 10/10 100% Yes
Default method. Extracts
hidden text. No screen
coordinates.
Native 8/10 100% No
Uses GDI rendering.
Extracts word screen
positions/coordinates.
OCR
Engine
3/10 ~98% No
Works on images, Citrix
& virtualized apps
(Tesseract / Modi).
Debugging Capabilities
Includes Breakpoints (`F9`), Step Into (`F11`), Step Over (`F10`), Locals Panel
inspection, Call Stack analysis, and Trace logging (`.etl` files).
UiPath Exception Handling Architecture
System Exception: Technical failures (File Not Found, Selector Timeout,
Network Failure). Handled via retry scopes & recovery logic.
Business Exception: Violations of business rules (e.g., Invalid Account ID,
Insufficient Balance). Logged without technical retries.
Chapter 3: Scraping & Exception Handling
Chapter 3: Scraping & Exceptions Slide 9
Microsoft Word Automation Activities
Excel Execution Architectures
Application Scope (COM Interop): Requires MS Excel installed. Supports
macros (`.xlsm`), real-time formula evaluation, and formatting.
Workbook Integration (Direct XML): No Office installation required. Extremely
fast background XML parsing (File must be closed).
Critical Excel Automation Operations
Operation Key Architectural Considerations
Read Range / Write
Range
Snapshots worksheet cells directly into an in-memory
`DataTable` variable to decouple processing from Excel UI.
Row Deletion
Index Shift
Critical Pitfall: Forward loops skip rows when deleting. Always
iterate row indices in reverse order ($n to 0$).
Boundary
Discovery
Filters out "Ghost Rows" (cells with cosmetic styling but no
data) to find true Used Range boundaries.
PDF Export Setup
Applies page orientation (Landscape) and column fitting
rules prior to rasterization.
Use Word File: Root scope container for Word interactions.
Set Bookmark Content: Dynamically replaces predefined Word bookmarks
with runtime text.
Replace Text / Picture: Replaces placeholders or logos across the
document.
Read Text / Append Text: Extracts document content or appends log
signatures.
Save Document as PDF: Converts formatted Word `.docx` into immutable
`.pdf`.
Chapter 4: Word & Excel Automation
Chapter 4: Word & Excel Slide 10
PowerPoint Automation Container & Operations
Enterprise Use Cases
Automated generation of monthly business review decks, executive KPI
dashboards, automated student/employee certificates, and sales proposal
generation.
Use PowerPoint Presentation: Main container establishing connection
with target presentation deck.
Add New Slide: Dynamically inserts slides with custom layouts (Title,
Comparison, Blank, Content).
Copy / Paste / Delete Slide: Duplicates template slides or removes
outdated content.
Replace Text in Presentation: Replaces placeholders (e.g., `{{Quarter}}`,
`{{Revenue}}`) globally across all slides.
Save Presentation as PDF: Converts `.pptx` decks into executive-ready PDF
reports.
Chapter 4: PowerPoint Automation
Chapter 4: Presentation Automation Slide
11
Mail Integration Activities
Key Mail Protocols Supported
IMAP / POP3: Retrieve incoming emails from web servers.
SMTP: Outbound mail transfer protocol.
Exchange / Outlook API: Native enterprise mail server integration.
End-to-End Automated Email Pipeline
Use Gmail / Outlook Scope: Secure authentication container for API &
desktop client connections.
For Each Email: Loops through messages in selected folders (`Inbox`,
`Custom Labels`).
Save Email Attachments: Automatically downloads attached invoices,
PDFs, or CSV files to directory.
Send / Forward Email: Composes HTML-formatted dynamic emails with
attachments.
Move / Archive / Delete Email: Organizes processed messages into archive
subfolders.
Chapter 5: Mail Automation Architecture
Chapter 5: Mail Automation Slide
12
File & Directory Manipulation Activities
Activity Name Operational Purpose
Create / Delete
Folder
Generates dynamic project directories or cleans up temp
folders.
Copy / Move File
Duplicates or transfers files between source and archive
paths.
Path Exists
Validates existence of file/folder before executing file I/O
operations.
Read / Write Text File
Reads plain text / log files into string variables or
overwrites content.
Compress / Extract
(Zip)
Creates `.zip` archives for backup or extracts incoming
archive packages.
CSV & Batch Directory Processing
Read CSV / Write CSV: Directly transforms structured CSV files into
`DataTable` memory objects without requiring Excel installation.
Get Files in Folder: Returns a string array (`String[]`) of file paths inside a
target directory matching wildcards (e.g., `*.xlsx`).
File Properties: Extracts File Name, Extension, File Size, Creation Date, and
Last Modified Date for automated filtering.
Chapter 5: File System Automation
Chapter 5: File Systems Slide 13
Q&A
Robotic Process Automation (RPA) & UiPath
RPA Masterclass Series Slide 14