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

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
Super User
Super User

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
Gristy
Level 10

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

Super User
Super User

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!

DanielaHo
Level: Powered On

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?

Super User
Super User

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!

DanielaHo
Level: Powered On

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 Smiley Happy

Highlighted
Super User
Super User

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!

Super User
Super User

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
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!

Users Online
Currently online: 376 members 5,105 guests
Please welcome our newest community members: