DEV Community

Cover image for RPA explained for developers (when a screen-clicking robot makes sense, and why it is a last resort)
Fabien Kost
Fabien Kost

Posted on Originally published at closiqode.com

RPA explained for developers (when a screen-clicking robot makes sense, and why it is a last resort)

Adapted from an article originally published in French on closiqode.com.

Robotic process automation (RPA) hands a software robot the clicks and keystrokes a person performs in another application: it opens screens, reads values, fills in fields and validates, just like a human would. It helps when an application offers neither an API nor a usable export. It is also the most fragile way to connect two tools, and it should be treated as a last resort.

The situation is common in small companies: a management application installed years ago, a supplier portal with no export, a vendor tool that no longer evolves. Every day, someone copies the same information from one screen to another. The question is not whether a robot can do it, but whether it will do it reliably, and at what maintenance cost.

What RPA actually is

RPA covers tools that automate a task by reproducing a user's actions on an application's interface, rather than talking to the application through an API.

France Num, the French government service for small business digitalization, presents it as the first historical form of business automation: solutions that click and type in software, still in use, but fairly complex to implement and requiring a technical and financial investment.

Microsoft's documentation for Power Automate for desktop, one of the most widespread tools, describes the same mechanics. The robot can drive legacy applications such as terminal emulators, web and desktop applications, Excel files and folders. It locates what it must manipulate through UI elements, images or screen coordinates.

So the word "robot" means neither a machine nor an intelligence. It is a program following a script written in advance, screen by screen.

What it looks like in practice

A small cream paper hand mechanism resting on a dark studio table, poised above a row of folded paper keys, one key pressed down and lit in orange amber: a scripted robot typing in place of a person

Take a typical use: every morning, an assistant copies the orders received on a customer's portal into the sales management software. An RPA robot would reproduce those steps:

  1. Open the browser and log in to the portal with a dedicated account.
  2. Display today's orders and read each line.
  3. Open the management software and create an order.
  4. Fill in the fields (customer, reference, quantity, delivery date).
  5. Validate, record the order number, move to the next line.
  6. Send a report, including the lines it could not process.

A robust script waits for elements instead of fixed delays, and checks what it entered instead of assuming it worked. In tool-agnostic pseudo-code:

for line in todays_orders:
    wait_until_visible("New order form", timeout=30s)   # not: sleep(5s)
    fill("Customer", line.customer)
    fill("Reference", line.reference)
    fill("Quantity", line.quantity)
    click("Validate")
    order_no = read("Order number")
    if order_no is empty or read("Quantity") != line.quantity:
        set_aside(line, reason="entry not confirmed")
    else:
        log(line, order_no)
send_report(processed, set_aside)
Enter fullscreen mode Exit fullscreen mode

There are two ways to run the robot. In attended mode, a person starts it from their workstation and can take over. In unattended mode, it runs alone, on a schedule, on a dedicated machine.

One detail matters a lot: Microsoft states that actions driving a desktop application require its window to be in the foreground. While the robot works on a machine, that machine cannot be used normally.

When RPA helps

RPA has its place when there is no better path:

  • A closed or legacy application with no API and no programmable export, often installed on a workstation or an internal server.
  • A third-party web portal (customer, supplier, platform) with no export. Check its terms of use: some forbid automated access.
  • A stopgap before a replacement that has already been decided. The robot holds for a few months, then disappears with the old tool.
  • A stable, repetitive task with clear rules and clean data, on screens that rarely change.

Conversely, RPA is a bad choice if an API exists, even a paid one, if the export can be scheduled, or if the process changes every month. In those cases, another integration method will be sturdier and cheaper to maintain.

Why an RPA robot stays fragile

A tall cream paper house of cards on a dark surface, one card near the base slightly shifted and lit by a thin orange amber edge: a scripted process that depends on every screen staying in place

An RPA robot depends on what it sees on screen. Anything that changes the screen can stop it, or worse, make it type in the wrong place without warning.

Cause of failure What happens Countermeasure
Interface update A button moves or is renamed, the robot cannot find it Tests after every update, immediate alert on failure
Unexpected window Information message, ad, confirmation prompt Exception handling built into the script
Slow application The robot clicks before the screen has loaded Wait for the element rather than a fixed delay
Expired password or two-factor authentication The robot is stuck on the login screen Dedicated account, renewal calendar, documented procedure
Locked or powered-off machine The robot does not start Dedicated machine, daily check of the report
Unexpected data Empty field, different date format, unknown customer Checks before entry, questionable lines set aside

The most expensive risk is not the visible failure. It is the wrong entry that goes unnoticed for several days. A serious robot therefore verifies what it entered and reports any gap.

RPA, API, no-code or AI agent

Approach How it works Robustness When to choose it
API integration Applications exchange data in a documented format High Whenever the API exists
No-code tool (Make, Zapier, n8n) Ready-made connectors plugged into APIs Good, if the connectors exist Common online apps, simple scenarios
RPA A robot reproduces clicks and keystrokes on the interface Low Software with no API and no export
AI agent An AI model chooses its actions to reach a goal Variable, less predictable Varied tasks that require reading and judgment

AI agents that can read a screen and click on it are appearing. They tolerate a moved button better, but their actions are less predictable than an RPA script. For an entry that commits the company, that unpredictability calls for human validation.

Setting up a robot without creating a dependency

A well-designed RPA robot is easy to replace the day a better solution appears.

  • Describe the task as it is done today: screens, data, exceptions, volume.
  • Check that nothing better exists. Ask the vendor about an API, sometimes reserved for a higher tier, or a programmable export.
  • Create a dedicated account for the robot, with only the rights it needs. Never an employee's personal account.
  • Plan logs and alerts. Every run leaves a trace, every failure notifies a named person.
  • Keep the manual procedure up to date, so the team can take over if the robot stops.
  • Document the script and plan its exit: when the vendor opens an API, the robot must be replaceable without starting over.

On the tooling side, the entry barrier has dropped. According to Microsoft, Windows 11 includes Power Automate for desktop, preinstalled. However, cloud triggering, scheduling, sharing with colleagues and unattended runs require a premium organization account, with an extra option for unattended mode.

That is why I always look at RPA last when I study how to automate a company's processes: first the API, then the export, then a custom connector, and the robot only if nothing else is left.

FAQ

Is RPA only for large companies?
Not anymore. France Num notes that it long was, because of its complexity. Today, tools like Power Automate for desktop are within reach of a small company. The real cost lies elsewhere: maintaining the robot and the licenses needed to run it unattended.

Does RPA raise security issues?
It does if the robot uses shared credentials or an account with excessive rights. Give it a dedicated, least-privilege account, store its credentials in a proper vault and keep the log of its actions.

RPA or AI agent?
An RPA robot follows a fixed script, screen by screen: predictable but rigid. An AI agent chooses its actions to reach a goal: more flexible but less predictable. For a repetitive, well-defined entry task, RPA remains the safer option.

The robot comes last

Use it when the API, the export and the custom connector have all been ruled out, and design it from day one to be replaced.


I am Fabien Kost, an independent developer in France (ClosiQode). I automate business processes by looking for the API first and keeping the screen robot as the very last option. More on how I approach process automation (in French).

Sources: France Num, automation as a solution (in French); Microsoft Learn, introduction to desktop flows, desktop automation, Power Automate on Windows 11 and prerequisites and accounts.

Top comments (0)