处理审批Work with approvals

了解如何在 Microsoft Flow 中管理文档和过程的审批。Learn how to manage the approval of documents and processes in Microsoft Flow.

You will learn how to...

创建审批申请Create an approval request

上一主题介绍了如何使用简单的方式通过 SharePoint 列表为 Twitter 源提供支持。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. 这样,任何具有 SharePoint 列表访问权限的人都可以贡献推文,并且社交媒体团队可以批准或拒绝这些推文。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

  1. 在“Microsoft Flow”主页上,依次选择“审批”、“创建审批流”,然后向下滚动并选择“在批准后向 Twitter 发布列表项”模板。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.


  2. SharePoint审批Twitter 验证帐户凭据,然后选择“继续”。Verify your account credentials for SharePoint, Approvals, and Twitter, and select Continue.


默认情况下,每当在特定列表中创建新项时,此模板都会启动一个审批过程,如果该项得到批准,那么它将向 Twitter 发布推文。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. 在本主题中,将通过添加以下步骤来修改此过程:为 SharePoint 列表更新审批响应,指示它是否已得到批准,并添加审批者可能已添加到提议推文中的任何评论。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.

  1. 在之前创建的“ContosoTweets”SharePoint 列表中,添加两个新列:In the ContosoTweets SharePoint list that you created previously, add two new columns:

    1. 选择加号“+”,然后选择“是/否”Select the plus sign “+”, and select Yes/No
    2. 输入 ApprovalStatus,然后选择“创建”Enter ApprovalStatus and select Create
    3. 选择加号“+”,然后选择“单行文本”Select the plus sign “+”, and select Single line of text
    4. 输入 ApproverComments,然后选择“保存”Enter ApproverComments and select Save


  2. 回到 Microsoft Flow,在创建新项时操作中,输入以下值:Back in Microsoft Flow, in the When a new item is created action, enter the following values:

    • 站点地址:团队的 SharePoint URLSite Address: your team SharePoint URL
    • 列表名称:ContosoTweetsList Name: ContosoTweets


  3. 启动审批操作中,选择“编辑”显示所有字段。In the Start an approval action, select Edit to display all the fields.


  4. 在“标题”中,输入“新推文内容”,并从动态内容列表中选择“标题”。In Title, enter New tweet for and select Title from the dynamic content list.


  5. 在“分配到”中,输入并选择你的姓名或测试用户名。In Assigned to, enter and select your name, or a test user name.


  6. 在“详细信息”中,删除默认项并从动态内容列表中添加 TweetContentTweetDate由 DisplayName 创建,由单词 onby 连接。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.


  7. 在“项链接”中,复制并粘贴 SharePoint 列表的 URL,然后在“项链接说明”中输入 Contoso 推文列表In Item Link, copy and paste the URL of your SharePoint list, and in Item Link Description, enter Contoso Tweet List.


  8. 条件操作中,悬停在“如果是”框上方,选择加号“+”,然后选择“添加操作”。In the Condition action, hover over the IF YES box, select the plus sign “+”, and select Add an action.


  9. 搜索更新项,选择“SharePoint”连接器,然后选择“SharePoint - 更新项”操作。Search for update item, select the SharePoint connector, and select the SharePoint – Update item action.

    SharePoint 更新项

  10. 在“站点地址”和“列表名称”中,再次输入站点 URL 和 ContosoTweets 列表,然后在“ID”中,输入动态内容列表中的 IDIn Site Address and List Name, enter your site URL and the ContosoTweets list again, and in ID, enter ID from the dynamic content list.

    站点、列表和 ID

  11. 选择“标题”字段,然后在动态内容列表中搜索标题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.


  12. 选择“ApprovalStatus”,然后将值设置为“是”,然后选择“ApproverComments”,并将值设置为动态内容列表中的“评论”。Select ApprovalStatus and set the value to Yes, then select ApproverComments and set the value to Comments from the dynamic content list.


  13. 在“如果否,则不执行任何操作”框中,选择“添加操作”。Near the bottom of the IF NO, *DO NOTHING* box, select Add an action.


  14. 使用曾用于“如果是”配置的相同步骤,创建“SharePoint - 更新项”操作,除将“ApprovalStatus”设置为“否”以外,使用相同的值配置字段。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.

    状态 = 否

  15. 选择”发布推文“操作,选择“编辑”,并将“推文文本”设置为动态内容列表中的“TweetContent”。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.


这只是 Microsoft Flow 提高团队工作效率的方法之一。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

在上一主题中,了解了如何基于 SharePoint 列表中存储的推文生成审批过程。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

我们需要先将项添加到 SharePoint 列表,然后才能处理该项的批准请求。First we need to add an item to our SharePoint list, then we can process an approval request for that item.

  1. 打开 SharePoint 列表“Contoso 推文”,它已在上一主题中进行配置。Open the SharePoint list ContosoTweets, which was configured in a previous topic. 选择“新建”来创建新推文。Select New to create a new tweet.

    SharePoint 列表

  2. 将以下值添加到字段,然后选择“保存”。Add the following values to the fields, and select Save.

    • 标题 – 提升Title – Promotions
    • 推文内容 – 查看 Contoso Flooring 的新行 #ohsocontosoTweetContent – Check out the new line of Contoso Flooring #ohsocontoso
    • 推文日期 – 今天的日期TweetDate – Today’s date

      SharePoint 新项

  3. Microsoft Flow 中,选择“我的流”。In Microsoft Flow, select My Flows.
  4. 选择“批准后,将列表项发布到 Twitter”流(已在上一主题中进行配置),然后选择“运行历史记录”下的运行流。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.


  5. 选择“当创建新项时”触发器。Select the When a new item is created trigger. 确认刚创建的列表项的信息已显示。Verify that the information for the list item you just created is displayed.


  6. Outlook 中,打开收件箱中的自动审批邮件,然后选择“批准”。In Outlook, open the automated approval mail in the inbox, and then select Approve.

    Outlook 请求

  7. 在“审批中心”中,查看请求的详细信息、添加注释,然后选择“确认”。In the Approval Center, view the details of the request, add a comment, and select Confirm.


  8. SharePoint 中,刷新“Contoso 推文”列表,确认“审批状态”为“是”,并确认输入的注释已显示。In SharePoint, refresh the ContosoTweets list and verify that ApprovalStatus is Yes, and the comment that you entered is displayed.

    SharePoint 刷新列表

在本主题中,从审批者的角度,了解了从接收审批请求电子邮件到在审批中心处理请求的体验。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.


已完成 Microsoft Flow 引导式学习的“处理审批”部分。You've completed the Work with approvals section of Microsoft Flow Guided Learning.

You learned how to...

Next Tutorial

管理流Administer flows


  • Deon Herbert
  • olprod