Posts

Showing posts from August, 2021

Power Automate: Create an Excel file during runtime and send it as email attachment through MS Flows

Image
I was working on a requirement where Dataverse entity record needs to be export in excel and send as an email attachment. In this scenario, each record must have a separate excel file, and as we know there is no way to create an excel file dynamically through flow. To achieve the above task, I have followed below steps: Step 1:  I created an excel template in one drive and this template has one table and two columns i.e. Name and City: We can increase/decrease columns as per requirement. In this example, my template name is "Sample sheet.xlsx" Step 2: Create a Microsoft flow that triggers on the creation of "Contact" in Dataverse: Then add a new step to get the file template from one drive that was created in Step 1: Next, Add a new step to copy the template with a new name at a new location on onedrive: I have created a new folder with the name "Copies" in onedrive before creating the above step. The next step is to compose rows, In step 1, I have created