RPA Script Generator
Describe any manual process in plain English and get a working first-draft automation script for UiPath, Power Automate, Automation Anywhere or Python.

Robotic process automation drives software the way a person does — clicking, typing, reading what is on screen — and it exists for the systems that have no API. Describe your process below in the order you would explain it to a new hire, pick a target platform, and this generator writes the first draft of the script. It writes the happy path. The notes underneath cover the three things it cannot guess for you.
What this tool does and who it is for
Robotic process automation (RPA) is software that operates other software through its interface rather than its API — clicking buttons, filling fields, reading values off the screen. You reach for it when the system holding your data will not talk to you any other way: a supplier portal with no API, a Windows application from 2009, a terminal emulator. This generator turns a plain-English process description into a commented first-draft script for one of five targets. Read the draft before you trust it.
How to read the output, with a worked example
Take invoice entry: forty invoices a day, nine fields each. You get a loop, a click and a type call per field, and a save. It works, and it is slower than you expect. Both numbers below come from documented defaults, not opinion.

PyAutoGUI pauses after every call. pyautogui.PAUSE is 0.1 seconds by default. Nine fields at one click plus one type call each is eighteen calls per invoice, so 720 calls across forty invoices — 72 seconds of pure pause.
Then the typing. The documented example is pyautogui.write('Hello world!', interval=0.25), a quarter-second between keystrokes. With ten-character fields: 40 × 9 × 10 × 0.25 = 900 seconds, fifteen minutes spent waiting between letters.
Drop the interval, keep the pause, and the job finishes in a little over a minute. That one argument is the difference between a script you run on demand and one you leave overnight. Check it first.
The method: how a script finds things on screen
Three ways, not equally reliable.
By element — the script asks the application for the control labelled "Invoice number". Microsoft's desktop-flow documentation states the options plainly: you interact "using application UI elements, images, or coordinates", including legacy terminal emulators (Introduction to desktop flows). Elements first, always.
By image — pyautogui.click('button.png'). Survives a window moving. Not a theme change, a font change or a new resolution.
By coordinate — pyautogui.click(100, 200). Works today, breaks the first time anything moves.
In a browser the same hierarchy sits in Playwright's guidance, which recommends user-facing attributes such as getByRole and calls long CSS or XPath chains "bad practice that leads to unstable tests" (Locators). A generated selector like #tsf > div:nth-child(2) > div > input fails first.
Which target to generate for
| Target | Runs on | Finds elements by | Choose when |
|---|---|---|---|
| UiPath | Windows | UI selectors, images | You already run it and want a sequence for Studio |
| Power Automate desktop flows | Windows | UI elements, images, coordinates | The process is in Microsoft 365 and Windows apps |
| Automation Anywhere | Windows | Recorded UI actions | You have standardised on it |
| Python + PyAutoGUI | Win, macOS, Linux | Coordinates, images; primary monitor only | Small, yours, nothing in the way |
| Python + Playwright | Win, macOS, Linux | Role, label, text, test id | The whole process is in a browser |
If every step is in a browser, generate Playwright rather than screen automation. Identifying a field by its label instead of its position is the difference between surviving a redesign and not.
Common mistakes
Coordinates instead of elements. The most frequent reason a working automation quietly stops working.
Leaving the typing interval in. See the fifteen minutes above.
Turning off the fail-safe. PyAutoGUI raises FailSafeException when the cursor reaches any corner of the primary monitor, and the docs say in capitals not to disable it. It is your only way to stop a script fighting you for the mouse.
Assuming a second monitor exists. PyAutoGUI's FAQ says it "only handles the primary monitor". Built at a two-screen desk, deployed to a single-screen VM, it clicks empty space.
No idempotency. If the run dies on invoice 23 and you restart it, does 22 get entered twice? Check the record exists before creating it. Retries and idempotency are the two things I add to almost every generated script somebody brings me.
Using RPA when an API exists. If there is a REST endpoint or a webhook, an n8n or Make workflow is cheaper, faster, and does not break when somebody moves a button. What is workflow automation covers telling the two apart.
Frequently Asked Questions
Is the generated script ready to run in production?
No. It is a first draft of the happy path. Before running unattended it needs error handling, a retry policy, a check that stops it entering the same record twice, and a log you can read after a failure.
Which platform should I generate for if I have no preference?
If the process is entirely in a browser, choose Python with Playwright: it finds elements by accessible role and label rather than position, so it survives layout changes. For Windows desktop applications, choose Power Automate desktop flows or UiPath, whichever you already license.
Why does my script click the wrong place on another machine?
Because it clicks coordinates rather than named elements, and the other machine has a different resolution, display scaling or monitor arrangement. PyAutoGUI handles only the primary monitor, so a script written at a dual-screen desk misbehaves on a single-screen server.
Can an RPA script read text from a scanned document?
Not with PyAutoGUI — its FAQ says OCR is on the roadmap and not implemented. Commercial platforms include OCR, but for scanned invoices a document-extraction API is usually a better fit and considerably less fragile.
How do I stop a script that has gone wrong?
Move the mouse into a corner of the primary screen. The fail-safe raises an exception when the cursor reaches any of the four corners, and the documented tenth-of-a-second delay after every call exists to give you time to do it.
What to do with the result
Remove the typing interval, replace coordinates with named elements, add a retry, an idempotency check and a log. Then decide whether the process is worth automating at all: the RPA ROI calculator does the payback arithmetic, the time waste calculator is quicker if you only want the monthly cost of doing it by hand, and how to build an n8n workflow is the better starting point if a webhook would have done the job.
If you would rather not own and maintain this: building and hardening automations like these is what I do freelance — RPA where there is no API, n8n and Make workflows where there is. You can see the work and hire me on Upwork or Fiverr.

Want this built against your real numbers?
A 30-minute call to scope the workflow, agent, or automation you actually need.
More ai tools
All tools
AI Agent Builder Demo
Sketch a multi-step AI agent in your browser, then test it against the arithmetic that decides whether it survives production: per-step reliability, retries, and how many boxes you can afford to add.

AI Automation Consultant
Chat with an AI automation consultant and get a prioritised strategy for your business

AI Chatbot Builder Demo
Configure a custom AI chatbot, feed it your own FAQs and product information, and have a live conversation with it in the browser — no code and no sign-up.

AI Knowledge Base Generator
Turn any document, FAQ, or email log into a structured AI knowledge base instantly

AI Outreach Message Generator
Generate personalised cold outreach emails and multi-touch follow-up sequences, with a worked rewrite showing what makes a cold email answerable and a note on UK and EU compliance.

AI Voice Agent Cost Simulator
Work out what an AI voice agent costs before you build it. Add up infrastructure, text to speech, the language model, telephony and add-ons per minute, then multiply by your real call volume, and see where the estimate and the invoice diverge.
Have a workflow that's burning hours every week?
Bring me one real bottleneck. I'll tell you whether it's worth automating, and what it would take.