Help Centre › Functions & Formulas
This article describes the RPA Google Drive functionality to copy a file.
For a full list of available functions, please read Google Drive functions.
Description
The Google Drive Copy file function copies a file in Google Drive, optionally with a new name and/or into a different folder. The original file remains unchanged.
Setting it up
To use the Google Drive Copy file function, follow these instructions:
{{popups:rpas/add:action=google-workspace-drive-copy}}
Once on a process map:
- Navigate to the process where you would like to add the Google Drive Copy file function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the Google Drive Copy file option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| File ID | Yes | Text | - | The Google Drive file ID to copy |
| New name | No | Text | Original name | New name for the copied file |
| Destination folder ID | No | Text | Same folder | Destination folder ID |
| Variable | No | Text | - | State variable to store the new file ID |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Text | The ID of the newly created copy |
Errors
| Error | Description |
|---|---|
| File not found | The specified file ID does not exist |
| Permission denied | Insufficient permissions to copy the file |
| Folder not found | The destination folder ID does not exist |
Tips
- Use variables like {file_id} for dynamic file IDs
- If no new name is specified, the copy retains the original name
- The copied file inherits the permissions of the destination folder