在 Microsoft Flow 中通过模板创建流Create a flow from a template in Microsoft Flow

通过多个内置模板中的任一个创建一个具有特定用途的流,例如,该流在用户的经理在 Office 365 中向用户发送电子邮件时,可以向用户发送 Slack 消息。Create a flow from one of many built-in templates that can, for example, send you a Slack message when your manager sends you an email in Office 365.

注意: 如果脑中已经有了某个过程,但找不到相应的模板,则可从头开始创建流Note: Create a flow from scratch if you already have a process in mind and can't find a template for it.

先决条件Prerequisites

选择模板Choose a template

  1. flow.microsoft.com 的顶部导航栏中选择“模板”。In flow.microsoft.com, select Templates in the top navigation bar.

  2. 在搜索栏中,键入 Slack,然后选择搜索图标。In the search bar, type Slack, and then select the search icon.

  3. 用户只会看到与 Slack 相关的模板,因此现在可以选择“当经理向我发送电子邮件时在 Slack 上发送消息”。You'll see only templates related to Slack, so you can now select Send a message on Slack when my manager emails me.

    左侧导航栏中的新选项

  4. 确认此模板将执行用户要执行的操作,然后选择“使用此模板”。Confirm that this template will do what you want, and then select Use this template.

  5. 如果尚未登录 Office 或 Slack,请选择“登录”,然后按提示操作。If you aren't signed into Office or Slack, select Sign in and then follow the prompts.

    模板所需连接的列表

  6. 确认连接后,选择“继续”。After you confirm your connections, select Continue.

    此时会出现用户的流,显示每个操作都带有一个橙色标题栏。Your flow appears, showing each action with an orange title bar.

    模板中的默认事件和操作

自定义流Customize your flow

  1. 选择事件的标题栏将其展开,然后对其进行自定义(例如,可以指定一个筛选器,筛选出自己感兴趣的电子邮件)。Select the title bar for an event to expand it, and then customize it (for example, by specifying a filter on the email that interests you).

  2. 需要从用户获得输入的操作会自动展开。Actions that require input from you will automatically be expanded.

    例如,“发布消息”操作会展开,因为用户需要输入一个通道,如 @username。For example, the Post message action is expanded because you need to enter a channel, such as your @username. 也可以自定义消息内容。You can also customize the message content. 默认情况下,消息将只包含主题,但也可包含其他信息。By default, the message will contain just the subject, but you can include other information.

    为 Slack 指定通道

  3. 在屏幕顶部附近,为流指定名称,然后选择“创建流”。Near the top of the screen, specify a name for your flow, and then select Create flow.

  4. 最后,如果对流满意,请选择“完成”。Finally, if you're happy with your flow, select Done.

    “完成”按钮

现在,当用户的经理向用户发送电子邮件时,用户会收到 Slack 消息,其中包含用户指定的信息。Now, when your manager sends you an email, you'll receive a Slack message that contains the information that you specified.

后续步骤Next steps