Forum Discussion
Python optimizer / PowerApps / Automate
Hi all,
My use case is as follows: given user input (a single monetary value), I would like to optimize a set of given items.
My initial thoughts are:
1. Build a PowerApps app + connect in powerbi, that just takes user input
2. Connect to Flow -- when user input received, execute Flow (power automate)
3. This Flow will in turn run a python file that calls an optimizer library (PuLP) -- based on the input variable, and constraints, selects items that maximize that input. This may be possible using Azure Function API?
4. Then the result of that py file is sent back to Flow, and then back to powerapps somehow...
I am fairly new to powerapps / powerbi, so I'd like to get your suggestions. Is this a feasible approach highlighted above?
- Anonymous5 years ago
HI Anonymous,
#1, You can create PowerApps with parameters, then they allow you to input parameters.
Launch and Param functions in Power Apps
#2, Please check the following link about use PowerApps with ms flow.
#3, You can do these with Azure functions, you can take a look at the below link to know more about these.
Create your first function in the Azure portal
#4, You can refer to the following blog about invoke the Azure function in flow:
Invoke an Azure Function Using Power Automate (Flow)
Regards,
Xiaoxin Sheng
- Anonymous5 years ago
Hi Anonymous,
Sorry for the late response. Did you mean to use python to connect/manage Azure VM? If that is the case, you can refer to the following documents:
Create and manage Windows VMs in Azure using PythonReference link about azure function network operations:
Azure Functions networking options
Regards,
Xiaoxin Sheng
17 Replies
- AnonymousNot applicable
HI Anonymous,
#1, You can create PowerApps with parameters, then they allow you to input parameters.
Launch and Param functions in Power Apps
#2, Please check the following link about use PowerApps with ms flow.
#3, You can do these with Azure functions, you can take a look at the below link to know more about these.
Create your first function in the Azure portal
#4, You can refer to the following blog about invoke the Azure function in flow:
Invoke an Azure Function Using Power Automate (Flow)
Regards,
Xiaoxin Sheng
- AnonymousNot applicable
Hi Anonymous ! Thanks for the great help!
Sorry about delay -- I am trying to do step3 and having this issue
"One or more errors occurred. (Error while copying content to a stream.)"
I followed step by step -- i am logged into az, I am using their HTTP Example, but still nothing worked. If you know of a fix for this, I'd appreciate it -- I will keep you updated. thanks again.
- AnonymousNot applicable
It fails at this command: func new --name HttpExample --template "HTTP trigger" --authlevel "anonymous"
- AnonymousNot applicable
is there a way to avoid powerapps ?
- AnonymousNot applicable
Hi Anonymous,
So you mean you want to directly use ms flow to invoke python script and azure functions without power app?
If this is the case, you can directly use ms flow to do these things without the power app. The first two steps not necessary in these operations, you can avoid them and only use ms flow.
Regards,Xiaoxin Sheng