It's hard to know where to post this question. I really like Power Automate because I can integrate processes within our o365 environment so easily. But I'm not sure how to go about this.
So, I've been using the Python API guide to build some basic code around pulling Portal/Server logs. My goal eventual goal here is to push notifications for greater visibility when things are going wrong (rather than having to log into Server Manager and query logs manually).
The code works as expected, but now the challenge is where & how to execute. I really don't want this to just run locally, with say Microsoft Task Scheduler. On other hand, I'm not sure if Power Automate offers any ability to execute Python code.
Has anyone else crafted a similar solution for pushing Server/Portal logs?
Solved! Go to Solution.
Good Morning @ZacharyHart
Power Automate does not offer a way to easily execute Python in its framework. Here is a link to a post in Microsoft's community where a user is asking a very similar question in regards to calling Python logic from Power Automate.
Where I have seen Python used in conjunction with Power Automate is when the Python logic is deployed as an Azure Function. In those situations, they were expecting input variables and would return a response with information to be used in the downstream actions of the Flow. In theory you could do the same with a scheduled Flow and call your logic and check for the status of the function in case it runs longer than the two minute time limit actions have within Power Automate.
Not sure if it is the best solution, but it is an option to accomplish what you are looking to do.
Good Morning @ZacharyHart
Power Automate does not offer a way to easily execute Python in its framework. Here is a link to a post in Microsoft's community where a user is asking a very similar question in regards to calling Python logic from Power Automate.
Where I have seen Python used in conjunction with Power Automate is when the Python logic is deployed as an Azure Function. In those situations, they were expecting input variables and would return a response with information to be used in the downstream actions of the Flow. In theory you could do the same with a scheduled Flow and call your logic and check for the status of the function in case it runs longer than the two minute time limit actions have within Power Automate.
Not sure if it is the best solution, but it is an option to accomplish what you are looking to do.
Thanks Sean. I'm going to mark this as the solution and have a takeaway of 'its complicated...', hah!
So I have been looking into Azure Functions but never at this depth. My next concern is what Python environment is available in Azure and what Python library's can be used (like the ArcGIS Python API) itself.
Thanks for the detail response.
Z
@ZacharyHart Have you thought about using the HTTP action and interacting with ArcREST to pull logs and parsing?