web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : cGcSdKJKFpI6BfQWF7jH8M
Power Automate - Using Flows
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 13 Feb 2024 16:17:24 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.
I have the same question (0)
  • TP18 Profile Picture
    165 on 07 Mar 2024 at 15:21:20
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 954 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 650 Moderator

#3
trice602 Profile Picture

trice602 327 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow