|
| 1 | +# Demonstration flow on how to process incoming excel email attachments, to group work items by EmailAddress for employees and email them their tasks |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +This sample demonstrates how to receive an Excel File over email, download the file, save it to SharePoint, then process the file by grouping by value EmployeeEmail and then emailing each employee their work items in an HTML Table. |
| 6 | +There are instructions and details in the assets folder, in a file called Excel GroupBy Example Phase I.docx |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +## Applies to |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +## Compatibility |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +## Contributors |
| 25 | + |
| 26 | +* [Michael Gernaey](https://github.com/MichaelGernaey) |
| 27 | + |
| 28 | +## Version history |
| 29 | + |
| 30 | +Version|Date|Comments |
| 31 | +-------|----|-------- |
| 32 | +1.0|June 20, 2025|Initial release |
| 33 | + |
| 34 | +## Prerequisites |
| 35 | + |
| 36 | +### Instructions |
| 37 | + |
| 38 | +* Review the Excel GroupBy Example Phase 1.docx that covers the entire flow from a functional and technical perspective |
| 39 | +* Update the Flow based on the configuration details below, setting up your SharePoint Library and Folders, and Email addresses to use. |
| 40 | +* If you want the Emails to work, go into the workitems.xlsx file in your assets and update the emails to point to real people |
| 41 | +* If you do not you will simply get failed to send emails in your own mailbox |
| 42 | +* Please use the workitems.xlsx in the assets folder for your Attachment |
| 43 | +* Please use the term workitems for your Emails Subject. This is the email that you will send yourself(or whatever emai you configure) to trigger your flow |
| 44 | +* Change the Connections and Folder pointers in the Flow to point to your own SharePoint |
| 45 | +* Note: Image Flow_Image_4.jpg shows the folder structure I am using, you can use whatever you like as long as you configure it in the flow that way |
| 46 | +* Change the Outlook Trigger Details pointing to the correct folder and account |
| 47 | +* Change the Outlook Send Email, Email Addresses in the Catch, Success and if no (false) condition/action areas to send to whomever you like. |
| 48 | +* These are emails that are intended to tell operations the status of the flow as part of the "business requirements in the document" |
| 49 | +* NOTE: the 10 minute delay is due to the Excel locking issue it will go from seconds to upwards of 10 minutes when used with SharePoint |
| 50 | +* The flow triggers when you send the attached workitems.xlsx, with a subject of workitems. Once triggered the flow will validate and then save |
| 51 | +* the file in the SharePoint document library and folder you specify in the actions |
| 52 | +* It will then process the excel file, grouping by unique Employee Email Address, and then emailing the employee only their workitems |
| 53 | + |
| 54 | +## Minimal Path to Awesome |
| 55 | + |
| 56 | +### Import Solution |
| 57 | + |
| 58 | +* [Download](./solution/flow-excel-groupbyemail-notification-example.zip) the `.zip` from the `solution` folder |
| 59 | +* [Import](https://learn.microsoft.com/en-us/power-apps/maker/data-platform/import-update-export-solutions) the `.zip` file using **Solutions** > **Import Solution**. |
| 60 | + |
| 61 | +### Using the source code |
| 62 | + |
| 63 | +You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps: |
| 64 | + |
| 65 | +* Clone the repository to a local drive |
| 66 | +* Pack the source files back into a solution `.zip` file: |
| 67 | + |
| 68 | + ```bash |
| 69 | + pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps |
| 70 | + ``` |
| 71 | + |
| 72 | + Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder) |
| 73 | +* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed. |
| 74 | + |
| 75 | +## Features |
| 76 | + |
| 77 | +This sample illustrates the following concepts: |
| 78 | + |
| 79 | +* Reusablility |
| 80 | +* Use of using Excel |
| 81 | +* Use of using Outlook Triggers |
| 82 | +* Email Attachment Processing |
| 83 | +* Creating a Unique Email by Grouping Excel Rows by Value |
| 84 | +* Terminating Flows to capture Success or Failure into the Flow Detail 28 day Run Logs |
| 85 | + |
| 86 | +## Help |
| 87 | + |
| 88 | +We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues. |
| 89 | + |
| 90 | +If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=utility-flow-for-aggregrate-operations-on-array&authors=@Solanki-Manish&title=utility-flow-for-aggregrate-operations-on-array). |
| 91 | + |
| 92 | +For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=utility-flow-for-aggregrate-operations-on-array&authors=@Solanki-Manish&title=utility-flow-for-aggregrate-operations-on-array). |
| 93 | + |
| 94 | +Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=utility-flow-for-aggregrate-operations-on-array&authors=@Solanki-Manish&title=utility-flow-for-aggregrate-operations-on-array). |
| 95 | + |
| 96 | +## Disclaimer |
| 97 | + |
| 98 | +**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** |
| 99 | + |
| 100 | +<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/flow-excel-groupbyemail-notification-example" aria-hidden="true" /> |
0 commit comments