web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
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:
I have the same question (0)
  • 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,656 Super User 2025 Season 2 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,656 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard
Loading complete