DEV Community

shadowb
shadowb

Posted on

10 1

How to run python3 using Power Automate Desktop.(Step Wise Guide)

Hi Folks, This blog is about how can we run a python3 script using Power Automate.
As of now, Power Automate desktop supports Python 2.7 which has limitations.

Prerequisites :
1 - You need to have PAD installed. (obviously)
2 - Python3

Step 1 - Create A flow with any Name that you like.

Step 2 - Go to Action and search for "Open CMS Session".

Step 3 - Inside that give the current working directory as a Parameter.

Image description

Step4 - Again search for "Write to CMD Session" in actions and drag it under "Open CMD Session"

Image description

In "Write to CMD Session" give the command to run your python3 script.
example: cd.\PyProjects&& cd.my_script.py

Image description

Step 5 - Now again go to Actions and search for "Read from CMD Session" It will help you to see the output that is displayed on CMD.

Image description

Image description

As the Parameter just pass the instance of "Open CMD Session"

Now Save and Test your flow.

If you face any problem feel free to comment your questions.

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay