Skip to content

Run TagUI scripts from Power Automate Desktop

This post is based on the video by Ken Soh (developer of TagUI) explaining how to use Microsoft Power Automate Desktop in conjunction with TagUI for 2-way integration. All praise Ken Soh.

TagUI is a powerful RPA tool that can create useful RPA robots with only a few lines of code.

The video on this page shows how to use a Power Automate flow to run TagUI scripts based on a selection from a dropdown list.

If you like it can be used as a front end for TagUI scripts rather than working from the CLI although the TagUI MS Office plugin helps here too.

3 scripts are be called from the Power Automate dropdown.

Write Data to a TXT file
// create variables to store data -> example.txt

name1 = "Andrew Red"
company1 = "VerdaPress"
name2 = "Joseph Smith"
company2 = "Smith Consulting"
name3 = "Helen Jones"
company3 = "Jones Limited"

//write data to file

write `name1` from `company1` to example.txt
write `name2` from `company2` to example.txt
write `name3` from `company3` to example.txt

Snapshot a Web Page
//can also capture based on dom, xpath, region, image identifiers -> websnap.png


snap page to websnap.png

Get Table Data
//write data to CSV -> web_info.csv

read /html/body/div[3]/main/div/div[3]/article/div[1]/h2 to heading1

read /html/body/div[3]/main/div/div[3]/article/div[1]/p[1] to description1

heading2 = "Samples - RPA Workflows"
description2 = "Create robotic process automation with sample workflows."

write `csv_row([heading1, description1])` to web_info.csv
write `csv_row([heading2, description2])` to web_info.csv

Video: Running TagUI from Power Automate Desktop


Download project scripts

Power Automate Actions

The Actions used in this flow include:

Display Select - this displays a drop down to select the TagUI Scripts.

A Switch Case action was added to ensure the selected script runs the appropriate .tag file.

Each tag file is run from a subflow

Each command script is called from a DOS command prompt action.

And that's about it. Lots more could be done with this but it's a start.

TagUI Set up in Power Automate

If you require support or help check out our services page.