cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brmdaniels
Level: Power Up

Trigger a PowerShell Script in Flow when Receiving an Email

Hello, 

I'm looking to create a Flow that will run a PS script (On prem or in Azure) when an email is received. The email would come from a certain user and would contain a phrase in the subject. If this is not possible what about using a Button to trigger a PS script? In that case I would like to share that button with a user. Thanks in Advace! 

 

1 REPLY 1
Super User
Super User

Re: Trigger a PowerShell Script in Flow when Receiving an Email

First, there is no way to expose a button in Flow since it runs in the background. There is also no way to invoke PowerShell in an on-premises environment from Flow.  Flow runs on the server in the cloud and you need to invoke the script on a computer in the on-premises environment. I have read that you can create an Azure Function that can invoke PowerShell.  You could then invoke that function from Flow.  Here's an article on how to create an Azure function to invoke PowerShell.

https://www.cyberdrain.com/mini-blog-how-to-use-azure-functions-to-run-powershell-scripts/



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 53 members 3,395 guests
Please welcome our newest community members: