PyPowerAutomate is not affiliated with Microsoft Corporation.
PyPowerAutomate is a Python package designed for creating, managing, and deploying Microsoft Power Automate Flows programmatically. This library provides a simple and efficient way to define Power Automate Flows in JSON format directly from Python code. Whether you're an automation expert, a developer looking to integrate Power Automate into your Python projects, or an enthusiast exploring the realms of workflow automation, Power Automate Library is your go-to tool.
- Flow Creation: Easily define and create Power Automate flows in JSON format.
- Package Creation: Easily create a legacy package that could import to Power Automate Platform
- Customization: Tailor your flows with dynamic parameters and custom logic.
- Compatibility: Seamless integration with existing Power Automate infrastructure.
To install PyPowerAutomate, run the following command in your terminal:
pip install PyPowerAutomate
Here's a simple example to get you started:
from pypowerautomate.flow import Flow
from pypowerautomate.triggers import ManualTrigger
from pypowerautomate.actions import InitVariableAction,IncrementVariableAction,VariableTypes
from pypowerautomate.package import Package
flow = Flow()
flow.set_trigger(ManualTrigger("Button"))
flow.add_top_action(InitVariableAction("action1","a",VariableTypes.integer,1))
flow.append_action(IncrementVariableAction("action2","a",2))
package = Package("incremental_test",flow)
package.export_zipfile()
This example creates manual trigger and 2 actions. Then export the flow as lagacy package(zip file).
You can import the flow by uploading incremental_test.zip
to Power Automate.
- Manual Trigger
- Schedule Trigger
- Variable
- Conditionals
- Loops
- Data Operetions
- Time
- HTTP (requires Premium subscription)
Currently, PyPowerAutomate supports following connectors.
Documentation of PyPowerAutomate
Thank you for considering contributing to this project! We welcome all contributions, from minor fixes to major features. To ensure effective and smooth collaboration, please follow these guidelines:
-
Check and Open Issues: Before contributing, please check if there are existing issues on GitHub related to your problem or suggestion. If not, open a new one and share the details.
-
Pull Requests: If you want to make changes, first fork the repository, create a branch for your topic, and then submit a pull request. In your pull request, clearly explain what changes you made and why.
-
Code Review: The project maintainers will review your pull request. If there are any comments, please respond to them actively.
We aim to provide all contributors and maintainers with a safe and positive experience. Therefore, we ask you to follow this code of conduct, which is based on the Contributor Covenant:
-
Respect Each Other: Treat everyone working on the project respectfully, regardless of background.
-
Promote Inclusivity: Actively promote inclusivity and welcome diverse perspectives.
-
Maintain a Harassment-Free Environment: Avoid any behavior seen as harassment and maintain a harassment-free environment.
PyPowerAutomate is licensed under the BSD-3-clause license. See LICENSE for more details.
Happy Automating! 🚀