1. GDPR Compliance #
Desktop flows are not GDPR compliant when run Attended or Unattended , due to the debugging data stored in the cloud. These include screenshots and variable content by default. Below is how to make it GDPR compliant. If you still want some of this information for debugging, you can store it locally on the machine instead.
The easiest solution is to create an On block error in your Main subflow. In the error handler, it should run a subflow that does a Take screenshot action, and possibly other debugging you need.
1.1 Screenshots #
One of the reasons is that screenshots are taken for debugging, which are stored indefinitely and may contain sensitive personal data.
For GDPR reasons, you should therefore disable screenshots for the log. This is done from Power Automate, Properties and uncheck Add screenshot to logs as shown. You can optionally create your own Error Handling that takes a picture and saves it locally on the machine, if you still want this.
1.2 Sensitive variables #
In the same log, whether the process fails or not, you can see the input and output for any action. These can, for example, contain sensitive personal data, credentials or anything else you do not want logged, which will then be stored indefinitely in the cloud. You can mark variables as sensitive, and these will be excluded from being logged. You simply click on the icon based on the variable name.
In the debug log, the content of value will become “< Sensitive values> “ instead.
2. Bugs and the like #
2.1 Bug Microsoft Edge – KMD Single Sign-On | Any other redirect links #
At Brønderslev Municipality we have an SSO solution that automatically logs in to, among other things, KMD Opus Role-Based Login, via a link that redirects a few times, and automatically fills in login information. However, in some cases Microsoft Edge manages to attach to the first link, and stops it from automatically logging in, and throws an Exception on the Launch Edge action in question.
A solution to this could look like this in the code where we open the link, under Exception in the first Launch , we set it to Continue flow run . We can then wait a few seconds for it to log in, and then attach to the foreground window in Edge.
It should be noted that it may still fail to attach occasionally, even though it is in the correct screen. This is rare, however, and in such cases the process can usually just be restarted and it will work.
2.2 If window contains #
Unlike regular if actions, in an if window contains you must set continue flow run to error handling . If you don’t do this, the code will fail, as if the robot tries to click on a button that doesn’t exist. Note that this is the only if block you can set error handling on, the rest will behave as normal without any problems.
If the button is not found, it jumps to end, and if the button is found, it will go into the if block .
2.3 Handling variable indexing errors #
There is no debugging for Set Variable actions, which causes processes to crash if you try to set a value that does not exist. This applies to the following scenarios, among others:
- a data row column with a column name/index that does not exist
- a data table with a row index that is out of range, or a column name/index that does not exist
- a list with an index that is out of range
- an object with a key that does not exist in the object
One solution is to use On block error actions, and enable Capture unexpected logic errors . This can catch such errors.
You can also try to mitigate the problem by first checking if there is data. A SQL query comes out as a datatable, and an extended property in this is RowsCount . We can match on that first, and if there are more than 0, you can then try to pull the data out afterwards. If you don’t have this step, it will crash when collecting SQLQuery[0][0] if there is not at least 1 row available ( as a note, you can also not check if Query is empty/blank, as the columns count, and therefore this will not always be the case even if the rows are 0) .
2.4 Cannot create new session to execute unattended run #
The problem can occur when a desktop flow reports completion to a cloud flow , but does not log the user out. This then causes the error the next time a flow is run on the machine, as a user is still logged in to it.
You can try logging the user off the machine and restarting it afterwards. At the same time, you can put it in maintenance mode first, and possibly remove the things that are in its queue, from within https://make.powerautomate.com in your environment.
If it still doesn’t work, it’s typically something with the user profile. You can delete it completely from the machine using the instructions below, restart, and then try again.
Log in to the computer as an administrator, open System and then Advanced system settings .
Under Advanced, select Settings… under User Profiles . Select the profile to be deleted and press Delete – OK – OK and then log off the PC and have the user log back on.
3. General #
3.1 Set screen resolution 1920×1080 for robot driving #
Navigate to the folder – C:\Program Files (x86)\Power Automate Desktop
Open the UIFlowService.exe.config file so that the text can be changed (notepad++ is recommended)
Set ScreenDefaultResolutionEnabled to true , and optionally change Width, Height and Scale if these are not as shown below.
Restart the machine, then it should work.
3 .2 Set the language in Power Automate to English #
In the online version, click the gear in the top right corner, and then Show all Power Automate settings .
In the new window, select English under display language and then United Kingdom under locale .
On Windows machines, under Language add English (United Kingdom ), log out and log in afterwards. Drag and drop this to the top of the list, set Windows language to English (United Kingdom ) and Regional format to Danish. The latter is related to dates, how numbers are written (comma in Danish, period in English), and how PAD ‘s variables react to this.
For example, if you want to report 206,46 kr to one system or another, PAD will send it as 206.46 kr if the regional format is set to English, as number variables inherit the format via the Windows language. In KMD SAP, this cannot be reported, for example, as it only takes comma numbers. You can get around this in the code by converting the number to text, doing a parse and replacing the period with a comma. The point is that you have to be careful if you change the Windows language. .
Alternatively, you can create a reg file that does this automatically, which you can run on the PC instead. This requires a restart afterwards.
Please note that reg keys are required for what you are doing if you want to create one for the purpose . Below is an example .
Copy-pasteable
[HKEY_CURRENT_USER\Control Panel\International\User Profile]
“Languages”=hex(7):65,00,6e,00,2d,00,55,00,53,00,00,00,64,00,61,00,00,00
“ShowAutoCorrection”=dword:00000001
“ShowTextPrediction”=dword:00000001
“ShowCasing”=dword:00000001
“ShowShiftLock”=dword:00000001
“WindowsOverride”=”en”
[HKEY_CURRENT_USER\Control Panel\International\User Profile\da]
“CachedLanguageName”=”@Winlangdb.dll,-1088”
“0406:00000406″=dword:00000001
[HKEY_CURRENT_USER\Control Panel\International\User Profile\en-US]
“CachedLanguageName”=”@Winlangdb.dll,-1121”
“0409:00000406″=dword:00000001