Moving PowerApps Attachments to a SharePoint Library using Power Automate flow.

 Use Case:
 Move the attached files to a SharePoint library rather than saving them as a SharePoint list item attachment.

Solution:

Again the simplest solution is to create a Power Automate flow which runs on items creation.

Add the action "Get Attachments"
This will take in Site Address, List Name and the ID of the recently created item.

So the catch is to add this action just after the When an item is created or modified step.



Then we need to add the Get Attachment Content action.


This action is also straight forward, it again takes in your address list name, ID and a File Identifier.

The File Identifier is nothing but the Id for the previous step.
Also, as soon you add it, Apply to each will wrap it.

Next step is to add Create file action.
This is again straight forward, just provide the Address, Folder Path (basically the SharePoint library you wish to save your attachment.), File Name and the File content. 

File content is the output of your previous step.
And thats it, you can now move the attachment from your Power Apps to a separate SharePoint Library.

This is a cool neat trick i learnt today.
Happy Appin

Comments

Popular posts from this blog

Creating Nested Galleries in Power Apps. (Parent-Child Relationship)

How to reset a datepicker control in PowerApps?

Reset () function failing to work on Edit form for Combo boxes in Power App.