Content Reviews with Flow
Business Process Flows + Automated Flows
Content review and approval processes are commonplace to ensure that any content produced for an organization’s customers is representative of the standards that it is known for. Implementing them consistently across teams, however, remains a challenge.
With Flow, implementing these processes is easy - use detailed, human-driven business process flows to ensure your process is implemented consistently across teams, and automated flows to track approvals and automate tasks.
Let’s say that our content review process looks something like this:
To design and implement the content review process, we’re going to:
- Create entities and attributes in the Common Data Service
- Build a business process flow for content review
- Compose a model driven app to use your business process
- Build automated flows to send approval requests to the right team
- Build automated flows to start an instance of the content review process
Before we get started, you’ll need Flow Plan 2 to use Business Process Flows, so head on over to the list of Flow plans and upgrade to Flow Plan 2, or sign up for a free trial
Create entities and attributes in the Common Data Service
We’ll need a place to store the information users enter as they us the process, and that place is the Common Data Service (CDS).
The first thing we’re going to do is create an entity in CDS to store information about each review. To do this:
- Navigate to https://web.powerapps.com/
- In the menu on the left, expand the ‘Data’ tab and select ‘Entities’
- Click ‘+ New entity’ to create a new entity. Since this entity stores information about reviews, we’ll name this entity ‘Review’. Click ‘Next’ to create the entity
- Now that we’ve created our entity, we’ll add fields that store information about our tasks. To do this select the ‘Fields’ tab in the Review entity we just created and click ‘+ Add field’, give the field a name (e.g., ‘Privilege check’ for the very first task in our process) and pick its datatype (e.g., an ‘Option Set’ that allows users to pick a value from a dropdown). Similarly, create additional option sets, multiline text fields, and so on for each task in the process
Related: Tutorial: Create a custom entity that has components in PowerApps
Enable entities for business process flows
To use an entity in business process flows, it must be enabled for them. To do this:
- In the menu on the left, click on ‘Solutions’ and then click on ‘Default Solution’ Navigating to the Default Solution
- In the window that opens, find the entity we just created in the pane on the left and select it
- Next, in the ‘General’ tab for this entity on the right, click the checkbox ‘Business process flows (fields will be created)'
- To make sure changes are saved, hit the Save button at the top, and then click ‘Publish’Enabling an entity for Business process flows
Build a business process flow for content review
To build the content review process, in the Flow portal, navigate to My flows -> Business Process Flows.
Create a business process
- Click on the ‘+ Create from blank’ button.
- In the pane that opens, enter a name (e.g., Content Review Process) for the process in the Display Name field.
- In the Common Data Service entity field, select the ‘Review’ entity we made in the previous section.
- Click ‘Next’ to create the process
Design your business process
- From the list of business process flows, click on the Content Review Process we just created to open it in the designer. Here, you’ll see the design canvas on the left with a single stage already added for you, and a pane on the right from where we’ll add stages and steps in our business process.
- To being, click on the stage already on the canvas. In the properties pane on the right, change the display name to ‘Content’ (per our process) and click ‘Apply’Configuring a stage in the business process
- Next, we’ll add tasks for the content team. To do this, click on ‘Details’ on the ‘Content’ Stage and select the data step already added for you. In the properties pane on the right, select the ‘Privilege check’ data field we’d previous created and change the Step Name to ‘Confirm no privileged information is disclosed’. To make sure this task is always done before allowing progress to the next stage, check the ‘Required’ field. Finally, click ‘Apply’ to save changes to this taskConfiguring steps in a stage
- To add tasks in the Content stage, click on the ‘Components’ tab in the pane on the right, drag & drop a ‘Data Step’ into the content stage and configure the step just as we did before.
- Next, lets add a stage for Branding. Click on the ‘Components’ tab in the pane on the right, drag & drop a ‘Stage’ onto the canvas following the ‘Content’ stage. Configure the stage and the tasks in it just as before
- Similarly, add stages and tasks for the Legal team and the Final Approver. When you’re done, click ‘Save’ to save your changes, and ‘Activate’ to enable the business process.Activating a business process
Compose a model driven app to use your business process
To use this business process, you’re going to need a model driven app that includes your Content Review business process and the Review entity that it needs.
Don’t have one yet? Learn how to build your first model-driven app from scratch
Build automated flows to send approval requests to the right team
Wouldn’t it be great to have an automated flow request and track approvals based on the stage of the content review process? To build this automated flow:
- Create a new flow from blank. Pick the Common Data Service connector, select the ‘When a record is updated’ trigger and select the Content Review Process from the list of Entities. Defining a trigger on a business process Tip: You’ll only see those business processes that have been activated in this list.
- Next, we get the name of the active stage in the business process by using the ‘Get Record’ action of the Common Data Service connector. Select the ‘Process Stages’ entity and in the ‘Item identifier’ field, find and add ‘Active Stage’ from the list of dynamic content
- Add a ‘Switch’ case to send approvals to the right team based on the active stage of the business process. In the ‘On’ field, find and add ‘Process Stage Name’ from the list of Dynamic content.
- Define one case for each stage in the business process. Do this by setting the ‘Equals’ field of the name of the stage – i.e., Content, Branding, Legal and Final ApproverDefine conditions on stages of the business process
- Within each case define an approval flow that requests approval from the right individuals for that stage.
- Additionally, once approval is received, automatically move the business process to the next stage by using the ‘Update a Record’ action of the Common Data Service connector. Pick the ‘Content Review’ process in the ‘Entity’ field, set the 'Record Identifier' to 'Content Review Process' (unique identifier for enity instances) from the list of dynamic values, and set the ‘Active Stage’ field of the business process entity to the ID of the next stage in the processChange the active stage of a business process using an automated flow Tip: To find the ID for each stage in the business process, move all the way to the last stage in the business process. Then, go to web.powerapps.com, navigate to the entity for this business process and click on the ‘Data’ tab. Here copy the values in the ‘Traversed Path’ column for the business process. This field provides a comma separated list of IDs each stage in the process right from the first stage to the currently active stage
Build automated flows to start an instance of the content review process
Let’s say that in our scenario, we want to create an instance of the content review process each time someone uploads a document to a folder in SharePoint. Here’s how we’d do this:
- Create a new flow from blank. Pick the SharePoint connector and select the ‘When a file is created in a folder’ trigger. Here, set the ‘Site Address’ to your SharePoint site URL and pick the folder that you want users uploading their content for review.
- Next, we create an instance of the Review entity that we need for our content review process. To do this, add the ‘Create a new record’ action of the Common Data Service connector, set the ‘Entity Name’ field to ‘Review’ and set the ‘Name’ field to ‘File Name’ from the list of available dynamic content. To make this even more useful, consider adding links and other file information from SharePoint into fields in the Review entityCreating a Review entity instance
- Now that we have an instance of the Review entity, let’s create an instance of our content review process. Just as in the previous step, add the ‘Create a new record’ action of the Common Data Service connector, set the ‘Entity’ field to ‘Content Review Process’ and set ‘Name’ to ‘File Name’ from the list of available dynamic content. To link the business process to the review entity that it needs, set the ‘*_Review’ field to ‘Review’ (unique identifier for Review entity instances) from the list of dynamic contentCreating a Content Review Process instance
- Finally, notify the user that their content has been submitted for review by sending them an email using the Outlook connector
Tip: To link users to the Review record so they can use the Content Review process, use expressions to craft the URL of the Review record. The easiest way to do this is to take the URL of an existing review record and replace the value following ‘…&id=’ with the unique identifier for Review entity instances.
And we’re done! With Flows, you’ve eliminated guesswork from the review process by prescribing tasks across individuals and teams using business process flows, and managed complex approvals using automated flows!