Forum Discussion
DonH
May 15, 2025Copper Contributor
self-training site in SharePoint
I feel I did my due diligence in searching for an answer but nothing lined up with what I think I would like.
I would like to set up a self-paced training site where we have links to documents or slide decks. That part is easy enough. I would like to have a 'button' (or some mechanism) for users to notify the training coordinator that they have read the material.
This doesn't need to be initiated through a task (i.e., in a List), it could be just because someone wants to train. (It could be directed by the training coordinator but just an email to them to go to the site and review the material should suffice.)
Ideally, the email (or other means of notification) just captures the material reviewed, the trainee's name, and the date training was completed.
I thought Forms might do it (and it may), but I couldn't put it all together. I've done some Flows before so I'm somewhat comfortable in that space (if that's the best approach), but, again, I couldn't fit the puzzle pieces together. Any guidance would be appreciated.
8 Replies
Sort By
- DonHCopper Contributor
Well, maybe I was overly excited to see the email sent that I overlooked the content. User ID is passing back nothing. I tried User Name and User email but those came back undecipherable (?). Here's what I see trying those functions in the body:
User id:
User name: RG9uIEh1cmQ=
User email: ZGh1cmRAdGhlcmVhbHRpbWVncm91cC5jb20=
I'm just testing this myself and haven't tried anyone else yet, but clearly I think I'm off somewhere.
- DChenITCopper Contributor
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-12390d9a192c9) 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! 😁
- DonHCopper Contributor
Hi DChenIT,
I looked at forms but that isn't exactly what I want. I think I'm wanting to add a column to a library list and insert a button that plucks values from the selected item and sends an email to a particular address. Alternatively, the button could run a Flow. I've found some options in the pnp list formatting site but can't quite yet get what I want.
- DChenITCopper Contributor
Hi DonH so i want to make sure i'm understanding you correctly. If you were to have a Microsoft Form that had a Multiple Choice selection of all your trainings and your team members.
1) Selected the trainings they did2) Select the date they completed them
then submit the form.
Then via automation, you can say, when a new response is submitted, send an email to the trainer with the completed trainings and date.
Does that work? The form would kind of look like this:- DonHCopper Contributor
Boom! Worked like a champ. Thanks!! One final question, if you don't mind. When I 'press the button' it starts the flow (pops up a panel in the browser) and then I have to click 'Run Flow' there to actually run it. Is there any way to automatically run it (so the user doesn't have to click Run? (And is there any way to prevent that panel from popping up?)
- DChenITCopper Contributor
Unfortunately, not without using Premium connectors like "When an HTTP Request is received" either that or you would just have to build the entire thing in Power Apps.