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.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs