cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
benoitemiel
Level: Powered On

Trigger a Flow from PowerShell

This may not be the preferred way of working with Flow (or should I say Power Automate?) but I would like to trigger a Flow from a PowerShell script.

 

I've found a lot of cmdlets on this https://docs.microsoft.com/en-us/power-platform/admin/powerapps-powershell but none of them can trigger a flow? Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Trigger a Flow from PowerShell

Hi @benoitemiel 

 

I have done this in two different ways in the past.

 

1. Use a "When a HTTP request is received" trigger, and then call the REST endpoint for the trigger from PowerShell. Off the top of my head I the commandlet for this is Invoke-RestMethod, but may be worth a quick search to confirm that.

 

2. Use a SharePoint list (or suitable alternative) as a queue, and then use a trigger based on the SharePoint list. So when I want something to execute, I place an entry into SharePoint, using PowerShell. I can set up my various parameters as SharePoint columns, and I can also include a status column to track progress.

 

Let me know if either of those works for you.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

1 REPLY 1
Super User
Super User

Re: Trigger a Flow from PowerShell

Hi @benoitemiel 

 

I have done this in two different ways in the past.

 

1. Use a "When a HTTP request is received" trigger, and then call the REST endpoint for the trigger from PowerShell. Off the top of my head I the commandlet for this is Invoke-RestMethod, but may be worth a quick search to confirm that.

 

2. Use a SharePoint list (or suitable alternative) as a queue, and then use a trigger based on the SharePoint list. So when I want something to execute, I place an entry into SharePoint, using PowerShell. I can set up my various parameters as SharePoint columns, and I can also include a status column to track progress.

 

Let me know if either of those works for you.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,449)