I have a Power Automate Flow which calls a Desktop flow that includes a step to execute a PowerShell script. Since I'm still developing the script, it sometimes errors. I have a Power Automate action that parses the PowershellOutput variable, emailing me if it failed or not and if it failed, the error text. The first problem is that there are no line breaks in the script output in the email. The second problem is I need to do some string manipulation, such as splitting off unneeded text - that's getting an error that it's expecting a string when it's getting an object.
How to do get the output from PowerShell back to Power Automate as a string (not an object) and how do I put in line breaks for insertion into the body of an email? Maybe I need to do all the string manipulation and addition of line breaks in Power Automate Desktop?


(Please ignore that there is no variable in the condition - it dropped out while I was editing before the screenshot was taken.)