web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Python Indentation Iss...
Power Automate
Answered

Python Indentation Issue | PAD

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

I am using the Python script in my automation. There is always an indent issue every time I open the PAD Application. So I need to fix it before every time my automation run.

 

Vinothini_0-1648530656151.png

 

A similar problem, I am facing with Email content

 

Vinothini_1-1648531191038.png

 

 

Kindly assist me with this.

 

Thanks!

Vinothini Karumbayiram

I have the same question (0)
  • Verified answer
    Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 1 on at

    Hi @Anonymous ,

     

    Better try to pass this data in a text file like demo.py

    and run the file using run dos command

    In run Dos command you  can run python script as well.

     

    So you will not face indentation error

    Ahammad_Riyaz_0-1648538323470.png

     

    same here you need to change working folder path as well 

    In run dos command you need to pass python or py after filename demo.py

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yeah! it's working @Ahammad_Riyaz Thank you!!!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Ahammad_Riyaz , Your solution is helped me & solved the problem in the previous machine. But now after changing my laptop I ran the same Workflow, the Run DOS command action opens the Python file (visibly) instead of getting output from it. Can you please assist me on this?

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 1 on at

    Hi @Anonymous ,

    You need to install python and package as well.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Ahammad_Riyaz, I have installed it already

    Vinothini_0-1649394985980.png

     

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 1 on at

    hi @Anonymous ,

    if possible you can create new ticket, because it will solved, so no one looks, better create new one so many are there to help you.

    Try to run from here.

    Ahammad_Riyaz_0-1649395174932.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yeah! Will do the same. Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Ahammad_Riyaz it's my mistake, I have typed DOS Command as "<python_name.py>" instead of "python <python_name.py>"

    Your solution is working fine.

    Thanks!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard