Google DRIVE API - Create a copy of a file stored in Google DRIVE

Andrew_239256 Posts: 16 admin
edited January 2022 in API Actions

The following guide utilizes the Google DRIVE API to create a copy of a file stored in a Google DRIVE folder

While native actions in Catalytic allow builders to interact with Google DRIVE in several ways, builders can further leverage the standard Google DRIVE integration using the existing GET, POST, PUT, PATCH, and DELETE API actions to access a broader set of endpoints within the Google DRIVE API library.

With Catalytic managing API authentication, this functionality allows builders to quickly and simply extend Catalytic’s Google DRIVE integration to accomplish custom Google DRIVE actions within a workflow.

To create a copy of a file currently stored in a Google DRIVE folder using a custom API endpoint, please follow the instructions below:

Step 1: Set up Google DRIVE integration

Note: If a Google DRIVE integration has already been set up, move to step 2.

For detailed instructions on how to set up a Google DRIVE integration, reference the following help article within the Catalytic knowledgebase:

Step 2: Configure Catalytic action to create a copy of a file stored in Google DRIVE

In a new or existing workflow, add a new action of type ‘Web API: Send POST Request’. Configure as follows:

API endpoint:{{fileid}}/copy

Create a field in Catalytic for {{fileid}} or replace {{fileid}} with the ID of the file that should be deleted.

Headers: Leave blank
Request body: Leave blank

**Note: Folders cannot be copied.

Please reference the Google DRIVE API documentation for additional information.

Step 3: Test your workflow

Click the test button to create a copy of the target file stored in Google DRIVE.

Please reference the sample workflow attached for testing purposes.