Skip to main content
Community site session details

Community site session details

Session Id : 6tlZ3rnldG1TXigIM/GcdD
Power Automate - Power Automate Desktop
Answered

How to Run python commands in power automate desktop?

Like (0) ShareShare
ReportReport
Posted on 21 Mar 2022 10:42:05 by 178

Hi all, Please explain the steps how to run python in power automate desktop?

Categories:
  • rifij Profile Picture
    17 on 15 Jul 2024 at 20:25:01
    Re: How to Run python commands in power automate desktop?

    Afternoon,

     

    @VJR @Ahammad_Riyaz I'm trying to run a python script in PAD for a Flow. Essentially, the script goes into an input folder that contains pdf files, does a text read for certain accounts and extract those accounts to a new pdf file while renaming and saving to output folder. I've run the script successfully in visual studio code and works as written/expected. I want to be able to add a flow by having the flow go to the output folder and retrieving the files and then sending emails to impacted parties. I tried using the "Run Python Script" in PAD, but I'm getting a syntax error after pasting the script and I'm not sure why I get that error, because i did not get the error in visual code studio.

  • Riyaz_riz11 Profile Picture
    3,486 Super User 2025 Season 1 on 21 Mar 2022 at 12:40:14
    Re: How to Run python commands in power automate desktop?

    Hi @VJR ,

    I was already told last time it was happens from my end and even i told thanks as well for correcting me, but these things i was not acceptable what you told today.

    If he accepted also you are point outing me, it is unprofessional.

     

  • VJR Profile Picture
    7,635 on 21 Mar 2022 at 12:07:08
    Re: How to Run python commands in power automate desktop?

    Okay, looks like you do not want to use a direct approach given by Power Automate Desktop. 😊

    Please remember solutions marked as answer will be used by many members landing on this page and may not see the feature given by PAD. Hence my request.

    Good day!

     

    And yes, my apologies to @Ahammad_Riyaz 😊

  • Ezhilvannan_V Profile Picture
    178 on 21 Mar 2022 at 12:02:43
    Re: How to Run python commands in power automate desktop?

    Hi @VJR 

    I am the one accept the solution , I was tested from my end and its working for me, it is not accepted by @Ahammad_Riyaz  🙂

  • VJR Profile Picture
    7,635 on 21 Mar 2022 at 11:54:59
    Re: How to Run python commands in power automate desktop?

    @Ahammad_Riyaz , request you to please wait for the original poster before marking as solution.

     

    Hi @Ezhilvannan_V 

     

    There is a direct action to run python script.

    VJR_0-1647863520651.png

     

     

    In the above code, output is stored in the output variable called PythonScriptOutput.

    VJR_1-1647863592689.png

     

     

  • Verified answer
    Riyaz_riz11 Profile Picture
    3,486 Super User 2025 Season 1 on 21 Mar 2022 at 10:47:36
    Re: How to Run python commands in power automate desktop?

    Hi @Ezhilvannan_V ,

    Ahammad_Riyaz_0-1647859535025.png

    Here working folding defines you need to pass working folder.

    in the dos command you need to provide python file name.py and if you required to pass any inputs you can pass after passing filename.

     

    Regards

    Ahammad Riyaz

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1