整合 Power BI 數據警示與 Power Automate

使用 Power Automate 將 Power BI 與您的最愛應用程式和服務整合。 使用 Power Automate,您可以建立自動化工作流程來取得通知、同步處理檔案、收集數據等等。 在本文中,您會從 Power BI 數據警示自動產生電子郵件。

必要條件

本文說明如何建立兩個不同的流程:一個來自範本,另一個從頭開始。 若要跟著做, 請在Power BI中建立數據警示,然後 註冊Power Automate。 完全免費!

從範本建立流程

在這項工作中,我們使用範本來建立由Power BI數據警示所觸發的流程(通知)。

  1. 登入 Power Automate (https://flow.microsoft.com)。

  2. 選取 [範本],搜尋 Power BI 觸發 Power BI>數據警示時傳送電子郵件給任何物件。

    Screenshot of the Power Automate Send an e-mail to any audience when a Power BI data alert is triggered template option.

建置流程

此範本有一個觸發程式、Power BI 數據警示,以及一個動作來傳送電子郵件。 當您選取欄位時,Power Automate 會顯示您可以包含的動態內容。 在此範例中,我們會在訊息本文中包含磚值和磚URL。

  1. 選取繼續

    Screenshot of the Power Automate, Power BI to mail option.

  2. 在 [ 警示標識符 ] 方塊中,選取 Power BI 數據警示。 若要瞭解如何建立警示,請參閱 Power BI 中的數據警示。

    Screenshot that shows where to select an alert in the Alert ID box.

  3. 輸入一或多個有效的電子郵件位址。

  4. Power Automate 會自動為您產生 主旨本文 ,您可以保留或修改。 本文文字會使用 HTML 進行格式設定。

    Screenshot that shows the Power Automate auto-generated email text.

  5. 當您完成訊息時,請選取 [新增步驟] 或 [儲存]。 Power Automate 會建立及評估流程。

    如果 Power Automate 找到錯誤,它會讓您知道。

  6. 選取 [編輯流程 ] 以修正錯誤。 否則,請選取 [ 完成] 以執行新的流程。

    Screenshot of the Power Automate success message.

  7. 當變更觸發數據警示時,Power Automate 會將電子郵件傳送至您指出的位址。

    Screenshot of the Power Automate alert email.

從頭建立流程

在這項工作中,我們會從頭開始建立由Power BI數據警示觸發的簡單流程(通知)。

  1. 登入 Power Automate

  2. 選取 [建立>自動化流程]。

    Screenshot of the Power Automate > Create Automated cloud flow screen.

  3. [建置自動化流程] 中,為您的流程命名。

  4. 在 [ 選擇流程的觸發程式] 中,搜尋 Power BI

  5. 選取 [Power BI - 觸發>數據驅動警示時建立]。

    Screenshot of the Build an automated flow screen.

建立流程

  1. 在 [ 警示標識符 ] 方塊中,選取警示的名稱。 若要瞭解如何建立警示,請參閱 Power BI 中的數據警示。

    Screenshot that shows how to select the name of the alert.

  2. 選取新步驟

  3. 在 [選擇動作] 中,搜尋 Outlook>Create 事件。

    Screenshot that shows how to choose an action when you create an event.

  4. 填入事件欄位。 當您選取欄位時,Power Automate 會顯示您可以包含的動態內容。

    Screenshot that shows where to continue to build the flow.

  5. 完成時選取 [建立流程 ]。 Power Automate 會儲存並評估流程。 如果沒有錯誤,請選取 [完成] 以執行此流程。 新的流程會新增至 [ 我的流程 ] 頁面。

    Screenshot of the message that indicates the flow is now running.

  6. 當您的Power BI數據警示觸發流程時,您會收到類似此流程的 Outlook 事件通知。

    Screenshot of the Power Automate triggers Outlook notification.