| Muhammad Yaseen

Using Power Automate to send required data through email to multiple selected user

We want to send an email to specific user selected on the model driven form on specific selected Time, Day, Once a week, once in twice a Week, Monthly on selected Date/Time and Yearly on selected Date/Time of the month.

So, we have already created a Model-Driven Form

UsingPowerAutomate

For this purpose we make the flow recurrence that will runs at 1 minute interval.

UsingPowerAutomate

If the send report toggle is set to true then flow will get the data from this entity using list rows and we used FetchXml to filter the data

UsingPowerAutomate

UsingPowerAutomate

Then we used switch cases to select the related case to show data of Time Entries in according to the selection like Now, Daily, Weekly, Bi-Weekly, Monthly, Yearly

UsingPowerAutomate

And in each case like time, Date, Day, Month and Year we check the condition if condition satisfied then we set the variable FetchXml (with Time Entries FetchXml According to filter Date and Project) and Sync Check to True.

UsingPowerAutomate

UsingPowerAutomate

If one of the condition satisfies we used FetchXml that we created on above case to fetch records from the list of rows from the desired Time Entries Table.

And here we also fetched the selected user from the Sub Grid of the form. And stored it semicolon separately in the array of string.

UsingPowerAutomate

Then we used Get File Content connector for one drive to select an empty .XLSX file which we will be used to add rows in it then send this file as an attachment. And use a Create file connector to create an empty file with unique name and pass the body of Get File Content connector to this in file content field, and in this file we will create table in excel file with the desired headers which coming from the FetchXml of Time Entries. And gave this table a name.

UsingPowerAutomate

Then we used the select connector to map the columns from our Time Entries List of rows Output

UsingPowerAutomate

And by using this select output we will add rows into a table by using Excel Add Rows into a table and passed the body of select to Row field.

UsingPowerAutomate

Then we pick this excel file from one drive and then used send an email using an Email Connector and attached excel file output in the attachment.

UsingPowerAutomate

That’s it 😊

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.



About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.


More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting