cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Trigger a HTTP Request via URL

Hello, 

Simple question: Can we trigger a Flow by using the HTTP Request URL, in such a way that users click on a button that 'launches' that URL? We were getting an error doing this and I see why - but is there any way of achieving this? 

 

HTTP Request.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Trigger a HTTP Request via URL

Hey @DanielaHo 

 

Here is the link to the published blog: https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Microsoft-Flow-as-a-Service/ba-p/3...

 

Were you able to resove this? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

 

View solution in original post

7 REPLIES 7
Highlighted
Super User II
Super User II

Re: Trigger a HTTP Request via URL

not sure on the correct answer, but you could just give them a button to click instead which is probally the desired approach for such a scenario

Highlighted
Dual Super User III
Dual Super User III

Re: Trigger a HTTP Request via URL

Hi @DanielaHo 

 

Yes! you can definitely do that. Steps: 

1. Use the trigger that you are already using. Don't provide any method (remove the POST from there). 

2. Add the actions and complete the flow based on the requirement. 

3. On the button you can add an http post request and add the URL of the trigger action that is generated. 

4. First try doing this with postman. If you have any input parameters, first add a JSON schema to the trigger and then send the inputs as JSON body. 

Note: whenever the flow is triggered from the external button, it will use the conenction of the user whose connections were used while creating the flow. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Advocate III
Advocate III

Re: Trigger a HTTP Request via URL

Hi 

Thanks so much for your response. Your instructions are helpful in defining how this can be achieved, however I have not been able to get this to work yet... My key issues are regarding point 3: "On the button you can add an http post request and add the URL of the trigger action that is generated. "

 

I should add that i am using the 'HTTP Request' trigger simply as a means to kick off a Flow from a URL/Hyperlink that can be embedded in a button elsewhere. While I understand that simply pasting the Flow URL into a new browser window won't work, I also do not know how to generate a 'post request' that a user can simply 'click' and it runs the flow?

Highlighted
Dual Super User III
Dual Super User III

Re: Trigger a HTTP Request via URL

Hi @DanielaHo 

 

It is like a simple POST request that needs to be made. It is a part of my upcoming content for a blog so I can confirm this works. Here is how to do: 

 

You create and HTML button:

    <button id="sub" name="temp" value="temp" onclick="userAction()">Submit Request</button>

You then use script build the userAction function:

<script> 
const userAction = async () => { const response = await fetch('url here', { method: 'POST', headers: { 'Content-Type': 'application/json' } }); }
</script>

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Advocate III
Advocate III

Re: Trigger a HTTP Request via URL

Hey, 

Awesome thanks for that! 

I'll give this a go. Would you happen to know if this is possible with buttons in SharePoint Online Modern sites?

Also - please share your blog post in this thread when it's published, I'd be keen to read it 🙂

Highlighted
Dual Super User III
Dual Super User III

Re: Trigger a HTTP Request via URL

Hi @DanielaHo 

 

So if it is to be done on the SharePoint List Forms you can do it. I am not sure about how it works on pages (But I am sure wherever theres is HTML, this should work), 

 

The blog is under review on this flow forum and should be published soon. I will paste the URL on this thread once it is available. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Dual Super User III
Dual Super User III

Re: Trigger a HTTP Request via URL

Hey @DanielaHo 

 

Here is the link to the published blog: https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Microsoft-Flow-as-a-Service/ba-p/3...

 

Were you able to resove this? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

 

View solution in original post

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Users online (5,193)