Search code examples
power-automaterpa

Using Power Automate, how do you read a "Flow variable" into a Python Script


Using Microsoft Power Automate Desktop (PAD), I have captured a moderately long string called ExtractPDFText. I can display the text in a message window, now I need it to run through Python Script.

In the Power Automate Desktop application's python input box I am just trying to get it to run this:

x = str(%ExtractedPDFText%)
print("work")

But it keeps returning an "unexpected token"

enter image description here

How should I be reading this variable? I tried with and without the str() function.


Solution

  • Try wrapping in the string in quotation marks