Microsoft Flow 和 Power BIMicrosoft Flow and Power BI

Microsoft Flow 是一款 SaaS 供應項目,在企業用戶所仰賴的越來越多種應用程式和 SaaS 服務之間,將工作流程自動化。Microsoft Flow is a SaaS offering for automating workflows across the growing number of applications and SaaS services that business users rely on. 您可以使用 Flow 整合最愛的應用程式和服務 (包括 Power BI) 來將工作自動化,以取得通知、同步檔案、收集資料等。With Flow you can automate tasks by integrating your favorite apps and services (including Power BI) to get notifications, synchronize files, collect data, and more. 工作流程自動化讓重複性的工作變得輕鬆。Repetitive tasks become easy with workflow automation.

立即開始使用 Flow。Get started using Flow now.

觀看 Sirui 建立流程,在 Power BI 警示觸發時,將詳細的電子郵件傳送給同事。Watch Sirui create a Flow that sends a detailed email to colleagues when a Power BI alert is triggered. 然後遵循影片下方的逐步指示親自試試看。Then follow the step-by-step instructions below the video to try it out yourself.

建立由 Power BI 資料警示觸發的流程Create a flow that is triggered by a Power BI data alert

先決條件Prerequisites

本教學課程將示範如何建立兩個不同流程;一個從範本建立,一個從頭建立。This tutorial will show you how to create two different flows; one from a template and one from scratch. 如果要跟著做,請在 Power BI 中建立資料警示,建立免費的 Slack 帳戶,並註冊 Microsoft Flow (免費!)。To follow along, create a data alert in Power BI, create a free Slack account, and sign up for Microsoft Flow (it's free!).

建立使用 Power BI 的流程 - 從範本Create a flow that uses Power BI - from a template

在這項工作中,我們將使用範本來建立由 Power BI 資料警示 (通知) 觸發的簡單流程。In this task we'll use a template to create a simple flow that is triggered by a Power BI data alert (notification).

  1. 登入 Microsoft Flow (flow.microsoft.com)。Sign in to Microsoft Flow (flow.microsoft.com).
  2. 選取 [我的流程]。Select My flows.

  3. 選取 [從範本建立]。Select Create from template.

  4. 使用 [搜尋] 方塊尋找 Power BI 範本,然後選取 [觸發 Power BI 資料警示時,將電子郵件傳送至任何受眾] > [繼續]。Use the Search box to find Power BI templates and select Send an e-mail to any audience when a Power BI data alert is triggered > Continue.

建置流程Build the flow

此範本有一個觸發程序 (愛爾蘭獲得新奧運獎牌的 Power BI 資料警示) 和一個動作 (傳送電子郵件)。This template has one trigger (Power BI data alert for new Olympic medals for Ireland) and one action (send an email). 在您選取欄位時,Flow 會顯示可以包含的動態內容。As you select a field, Flow displays dynamic content that you can include. 在此範例中,訊息本文包含了磚的值和磚 URL。In this example we'll included the tile value and the tile URL in the message body.

  1. 從觸發程序下拉式清單中,選取一項 Power BI 資料警示。From the trigger dropdown, select a Power BI data alert. 選取 [New medal for Ireland] (愛爾蘭的新獎牌)。Select New medal for Ireland. 若要了解如何建立警示,請參閱 Power BI 中的資料警示To learn how to create an alert, see Data alerts in Power BI.

  2. 輸入一或多個有效電子郵件地址,然後選取 [編輯](如下所示) 或 [新增動態內容]。Enter one or more valid email addresses and then select Edit (shown below) or Add dynamic content.

  3. 流程會建立標題及訊息,您可以保留或修改它們。Flow creates a title and message for you which you can keep or modify. 您在建立 Power BI 警示時所設定的所有值都可供您使用,您只需將游標置於灰色的醒目提示區域並選取即可。All the values you set when you created the alert in Power BI are available for your use -- just place your cursor and select from the grey highlighted area.

  4. 例如,如果您在 Power BI 中建立了一個警示標題「我們已贏得另一面獎牌」,您可以選取 [警示標題] 來將該文字新增到您的電子郵件 [主旨] 欄位。For example, if you created an alert title in Power BI of We won another medal, you can select Alert title to add that text to your email Subject field.

    接著,您可以接受預設電子郵件本文,或是自行建立內容。And, you can accept the default Email body or create your own. 上述範例會對訊息做出一些修改。The example above contains a few modifications to the message.

  5. 當您完成時,請選取 [建立流程] 或 [儲存流程]。When you're done, select Create flow or Save flow. 流程隨即建立並進行評估。The flow is created and evaluated. Flow 可讓您知道當中是否有錯誤。Flow lets you know if it finds errors.

  6. 如果發現錯誤,請選取 [編輯流程] 加以修正,否則選取 [完成] 即可執行新流程。If errors are found, select Edit flow to fix them, otherwise, select Done to run the new flow.

  7. 當觸發資料警示時,系統會將電子郵件傳送到您指定的地址。When the data alert is triggered, an email will be sent to the addresses you indicated.

建立使用 Power BI 的流程 - 從頭 (空白)Create a Flow that uses Power BI - from scratch (blank)

在這項工作中,我們將從頭建立由 Power BI 資料警示 (通知) 觸發的簡單流程。In this task we'll create a simple flow from scratch that is triggered by a Power BI data alert (notification).

  1. 登入 Microsoft Flow。Sign in to Microsoft Flow.
  2. 選取 [我的流程] > [從空白建立]。Select My flows > Create from blank.

  3. 使用 [搜尋] 方塊尋找 Power BI 觸發程序,然後選取[Power BI - 觸發資料驅動警示時]。Use the Search box to find a Power BI trigger and select Power BI - when a data driven alert is triggered.

建立流程Build your flow

  1. 從下拉式清單中,選取您的警示名稱。From the dropdown, select the name of your alert. 若要了解如何建立警示,請參閱 Power BI 中的資料警示To learn how to create an alert, see Data alerts in Power BI.

  2. 選取 [新步驟] > [新增動作]。Select New step > Add an action.

  3. 搜尋 Outlook,然後選取 [建立事件]。Search for Outlook and select Create event.

  4. 填入事件欄位。Fill in the event fields. 在您選取欄位時,Flow 會顯示可以包含的動態內容。As you select a field, Flow displays dynamic content that you can include.

  5. 完成時請選取 [建立流程]。Selet Create flow when done. Flow 會儲存並評估流程。Flow saves and evaluates the flow. 如果沒有錯誤,請選取 [完成] 執行此流程。If there are no errors, select Done to run this flow. 新流程會新增到 [我的流程] 頁面中。The new flow is added to your My flows page.

  6. 當 Power BI 資料警示觸發流程時,您會收到類似這樣的 Outlook 事件通知。When the flow is triggered by your Power BI data alert, you'll receive an Outlook event notification similar to this one.

後續步驟Next steps