A question that’s popped up a few times on the community forums is around a solution that would allow PowerApps Portals users to upload an Excel or CSV file and have records created in the CDS/Dynamics database. Others have suggested some answers, so I’d thought I’d summarize, plus offer another possible solution.
Here are a couple of threads with people asking how to allow users to upload a CSV or Excel file to a portal that will cause records to be created in the database:
While the Entity List does have the out-of-the-box ability to download records, nothing exists to allow users to import records via a Portal.
Arpit Shrivastava (http://arpitmscrmhunt.blogspot.com/) proposed a solution that involved these high level steps:
The original poster on that thread then offered a twist on that approach – instead of using a plugin or workflow, they planned on using KingswaySoft/SSIS to perform the data import.
When I saw the most recent question about this, another possible solution came to mind: what about using SharePoint integration, as well as Microsoft Flow? This way we could avoid having to write any custom plugins or workflow activities to parse a CSV. Since I’m always looking for an opportunity to learn more about Microsoft Flow, I figured I’d see if I could make it work.
Here was my approach:
And voilà, when a user uploads a document via the Portal to SharePoint, Microsoft Flow automatically processes it and creates the records.
One drawback of this approach is that In order to use the SharePoint integration, you need to create the record first – the SharePoint integration is not available when creating a record, only when editing. There are of course a number of different ways to architect it to remove the requirement that the user creates a record first (for example, you could automatically create the record for the user), but to keep things simple, I haven’t done that here.
Plus, there are obviously lots of way to break this in its current form (error checking is required) – but I think it’s an approach that is viable in some circumstances.