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
- Library- One of sharepoint, google, onedrive, dropbox, box, cloudfiles
- 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
- 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.
- 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
- File/Folder Ids - List of Ids of files/folders which need to be copied
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 -
- Insert an "Assignment" element in the flow before the "Copy Resource" action
- In the Variable field, click "New Resource"
- Set up a new resource as shown below -
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 -
Please note the operator to be used is "Add" and the value is the Id of single file/folder