Copy List Items With Attachment To Another List

Introduction

Power Automate is cloud-based software that allows us to create and automate workflows and tasks across multiple applications and services. Microsoft flow helps you to simplify the day-to-day repetitive tasks to flows, that can run or execute automatically without much manual intervention.

Requirement

To create a copy of the item with an attachment in the destination list from the source list.

Solution

We will consider Source List as "Resource" and Destination List as "MasterList". Now we will create an empty list for both as below,

Source List: Resource

Copy List Items With Attachment To Another List

Destination List: MasterList

Copy List Items With Attachment To Another List

Step 1

Choose "When an item is created or modified" action and provide the "Site Address" and "List Name" as shown below,

Copy List Items With Attachment To Another List

Step 2

Choose the "Get Item" action by clicking on the "+ New step" button as shown below.

Provide "Site Address", "List Name" and the "ID". ID should be chosen from the Dynamic content section from the "when the item is created or modified" action.

Copy List Items With Attachment To Another List

Step 3

Choose the "Get Attachments" action and provide "Site Address", "List Name" and ID. ID should be chosen from the dynamic content section "Get item" action.

Copy List Items With Attachment To Another List

Step 4

Choose "Create item" action and provide "Site Address", "List Name" and map other properties from dynamic content section "Get Item" action.

Copy List Items With Attachment To Another List

Step 5

Choose "Get Attachment Content" action and provide "Site Address", "List Name", "ID" and "File Identifier". ID should be chosen "Get items" action and File Identifier to be chosen from "Get Attachments"  from the dynamic content section.

Copy List Items With Attachment To Another List

Step 6

Choose "Add Attachment" action and provide "Site Address", "List Name", "ID", "File Name" and "File Content". Choose ID from "when the item is created or modified", File Name should be "Display Name" from "Get Attachments" action and File Content should be "Attachment Content" from "Get Attachment content" action.

Copy List Items With Attachment To Another List

Step 7

Create an item with an attachment in the source list.

Copy List Items With Attachment To Another List

Step 8

Have a look at the run history.

Copy List Items With Attachment To Another List

Step 9

Here we see the destination list having the list item with attachment. It's successfully copied.

Copy List Items With Attachment To Another List

Important
This flow will copy all the attachments not only one.

Summary

We have learned how to copy items with attachments to the destination list from the source list.


Similar Articles