Showing results for 
Search instead for 
Did you mean: 
Level 10

Using from Command prompt to Microsoft Flow with PowerShell command

Command prompt can using Microsoft Flow with PowerShell, and Request trigger.


1. Create a flow with 'Request' trigger.1.png





2. Copy the "HTTP POST URL" of the trigger.


3. Replace "&" to "^&" in the HTTP POST URL for escaping "&".


4. Use the flow by command prompt.


PowerShell -Command "& {$URI = \"...\"; $body = ConvertTo-JSON @{text  = 'Hello World cmd'}; Invoke-RestMethod -uri $URI -Method Post -body $body -ContentType 'application/json'}"

5. Set $URI to the HTTP POST URL of request trigger of the Flow.


My scenarios:

- Post some outputs to Microsoft Teams using Microsoft Flow from Command Batch.

- Send messages by Outlook using Microsoft Flow from Command Batch.



Yoshihiro Kawabata





Level: Powered On

Re: Using from Command prompt to Microsoft Flow with PowerShell command

when a FLow trigger happens I just want to run a command line entry. Specifically I want to launch a Macro that is in MS Access



C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.exe "C:\Users\schastee\OneDrive - Nokia\Escalation Management DB\Escalation Management.accdb" /x UpdateMEDB



I am NOT a developer just a individual trying to make my life easier 🙂 

Level 10

Re: Using from Command prompt to Microsoft Flow with PowerShell command

Thank you @schastee


Yes, Some scenarios need to run command line entry by Microsoft Flow.

and I hope it,


There are some person,

who do it by Create a new file by Microsoft Flow,

and Run a command line entry when a new file are created by PowerShell.


To do this, person may need some developer, and PowerShell skill.



Yoshihiro Kawabata

Helpful resources


Power Automate Community User Group Member Badge

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


Incoming: New and improved badges!

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


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 173 members 5,671 guests
Recent signins:
Please welcome our newest community members: