Flow Actions

Copy Resources

Introduction

Copy Resources flow action can be used to copy a file or folder to a given destination. In this article we show how to add this action to your flow and configure the parameters.

1 - Add Copy Resources Action to your Flow

In your flow builder, search for the element named "Copy Resources". You can also find this action in the CloudFiles category when you click "action" element in "Add Element" box. Select the action to insert it into the flow.

2 - Configure parameters

Please configure following parameters after inserting the flow action

  1. Library- One of sharepoint, google, onedrive, dropbox, box, cloudfiles
  2. DriveId - Drive Id of the resource(to be copied) for SharePoint or Google Drive. This parameter is not needed for other storages. To get the value of Drive Id, please refer to Create Folder flow action.
  3. Destination Folder Id - Id of the destination folder. You can get it from one of the earlier actions in flow like "Create Folder" or from a value saved in a custom field.
  4. Destination Drive Id - Id of the destination drive id in SharePoint or Google Drive. To get the value of Drive Id, please refer to Create Folder Flow Action
  5. File/Folder Ids - List of Ids of files/folders which need to be copied



Document image


Please note, the parameter "File/Folder Ids" is a list parameter, which would only accept value of type list. If you're copying a single file/folder, you can convert it to a list using an assignment element. To do this - 

  1. Insert an "Assignment" element in the flow before the "Copy Resource" action
  2. In the Variable field, click "New Resource"
  3. Set up a new resource as shown below -



Document image


Please select the Data Type as "Text" and check the box "Allow multiple values(collection)"

4. Click Done, and then configure the assignment element as shown below -

Document image


Please note the operator to be used is "Add" and the value is the Id of single file/folder