cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DanielaHo
Advocate IV
Advocate IV

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

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
Resident Rockstar
Resident Rockstar

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

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!

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?

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!

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 🙂

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!

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!

 

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,463)