Updated with partial solution.
I found that by using the trigger "When an HTTP Request is received" I can paste that URL into my button. Cool. Now I just need to figure out how to get the data from the person pressing the button.
- - - - - -
My thought was to create a flow in PowerAutomate so when a button is pressed it sends a pre-scripted email from the person pressing the button. The directive is to confirm that someone has reviewed the page.
I've tried using Manually Trigger a Flow but, even though I was able to get the URL for this button, it needs to open another page to 'run the flow'.
I was also thinking about creating a Form to trigger this process but having the whole form on a page is not ideal.
I've also considered creating a power app to embed on the page but I'm not sure about all that.
@Expiscornovus I have tried your method and it's very nice but I have a question, when you click the button it opens a blank page to the user with the URL we have entered can we put a note or a message inside just not to confuse the user of what's this.
And thank you for your effort.
Nice. This little code snipet really made a huge difference. Thank you for the help.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"hideColumnHeader": true,
"hideSelection": true
}
Hi @anthonys123,
Yes, that would probably be the easiest approach for retrieving the emailaddress of the current person without any coding. That's why I suggested this approach to you.
But you are right, it would not be exactly the same as that other thread.
You do need to change it to your specific setup/requirements 😁
Btw, you can place a list web part on a page and with column & view formatting you can format it as a single button (if you just use a single item in the list).
Below is an example which hopefully clarifies why I think this approach is still suitable for your situation.
1. I create a list called Single Button Click, only with the title column. Add one list item to it. Does not matter what title value you use. We are going to reformat it anyway with the txtcontent button in the column formatting.
2. Add column formatting to the Title column. Use the json below.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"style": {
"border-radius": "5px",
"margin": "5px 0px",
"padding": "0px",
"visibility": "visible"
},
"attributes": {
"class": "ms-bgColor-themePrimary"
},
"children": [
{
"elmType": "a",
"txtContent": "Click Me",
"style": {
"text-decoration": "none",
"padding": "10px 0px",
"width": "100%"
},
"attributes": {
"href": "='https://prod-30.yourregion.logic.azure.com:443/workflows/workflowguid/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=randomsig&username=' + @me",
"target": "_blank",
"class": "ms-fontColor-white"
}
}
]
}
3. Add view formatting to the All Items view (to hide the column headers and selection options). Use the json below
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"hideColumnHeader": true,
"hideSelection": true
}
4. Place the list web part on the page and make sure you select your List and hide all the controls
The end result should look something like below on a page.
That being said, obviously feel free to go down the deploy custom web part with javascript approach, if you feel comfortable coding. And the above is still not what you are looking for?
I'm sorry if I'm not understanding... you are offering a solution for a LIST when I'm asking about a PAGE and you already know that the solution for one is not the same as the solution for the other?
Hi @anthonys123,
Yes, that is correct. In that other thread I originally proposed a button via column in the list (via column formatting and the '@me' string value). That's also what I am suggesting for you 😀
However, the poster in that other thread asked if it was also possible to just have a single button instead of embedding it into the list (new requirement).
That's why in the end of the thread you see the discussion about a different approach to meet that new requirement 😁
So, am I correct in understanding the solution you're providing is for a SharePoint List? It looks like at the bottom of that thread you've directed them to a script editor to add a button to a Page.
Hi @anthonys123,
Recently I suggested a similar type of approach in this thread:
You could add parameters at the end of your URL (&customparameter=value) which can be retrieved within the flow via an expression like:
triggerOutputs()['queries']['customparameter']
Michael E. Gernaey
179
Super User 2025 Season 1
David_MA
161
Super User 2025 Season 1
stampcoin
143