Note: Use and transfer of information received from Google APIs to any other app will adhere to Google API Services User Data Policy, including the Limited Use requirements.

Google Drive - Copy a file

Use the Google Drive - Copy a file action A tool for building the processes, logic, and direction within workflows. to copy a file from one location to another in Google Drive.

For more information about the Google Drive connector, see Google Drive.

Configure the Google Drive - Copy a file action

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add, rename, and copy actions.

  2. Select a Connection. If you do not have a connection, see Add a connection.
  3. Select the Drive you want to copy the file from.
  4. Select a source type. The option presented will be dependent on the source type selected:
    1. The File path of the file you want to copy. You can also browse the file structure using the browse icon ().
    2. The File ID of the file you want to copy.
  5. Select the Drive you want to copy the file to.
  6. Select a destination type.
  7. The option presented will be dependent on the destination type selected:
    1. The Folder path of the file you want to copy. You can also browse the file structure using the browse icon ().
    2. The Folder ID of the file you want to copy.
  8. Select whether to Overwrite a file if it has the same name as the file being copied.
  9. Select or create a variable for the Result output.

Google Drive - Copy a file action fields and settings

Section Field Description Variable types
(unlabeled) Connection Credentials and other settings required to pass data between the workflow and the indicated service, which could be a cloud service, business application, or content store.

The Google Drive connection that will be used to copy a file.

To refresh the available connections, click Refresh.

(n/a)
Source Drive The drive where the file is stored. Text
  Select a source type

The source type which will be used to retrieve the file.

  • File path

  • File ID

Boolean
  File path The path of the file you want to copy. You can also browse the file structure using the browse icon (). Text
  File ID

The ID of the file you want to copy.

The file ID can be retrieved by using the Google Drive - Get file metadata action's ID output .

Text
Destination Drive The drive where you want the file to be stored. Text
  Select a destination type

The destination type which will be used to store the file.

  • Folder path

  • Folder ID

Boolean
  Folder path The path to the folder you want to copy the file to. You can also browse the folder structure using the browse icon (). Text
  Folder ID

The ID of the folder you want to copy the file to.

The file ID can be retrieved by using the Google Drive - Get file metadata action's ID output .

Text
  Overwrite file? Select whether to overwrite a file, if it has the same name as an existing file. Boolean
Output

Result

Stores the result of the action in an object with the following variables:

  • ID: The ID of the file.
  • Parent ID: The ID of the parent file.
  • Drive ID: ID of the shared drive the file resides in.
  • Name: The name of the file.
  • Path: The path of the file.
  • Created On: The date the file was created.
  • Download Link: Short lived download URL for the file.
  • Is Folder: Boolean variable for if it's a folder.
  • MIME Type: The MIME type of the file.
  • Modified On: The last date the file was modified.
  • Modified By (Email): The email of the user who last modified the file.
  • Modified By (Display Name): The display name of the user who last modified the file.
  • Size (bytes): The size of the file.
  • Starred: Boolean value for if the file is starred.
  • Trashed: Boolean value for if the file is trashed.
  • View Link: A link only available on public files for viewing their static web assets.

Object