Would anyone know what is the approach to call Python application/script (which relies on imported libraries like pandas) from Microsoft Flow?
The complete problem is like this. Client uploads something to Dropbox (it is how his ERP works). This action is linked to our Microsoft Flow so whenever he uploads it, Microsoft Flow registers it (now it just redirects it to us). What I need to do after is run the Python application/script on that file in Dropbox after he uploads it. I can put my Python directly into that Dropbox. What I do not know is how to trigger it and ensure it runs (is interpreted).
Thank you for any suggestions.
You can bind the python script inside azure function and you can use flow to pass input to the azure function. The flow will call the azure function API and processing will be performed and the result will be returned back to flow.
These actions enable users to run blocks of code and implement custom behavior in Power Automate. All scripting actions follow the basic structure of the respective programming or scripting language: PowerShell, Python, VBScript, and JavaScript.
A Python script to automate uploading to Sharepoint Python scripting is a great way to automate many processes that you use daily such as updating an excel spreadsheet with data from an API, sending out daily PDF reports, or uploading files to a google cloud.
To execute any code locally from MS flow, install and configure On premises gateway as per the instructions in the below link
https://docs.microsoft.com/en-us/flow/gateway-reference
Create a flow to copy the new file from dropbox to the local filesystem
Create a watcher to the local directory for any new file creation and execute the python code for the new file.
Refer the below link for the powershell script execution. Similar process can be designed for python
https://flow.microsoft.com/en-us/blog/flow-of-the-week-local-code-execution/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With