Day 5 - Advanced Topics and Optimisation

Make your automations reliable and quick: handle errors, retry steps, mark steps that can't be undone, wait smartly, reuse sub-processes and check a process is ready for production.

Help Centre › Getting Started

Today you make your processes ready for real work: they cope with errors, run quickly, and are built from parts you can reuse.

1. Building reliable automations

Even a well-tested process can fail: a slow website, a renamed button, a missing file. A reliable process doesn't just work; it recovers when something goes wrong.

Common kinds of failure:

KindExample
SystemAn app crashes, a file is missing
Business ruleAn invoice amount isn't valid
Element not foundA button moved or was renamed
TimeoutA page took too long to load

2. Handling errors

Retry, carry on, or try only once

Open a step and look at its Error handling section:

  • Max retries (up to 5), Delay and Backoff: try again when a step fails for a moment, such as a slow page. Business-rule failures are not retried.
  • Continue if this step fails: once retries are used up, log it and go on to the next step.
  • Can't be undone: for a step that submits a form, makes a payment or changes another system. The bot tries it only once, and the item it was working on is not retried automatically if something fails afterwards. This stops the same payment being made twice.

More: Retries and continue-on-fail.

Exception paths and Try-Catch

  1. Pick a risky step, such as "Click Submit".
  2. Draw a second connection from it to a recovery step (for example "Log message", "Raise an error" or "Show notification"). Make sure its type is EXCEPTION.
  3. If the recovery loops back to try again, set a Maximum on that connection so it can't loop forever.
  4. End cleanly, or return to a known state.

To protect a group of steps at once, put them in a Try-Catch. See Error handling and Try-Catch.

Tip: log what failed and where, but never names, ID numbers or amounts.

Exercise: an error path

  1. Open your Calculator process.
  2. After launching Calculator, add a Decision: if the Calculator window doesn't exist, log "Calculator failed to open" and end.
  3. Give the "Click Equals" step an EXCEPTION connection to a Log message step: "Calculation failed".
  4. Test it by closing Calculator during a run.

Success: the process logs the failure and ends cleanly instead of stopping with an error.

3. Making it quicker

  1. Remove steps you don't need. Delete repeated clicks and fixed waits, and unused variables.
  2. Wait smartly. Each connection has a Wait. "Exactly 5 seconds" always waits 5 seconds. "At most 10 seconds" lets the next step go as soon as its button or window appears. Use short waits between steps in the same app, and "at most" where you wait for something to load.
  3. Check before you act. Steps such as Check if element exists or Check if window exists, followed by a Decision, are better than long pauses.
  4. Load only what you need. Filter data before you loop over it.
  5. Reuse. Build sign-in, file handling and email sending once, as sub-processes.

Exercise: speed a process up

  1. Open a process that uses long fixed waits.
  2. Between steps in the same app, cut the connection wait to about 0.2 seconds.
  3. Where you wait for a window or page, set the connection to wait at most 10 seconds, and add a "Check if window exists" step.
  4. Remove duplicate clicks and unused variables.
  5. Run it again and compare the time in the Runs tab.

Goal: the process runs faster and just as reliably.

4. Reusable parts

A sub-process is a process run from inside another one, such as "Sign in to system", "Read Excel data" or "Send notification email". Fix it once and every process that uses it gets the fix.

  • Add one from the Add step tab: drag Sub-process onto the map and pick the process.
  • To turn steps you already have into a sub-process, select them, right-click and choose Split out.
  • For a few steps you copy often, right-click and choose Save as Snippet. Snippets appear in the Add step tab.

Tip: keep shared sub-processes together in their own folder in the Library, so people can find them.

Exercise: reuse a sub-process

  1. Record a process called Open Calculator that opens Calculator and checks it is open.
  2. Open your main calculation process.
  3. Add Open Calculator as a sub-process at the start.
  4. Run it and check both run in order.

5. Ready for production?

AreaCheck
ReliabilityIt runs without failing on normal data.
Error handlingRisky steps have retries, exception paths or a Try-Catch. Steps that can't be repeated are marked Can't be undone.
SpeedNo long fixed waits.
DataNo hard-coded paths or values; missing values have fallbacks.
TargetsButtons and fields are found reliably after app updates.
DocumentationThe process and its steps have clear names and descriptions.
EnvironmentIt was tested before being promoted (see Day 2).

Tip: ask a colleague to review the process before it goes live.

6. Final challenge: invoice processor

Build a process that uses everything so far:

  • Read invoice data from PDF files in a folder (a loop).
  • Enter each invoice into a website or app.
  • If the amount is over 1000, mark it "High value" (a formula or a Decision).
  • Save the results to a new Excel sheet.
  • Handle missing files and bad data without stopping.
  • End with a Log message: Process completed: {CountSuccess} successful, {CountFailed} failed.

Optional: read names from Excel, draft an Outlook email to each, and record the result back in Excel.

7. Good habits

  • Build for change. Avoid hard-coded paths and fragile targets.
  • Fail gracefully. A failed step should log, recover and move on.
  • Keep it readable. If someone else understands the map at a glance, it is well built.
  • Watch it after go-live. Check the Runs tab for failures and slow runs, and improve the busiest processes first.
  • Note your changes. The Changes tab keeps every version; add a note when you promote.

End of Day 5 summary

You should now be able to:

✅ Handle errors with retries, exception paths and Try-Catch
✅ Mark steps that can't be undone
✅ Speed up a process with smart waits
✅ Build and reuse sub-processes
✅ Check a process is ready for production

Next step (Day 6)

Learn about governance, scheduling and monitoring: who may change what, running processes on a schedule, and keeping an eye on them.
Next

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.