FLOW – Add List attachment to library with metadata

Although list attachments are not recommended in a SharePoint list, sometimes the customer has a need for this SharePoint feature. This Microsoft Flow uses a list form with an attachment which then adds the attachments to a SharePoint library with the selected metadata.

Step 1

Create the library and the list with the same metadata. The library needs to have the same columns the list has for clarity.

Step 2

Create the Flow.

 

1. The trigger is going to be when an item in the List is created.

flow_library_item_created

2. Retrieve the attachments from the list.

flow_library_get_attachments

3. Add an Apply to Each using the Body from Get attachments.

flow_library_apply_to_each

4. For each attachment we want to retrieve the content, create the file in the library, and update the file’s properties.

flow_library_apply_to_each_file

5. When retrieving the attachment content we want to use the ID from the item created and match it to the Id File identifier from Get attachments.

flow_library_attch_content

6. Create the file in the Folder path using the DisplayName and Attachment Content.

flow_library_create_file

7. Use the ID from the created item, then update the file metadata with the columns from the List. These columns/metadata can be configured as your own, but should be the same on both the List and the Library.

flow_library_update_file_props

 

8. All Done!

Modern List form

library_picture_metadata

Attachment

library_picture_attchment

 

File created and moved to the SharePoint library with the metadata

library_picture_library

 

 

 

Leave a comment