cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerPat
Helper III
Helper III

HTTP Request JavaScript

hi, i have build a Flow with a HTTP Trigger and i want sent a POST Request with JavaScript and a HTML Button on a website:

 

Hiere is my JS Code:


function Start_Flow () {
var req = new XMLHttpRequest();
var url = "https://prod-108.westeurope.logic.azure.com:443/workflows/368a7f24d2a34fc1b08edb3e0cf148f8/triggers/...";

//send https request to Power Automate
req.open("POST", url, true);
req.setRequestHeader('Content-Type', 'application/json');
req.send();

alert("updated");

}

Who and where must i code the HTML Button with the Click event?

Kind regards

1 REPLY 1
ManishJain
Solution Sage
Solution Sage

Hi @PowerPat ,

 

Are you able to make POST call from Postman to this flow ? If yes then what is the problem you are facing ?

 

Thanks

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,483)