Power Automate interface in Power BI

Sivakami Mani
BI3 Technologies
Published in
4 min readDec 22, 2021

In this Blog, we are going to explain about sending mail to multiple recipients from Power BI.

Sending mails can be achieved in several ways in power Bi. mailto: link can be used to send mail based on row level data selection. We cannot send it to multiple recipients at a time by using this option. To achieve this , we are using Power automate interface inside power bi.

How to create flow in power BI:

  1. Drag Power flow visual from visuals pane .

2. Select the columns needs to be used in sending mail.

3. Click on … in power flow visual and click edit.

4. Validate power auto with Power BI login credentials.

5. In the trigger, select “On Power BI button clicked”

6. In actions, we have to select multiple options to achieve the task. Functionally, need to format the mail content and consolidate mail recipients before we send the mail.

Below are the actions needs to done to achieve this. Let see the purpose of each action.

Select: Click “New Step” and type in “Data operation” and select “select” from the list. Select “Power BI data” for “From” and map the necessary columns.

Create HTML table: Type in “Data operation” and select “Create HTML table”. This action helps us to format mail content.

Initialize variable: Click “New Step” and type in “Data operation” and select “Initialize variable”. Give variable name and select Array inside Type drop down.

Apply to each: Click “New Step” and type in “Data operation” and select “Append to Array variable”. This helps us to consolidate all the recipients inside array.

Select Variable name from the drop down for Name. Select mail id column from our list for Value.

Compose: Click “New Step” and type in “Data operation” and select “Compose”.

Login to https://flow.microsoft.com by using power bi credentials.

Go to My Flows and select Cloud flows and highlight flow name and then click edit.

Click compose and click Expression. In the expression click fx and give below union .It helps us to remove duplicate mail id values in array. MailList is our array variable.

union(variables(‘MailList’),variables(‘MailList’))

Join: Click “New Step” and type in “Data operation” and select “Join”. Its helps to join mail ids with semicolon. Select compose output for “From”.

Compose2: Click “New Step” and type in “Data operation” and select “Compose”. Its helps to format the mail content with style. Use below CSS script and select HTML table output at last.

<style>Table {font-family: Arial, Helvetica, sans-serif;background-color: #EEEEEE;border-collapse: collapse;width: 100%;}Table td, Table th {border: 1px solid #ddd;padding: 3px 3px;}Table th {font-size: 12px;font-weight: lighter;padding-top: 8px;padding-bottom: 8px;text-align: left;background-color: #1C6EA4;color: white;}</style>

Send an email (V2):Click “New Step” and type in “Outlook 365 office” and select “Send an email (V2)”. Select Join output for “To”. Give respective subject for “Subject”. Select Compose 2 output for Body”. We can include custom message inside Body.

Power Automate is a cloud-based solution that users to automate activities and operations to save ample time and effort on tedious manual tasks. You can use the platform to automate workflows between your applications and services to get notifications, sync files, gather data and much more.

About Us

Bi3 has been recognized for being one of the fastest-growing companies in Australia. Our team has delivered substantial and complex projects for some of the largest organizations around the globe and we’re quickly building a brand that is well known for superior delivery.

Website : https://bi3technologies.com/

Follow us on,
LinkedIn : https://www.linkedin.com/company/bi3technologies
Instagram :
https://www.instagram.com/bi3technologies/
Twitter :
https://twitter.com/Bi3Technologies

--

--