Back to all blogs

Power Apps

Can PowerApps Run Python Script?

By

Sam Mitrovic

Microsoft PowerApps is a versatile platform that enables users to build custom business applications with minimal coding. As organisations seek to leverage more complex data manipulations and integrations, a common question arises: Can PowerApps run Python scripts?

Key Facts

  • No Native Support: PowerApps does not natively support running Python scripts within its environment.
  • Workarounds Available: Integration can be achieved using workarounds such as Power Automate, Azure Functions, and custom connectors to run Python scripts.
  • Enhanced Functionality: Leveraging Azure services and Power Automate allows the integration of Python’s advanced data processing capabilities with PowerApps, creating more powerful and functional applications.

PowerApps and Python: The Basics

PowerApps is designed primarily for rapid application development with a focus on low-code solutions. It excels in connecting to various data sources and offering robust functionality through its built-in features and connectors.

Python, on the other hand, is a powerful programming language widely used for data analysis, automation, and backend development. Integrating Python scripts with PowerApps can potentially enhance the capabilities of your applications.

Direct Integration: Not Available

  • PowerApps does not natively support running Python scripts within its environment.
  • The platform is built to work with Microsoft’s Power Platform tools, such as Power Automate and Power BI, for extending functionality.

Workarounds and Alternatives

While direct integration is not available, there are several ways to incorporate Python’s power into your PowerApps applications:

Using Power Automate

  • Create a flow in Power Automate: Connect your PowerApps to a Power Automate flow.
  • Call Azure Functions: Use an Azure Function to run your Python script and return results to PowerApps [1].

Leveraging Azure Services

  • Azure Logic Apps: Create a Logic App that triggers a Python script stored in an Azure Function.
  • Web APIs: Develop a web service in Python, deploy it on Azure, and call this API from PowerApps.

Third-Party Integrations

  • Custom Connectors: Build a custom connector in PowerApps to communicate with external services running Python scripts.
  • API Management: Use API Management to expose Python-based services and integrate them seamlessly with PowerApps.

Practical Example

Consider an application that requires complex data processing not feasible within PowerApps alone:

  1. Build a Python Script: Develop a Python script that performs the necessary data processing.
  2. Deploy as an Azure Function: Host the script as an Azure Function.
  3. Integrate with PowerApps: Use Power Automate to trigger the Azure Function and retrieve processed data.

The Bottom Line

While PowerApps does not support running Python scripts directly, various workarounds enable you to harness Python’s capabilities. By leveraging Azure services and Power Automate, you can create powerful, integrated solutions that extend the functionality of your PowerApps applications.

Sam Mitrovic

About the author

Sam Mitrovic is the Founder and Director at CloudJoy. Sam is a marketer, builder and IT consultant. He has consulted large government organisations, venture backed start ups and everything in between.