Building a SharePoint Video Portal – Approval Processing with Power Automate

Building a SharePoint Video Portal – Approval Processing with Power Automate

This entry is part 3 of 3 in the series Building a SharePoint Video Portal
5 / 5 ( 1 vote )

Finally–we’re to the good stuff!

In the first part of this series, we talked about setting the stage with the requirements, and then went on to create the basic staging and production sites, update the retention policies to exclude the staging site, and configure the taxonomy.

In part two, we dug into some basic site customizations for the video portal.

Preparing us for ….

…. Configuring some workflows!

In this section, we’re going to configure two workflows–one that notifies an administrator that a new file has been posted  to the staging site, and one that moves an approved file from the staging site to the production site.

Configuring the initial notification flow

This flow is pretty simple to create, so let’s get started on it.

  1. Navigate to one of the Staging libraries.  For this example, I’m going to use the Cooking library.
  2. Select the ellipses (if the automate is not available on the main menu), point to Automate, point to Power Automate, and then select Create a flow.
  3. Select the Send a customized email when a new file is added template from the list.
  4. If necessary, sign in (or switch accounts) for any of the services.
  5. If this is the first time you’ve authorized Power Automate to interact with an account, you may need to grant consent.
  6. Click Create flow.
  7. Click Edit to modify the flow.
  8. Edit the name of the flow before you go too far–that way, it will be easily identifiable later if you need to troubleshoot or modify it.
  9. Unless you’re going to use content from the Get my profile (v2) action, just delete it.  Most of the fields we’re going to specify values manually.  When you delete it, it will inform you that dynamic content tokens that are used in the Send an email action will be removed.
  10. Expand the Send an email action by clicking on its title bar.
  11. Fill out the To field with the recipient.  You can use one or more users or a mail-enabled group. You can also click the Show advanced options to expose more fields for the email message. There isn’t an automatic mail-enabled recipient for the owners of a modern SharePoint site, so you may want to create one (depending on who will be responsible for handling the approvals).
  12. This is a good time to click Save.
  13. One of the

This flow will now notify whoever is listed in the “To” or “Cc” fields that a new file has been posted.  The message body supports HTML, so you can add hyperlinks (as I did) to resources such as how to manage approvals, the link for the containing SharePoint site library, or even your favorite cat videos.  The sky’s really the limit, folks.

You can repeat this process for every library in the staging site.

Configuring what happens after approval

Based on our original staging site configuration, newly uploaded files will be placed in a Pending state, visible only to site or library administrators and the individual who uploaded the file.  Once the file has been approved, the business goal is to move the file to the production site where it can be categorized and found by other users.

To configure this flow, follow these steps:

  1. Navigate to Power Automate.  For Commercial customers, it’s https://flow.microsoft.com.  For GCC customers, head over to https://gov.flow.microsoft.us.
  2. Click +Create, and then select Automated cloud flow.
  3. Click Skip to create a blank flow.
  4. Select SharePoint from the connector list to filter the triggers by that service.
  5. Search for the When a file is created or modified (properties only) trigger.
  6. In the Site address field of the SharePoint trigger, select the Staging site.
  7. In the Library field, select the library you’re working with.  Leave the Folder value blank (unless you’ve placed additional structure in there).
  8. Click + New step.
  9. Search for the Condition control and add it.
  10. Click inside the left-hand side of the condition control, and select the Content approval status dynamic content token under the When a file is created or modified (properties only) section. Set the evaluation method to is equal to, and then enter the text value Approved.
  11. In the If yes (green) branch of the condition, select Add an action.
  12. Add the SharePoint – Move file action.
  13. Fill it out with the following properties:
    – Select the Staging site for the Current Site Address field
    – In the File to move field, select the Full path dynamic content token under the When a file is created or modified (properties only) section
    – Select the Production site for the Destination Site Address field
    – Select the value representing the destination library for the Destination Folder field
    – Select Replace or Move with a new name for the If another file is already there, depending on how you want to deal with conflict resolution
  14. Select Add an action under the Move file action.
  15. Add the SharePoint – Update file properties action.
  16. Fill it out with the following properties:
    – For the Site Address field, select the Production site.
    – For the Library Name field, select the appropriate library where the new file resides.
    – For the Id field, select the ItemId dynamic content token under the Move file section.
    Select the Title dynamic content token under the When a file is created or modified (properties only) section for the Title field
    – For the Description field, select the Description dynamic content token under the When a file is created or modified (properties only) section
    – For the Enterprise Tags field, select the Enterprise Tags dynamic content token under the When a file is created or modified (properties only) section
  17. Under the If no (red) branch of the condition, select Add an action.
  18. Select the Outlook – Send an email (v2) action.
  19. Fill out the email action, using the Created by email dynamic content token in the To field.  This will notify the original uploader that their item was rejected.  Fill out any additional data as desired.
  20. Click Save.

Repeat this process for any additional staging libraries.

Testing it Out

Once you’ve completed the flows, it’s time to test.  Simply log in as a user to SharePoint Online, navigate to the staging site, and upload a new video to one of the libraries for which you’ve configured the approvals and automation.  Then, while logged in as a site owner or administrator, you should see the initial email directing you to the site, and you should be able to approve the item.

Here’s an example of how it looks:

Uploading a document as a user

In this example, I’m going to upload a video while logged in as one of my demo users, Debra.

  1. Navigate to the Staging site, and then select the Cooking library (or one of the libraries you created).
  2. Upload a file, and fill out any properties desired.  Notice the Approval Status column is set to Pending.

That’s it. It’s a pretty basic, no-frills process.

Approving the file as a site owner

For the next steps, we’re going to follow the process as an administrator or owner of the site.

  1. Log into Outlook to view the notification.
  2. Click on the link to the library in the email.
  3. Click on the ellipsis next to the file, point to More, and then select Approve/Reject. You can also get to Approve/Reject by selecting the ellipsis on the menu bar and selecting it from there.
  4. Select the Approve radio button and click OK.
  5. At this point,  you can either go back to the Staging site and wait for the file to disappear, or you can go to the Production site and wait for the file to appear in the corresponding library.
  6. Another good check to do might be to head to the landing page of the Production site and look to see that the video pops up in the Highlighted content web part.

Congratulate yourself with a tasty beverage of your choosing.

Summary

Once you’ve completed the tasks and seen it in action, feel free to further expand on it.  I’d love to hear some feedback on the cool things you’re doing.

Series Navigation<< Building a SharePoint Video Portal – Site Customization

Published by Aaron Guilmette

Helping companies conquer inferior technology since 1997. I spend my time developing and implementing technology solutions so people can spend less time with technology. Specialties: Active Directory and Exchange consulting and deployment, Virtualization, Disaster Recovery, Office 365, datacenter migration/consolidation, cheese. View all posts by Aaron Guilmette

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version