Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Saving information to SharePoint List using Button Webpart and "When an HTTP request is received"

(0) ShareShare
ReportReport
Posted on by 9
I really don't know that much about PowerAutomate and very little about coding.  Everything I have figured out has been through searches, forum posts and trial/error.
 
Here is what I am trying to do:
- I have multiple pages in SharePoint.  
- At the bottom of each page I want to include a webpart button that acts as an attestation (e.g. "By clicking this button I have read this page").  
- When a user clicks on that button, I want to record in a SharePoint list
A. The current date/time
B. The user's username
C. The URL (or some kind of identifier) for the page the button was located on. Each page would have its own identifier.
 
I have A and B working, but can't figure out C.
 
Here is what I have done:
1. Set-up a Page in SharePoint ("Page1.aspx")
2. Set-up a List in SharePoint ("Completion Tracking" with columns "Title"; "Completion Date", "Username", and "Referral Page")
3. In PowerAutomate defined the trigger "When an HTTP request is received" with GET method
0001.png
0002.png
4. Added step "Get my profile (V2)"
5. Added step SharePoint "Create item" and configured it for the "Completion Tracking" list to
a. Add "guid()" function to "Title" column
b. Add "utcNow()" to "Completion Date" column
c. Add "displayName" to "Username" column
0003.png
6. When I save my flow, the HTTP GET URL is generated
7. I add that URL to the webpart button on the SharePoint "Page1.aspx" page
0004.png
 
8. When I click on the button, the flow is triggered, and data is written to the SharePoint "Completion Tracking" list.
0005.png
 
All of that works just fine.
 
For the "Referral Page" column data, I was hoping that either:
A. I could somehow get the URL of the referral page.  But I don't know if that information is even being passed along with the GET request when the user clicks on the button webpart. OR
B. Then I was hoping to figure out if I could add a variable to the HTTP GET URL in the webpart button (e.g. https://xxx.azure.com/workflows/xxxx/invoke?api-version=yadayada?ReferralPage=Page1 where Page1 is my page identifier) so I could grab the "Referral Page" value and submit it to the SharePoint List through the "Create item" step in Power Automate.
 
I have hit the wall. Any suggestions how I can get this done?  Next question -- the page that loads after the button is clicked is a blank page.  Any suggestions on getting that page to auto close or adding a message to the user to close the page?
 
Thanks.
  • TP18 Profile Picture
    165 on at
    Re: Saving information to SharePoint List using Button Webpart and "When an HTTP request is received"

    @Hello @geissler 

     

    You could pass page name in url of http trigger like below and try to modify the url with actual page name and use in button.

     

    TP18_0-1709824721328.png

     

    And if you want to redirect user to another page or message ,try it in response

     

    TP18_1-1709824789830.png

    <script>location.href='url of your page'</script>

     

     

    Thanks.
    Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
    This helps others find solutions to future issues!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics

Restore a deleted flow