在 Microsoft Flow 中创建流Create a flow in Microsoft Flow

创建一个流,该流在受到事件触发后自动执行一个或多个任务。Create a flow that performs one or more tasks automatically after it's triggered by an event. 例如,可以创建一个流,在别人发送的推文包含指定的关键字时通过电子邮件通知你。For example, create a flow that notifies you by email when someone sends a tweet that contains a keyword you specify. 在此示例中,发送推文是事件,发送邮件是操作。In this example, sending a tweet is the event, and sending mail is the action.

先决条件Prerequisites

指定一个可启动流的事件Specify an event to start the flow

首先需选择通过什么事件或触发器来启动流。First, you will need to select what event, or trigger, starts your flow.

  1. flow.microsoft.com 的顶部导航栏中选择“我的流”,然后选择“从空白模板开始创建”。In flow.microsoft.com, select My flows in the top navigation bar, and then select Create from blank.

    左侧导航栏中的流选项

  2. 在屏幕底部选择“搜索数百个连接和触发器”框,在显示“搜索所有连接和触发器”的框中输入 Twitter,然后选择“Twitter - 粘贴新推文时”。Select the Search hundreds of connectors and triggers box at the bottom of the screen, enter Twitter in the box that says Search all connectors and triggers, and then select Twitter - When a new tweet is posted.

    Twitter 事件

  3. 如果尚未将 Twitter 帐户连接到 Microsoft Flow,请选择“登录到 Twitter”,然后提供凭据。If you haven't already connected your Twitter account to Microsoft Flow, select Sign in to Twitter, and then provide your credentials.

  4. 在“搜索文本”框中,键入想要查找的关键字。In the Search text box, type the keyword that you want to find.

    Twitter 关键字

指定操作Specify an action

  1. 选择“新建步骤”,然后选择“添加操作”。Select New step, and then select Add an action.

    添加操作

  2. 在显示“搜索所有连接器和操作”的框中,键入或粘贴“发送电子邮件”,然后选择“Office 365 Outlook - 发送电子邮件”。In the box that shows Search all connectors and actions, type or paste send email, and then select Office 365 Outlook - Send an email.

    操作列表

  3. 如果系统提示,请选择登录按钮,然后提供凭据。If prompted, select the sign-in button, and then provide your credentials.

  4. 在出现的窗体的“收件人”框中,键入或粘贴电子邮件地址,然后从出现的联系人列表中选择名称。In the form that appears, type or paste your email address in the To box then select your name from the list of contacts that appears.

    空白电子邮件

  5. 在“主题”框中,键入或粘贴“新推文来源:”,然后键入一个空格。In the Subject box, type or paste New tweet from:, then type a space.

    带占位符的主题行

  6. 在令牌列表中,选择“推送者” 令牌,为其添加一个占位符。In the list of tokens, select the Tweeted by token to add a placeholder for it.

    添加参数

  7. 选择“正文”框,然后选择“推文文本”令牌,为其添加一个占位符。Select the Body box, and then select the Tweet text token to add a placeholder for it.

  8. (可选)在电子邮件的正文中添加更多令牌和/或其他内容。(optional) Add more tokens, other content, or both to the body of the email.

  9. 在屏幕顶部附近,为流命名,然后选择“创建流”。Near the top of the screen, name your flow, and then select Create flow.

    选择“创建流”按钮

  10. 选择“完成”以更新流列表。Select Done to update the list of flows.

    选择“完成”按钮

  11. 发送包含指定关键字的推文,或等其他用户发布此类推文。Send a tweet with the keyword that you indicated, or wait for someone else to post such a tweet.

    推文发布后的一分钟内,电子邮件会通知用户有新推文。Within a minute after the tweet is posted, an email message notifies you of the new tweet.

管理流Manage a flow

  1. flow.microsoft.com 的顶部导航栏中选择“我的流”。In flow.microsoft.com, select My flows in the top navigation bar.

  2. 在流列表中,执行下列任一操作:In the list of flows, do any of the following:

    • 若要暂停流,请将其开关设置为“关闭”。To pause a flow, set its toggle to Off.

      暂停流

    • 若要恢复流,请将其开关设置为“打开”。 To resume a flow, set its toggle to On.

      恢复流

    • 若要编辑流,请选择与要编辑的流相对应的铅笔图标。To edit a flow, select the pencil icon that corresponds to the flow you want to edit.

      选择流

    • 若要删除流,请先选择“...”图标和“删除”,然后在显示的消息框中选择“删除”。To delete a flow, select the ... icon, select Delete, and then select Delete on the message box that appears.

      “删除”图标

    • 若要查看流的运行历史记录,请从“我的流”页中选择该流,然后在已打开页面的“运行历史记录”部分查看历史记录。To view the run history of a flow, select the flow from the My flows page, and then view the history under the RUN HISTORY section of the page that opens.

      运行历史记录

      从运行列表中选择流运行,查看每一步的输入和输出。Select a flow run from the list of runs to see the inputs and outputs of each step.

备注

帐户中最多可以有 50 个流。You can have up to 50 flows in your account. 如果已经有 50 个,则需先删除一个才能创建另一个。If you already have 50, delete one before you can create another.

后续步骤Next steps