Work with approvals
Learn how to manage the approval of documents and processes in Microsoft Flow.
Create an approval request
In a previous topic, you saw how to power your Twitter feed with a SharePoint list in a simple way. In this topic, you’ll learn how to build a more business-friendly scenario using approvals. This way, anyone with access to the SharePoint list can contribute tweets, and the social media team can approve or reject those tweets. The team maintains control of the account and the content that goes out to customers.
Create an approval request flow
On the Microsoft Flow homepage, select Approvals, select Create approval flow, and then scroll down and select the Post list items to Twitter after approval template.
Verify your account credentials for SharePoint, Approvals, and Twitter, and select Continue.
By default, this template starts an approval process whenever a new item is created in a particular list, and if the item is approved, then it posts a tweet to Twitter. In this topic, you’ll modify this process by adding steps that update the SharePoint list with the approval response, indicate whether it was approved or not, and add any comments that the approver may have added to the proposed tweet.
In the ContosoTweets SharePoint list that you created previously, add two new columns:
Select the plus sign “+”, and select Yes/No
Enter ApprovalStatus and select Create
Select the plus sign “+”, and select Single line of text
Enter ApproverComments and select Save
Back in Microsoft Flow, in the When a new item is created action, enter the following values:
Site Address: your team SharePoint URL
List Name: ContosoTweets
In the Start an approval action, select Edit to display all the fields.
In Title, enter New tweet for and select Title from the dynamic content list.
In Assigned to, enter and select your name, or a test user name.
In Details, remove the default items and add TweetContent, TweetDate and Created by DisplayName from the dynamic content list, connected by the words on and by.
In Item Link, copy and paste the URL of your SharePoint list, and in Item Link Description, enter Contoso Tweet List.
In the Condition action, hover over the IF YES box, select the plus sign “+”, and select Add an action.
Search for update item, select the SharePoint connector, and select the SharePoint – Update item action.
In Site Address and List Name, enter your site URL and the ContosoTweets list again, and in ID, enter ID from the dynamic content list.
Select the Title field, and in the dynamic content list, search for title. Add the Title item from the When a new item is created action.
Select ApprovalStatus and set the value to Yes, then select ApproverComments and set the value to Comments from the dynamic content list.
Near the bottom of the IF NO, DO NOTHING box, select Add an action.
Using the same steps that you used for the IF YES configuration, create a SharePoint – Update item action and configure the fields with the same values, with the exception of setting ApprovalStatus to No.
Select the Post a tweet action, select Edit, and set Tweet text to TweetContent from the dynamic content list. At the top of the page, select Create flow to save your work.
This is just one way that Microsoft Flow can empower productivity for your team. Your team can contribute ideas, relevant news, or product guidance, and you still get to maintain control over what gets tweeted out to customers.
In our next topic, we’ll see what it looks like when an approver receives a new request for a proposed tweet.
Process an approval request
In a previous topic, you saw how to build an approval process around tweets that are stored in a SharePoint list. In this topic, you'll see what the experience looks like when an approver receives a new approval request.
Create and process a request
First we need to add an item to our SharePoint list, then we can process an approval request for that item.
Open the SharePoint list ContosoTweets, which was configured in a previous topic. Select New to create a new tweet.
Add the following values to the fields, and select Save.
Title – Promotions
TweetContent – Check out the new line of Contoso Flooring #ohsocontoso
TweetDate – Today’s date
In Microsoft Flow, select My Flows.
Select the Post list items to Twitter after approval flow that was configured in the previous topic, then select the running flow under RUN HISTORY.
Select the When a new item is created trigger. Verify that the information for the list item you just created is displayed.
In Outlook, open the automated approval mail in the inbox, and then select Approve.
In the Approval Center, view the details of the request, add a comment, and select Confirm.
In SharePoint, refresh the ContosoTweets list and verify that ApprovalStatus is Yes, and the comment that you entered is displayed.
In this topic, you saw the experience from the approver’s point of view - from receiving an approval request email, to processing the request in the Approval Center.
You've completed the Work with approvals section of Microsoft Flow Guided Learning.