Power Automate - Send an email notification when a SharePoint list item or file is approved (Support multiple approvers)
Overall
First, you need to enable "Approvals" in your SharePoint.
Next, click "Add Column" to configure the new columns to show on your site.
Power Automate Flows:
1. SharePoint::When an item or a file is modified
-Site Address: select your site address (What is your folder location?)
-List or Library Name: (Option, if your site has a library or another tag)
2. Variable::Initialize variable
The variable is only for debugging purposes and allows you to check the output; you can skip it.
-Name: ApproversEmails
-Type: Array
-Value:
3. Control::Apply to each
(If Power Automate automatically produces some additional information for each block, you can remove it directly.)
-Name: For each
-Select an output from previous steps: "Approvers" of "SharePoint::When an item or a file is modified"
Get folder metadata can skip.
4. SharePoint::Get file metadata
-Site Address: same as above."
-File Identifier: select the "identifier" of "SharePoint::When an item or a file is modified"
5. Control::Condition
-Condition expression:
------Or
----------- Approve status Label of "SharePoint::When an item or a file is modified" is equal to Requested
6. Control::Apply to each
-Name For each ApproversEmails
-Select an output from previous steps: Approvers of SharePoint::When an item or a file is modified
Write your format as you like in the email template body.
If you want to show the file's parent folder full path, you can use the formula below:
substring(
split(triggerBody()?['{Link}'], '?')[0],
0,
add(
lastIndexOf(
split(triggerBody()?['{Link}'], '?')[0],
'/'
),
1
)
)
When you create a new file, you will see the approval status show "Not submitted" in your site address. Click and enter the information on the prompt window.
Hope I can help you!
本文由[Jayson Chan]原創,轉載請註明出處: freecodeinfosite.blogspot.com
留言
張貼留言