Forum Discussion
self-training site in SharePoint
DonH Okay! I think I get where you're getting at. Let me know if this works for you.
1) We're going to set up a column in your training document library labeled "Training Complete" or something like that.
2) We will then format the column and using "Advanced Settings" use this JSON :
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"style": {
"background-color": "#0078d4",
"color": "white",
"padding": "6px 12px",
"border-radius": "4px",
"cursor": "pointer"
},
"txtContent": "Confirm Training Completion",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"Insert your Power Automate ID here\"}"
}
}
Your Document Library should now look like this:
3) Moving on to the second part of this, we will need to create a Power Automate Flow, this flow will basically see the document your button is clicked on and send an email to your designated trainer.
4) 1st step is to use the For a Selected File "Trigger"
5) Then "Get files (properties only)"
6) Send an email V2: Here you can set what you want your email to have. Make sure to use "fileName" that comes from "For a Selected File" or else you're not gonna have a fun time as it will make a for each loop.
7) At the end the flow is pretty simple and it should look like so.
8) Going back to step number 2 where it says "Insert your Power Automate ID here" you will be able to find that in the URL of your flow, you want everything in between the / and the ?, so it should look like this:
29fe047f-6ac3-492a-a59a-12390d9a192c
9) Once you plug that in, save your Flow and make sure you enable "Run only users", this allows for anyone on the SharePoint site to run the flow.
10) Always make sure to test everything, so click on that "Completed training" button in the Document Library.
Your end email should look something like this:
Hope this gets you what you're looking for! 😁