Skip to main content

Google Drive API Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow data flow that sends data to a Google Drive API location.
google_drive_api_destination.png

Google Drive API

Create a Google Drive API Destination

  1. Click the + icon on the Nexset that will be sent to the Google Drive API destination, and select the Send to Destination option from the menu.

  2. Select the Google Drive API connector from the list of available destination connectors. Then, select the credential that will be used to connect to the Google Drive API, and click Next; or, create a new Google Drive API credential for use in this flow.

  3. Google Drive API destinations can be manually configured to send data to any valid Google Drive REST API v3 endpoint. Manual configuration provides maximum flexibility for creating, updating, or managing files and resources in Google Drive.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Manually

Google Drive API destinations can be manually configured to send data to any valid Google Drive REST API v3 endpoint. Using manual configuration, you can also configure Nexla to automatically send the response received from the Google Drive API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Google Drive API from the Method pulldown menu. Common methods for Google Drive API write operations include:

    • POST — For creating new files, uploading file content, or adding permissions and comments.
    • PATCH — For partially updating existing file metadata, such as renaming a file or modifying its description.
    • DELETE — For removing files, permissions, or comments.
    • PUT — For replacing file content or updating resources where a full replacement is appropriate.

Data Format

  1. Select the format in which the Nexset data will be sent to the Google Drive API from the Content Format pulldown menu. Nexla will automatically convert the data to the selected format for each API call.

    For Google Drive API write operations, the appropriate format depends on the endpoint:

    • JSON — Used for metadata-only operations such as updating file properties, creating permission records, or adding comments. Set Content-Type: application/json when sending metadata.
    • Multipart — Used for file upload operations that combine file metadata and file content in a single request. The Google Drive multipart upload endpoint is https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart.

    For simple metadata updates (such as renaming a file or updating its description), use the standard PATCH endpoint at https://www.googleapis.com/drive/v3/files/{fileId} with a JSON body containing the fields to update. File content uploads require the resumable or multipart upload endpoints. For complete upload documentation, refer to the Google Drive API upload guide.

API Endpoint URL

  1. Enter the URL of the Google Drive API endpoint to which you want to send the Nexset data in the URL field. Common write endpoint patterns include:

    • Create a file (metadata only): https://www.googleapis.com/drive/v3/files
    • Update file metadata: https://www.googleapis.com/drive/v3/files/{fileId} — Replace {fileId} with the ID of the file to update.
    • Add a permission: https://www.googleapis.com/drive/v3/files/{fileId}/permissions
    • Add a comment: https://www.googleapis.com/drive/v3/files/{fileId}/comments
    • Multipart upload (file + metadata): https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart

    The Google Drive API uses file IDs (not file names or paths) to identify resources. File IDs are alphanumeric strings visible in the shareable link URL for a file (e.g., https://drive.google.com/file/d/{fileId}/view). Use a Google Drive API data source to retrieve file IDs before using them in destination configurations.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers and corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include the OAuth 2.0 Authorization header, as it is handled automatically by Nexla based on your Google Drive API credential configuration.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this Google Drive API destination, select the attributes from the Exclude Attributes pulldown menu.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional
  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings.

Response Webhook

Optional

Nexla can automatically send the response received from the Google Drive API after each call to a new Nexla webhook data source. This option allows you to keep track of the status of each API call and any additional information returned, such as the file ID and metadata of a newly created file.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the Google Drive API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.

  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing (Manual Configuration)

After all endpoint settings have been configured, Nexla can send a test payload to the Google Drive API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the Google Drive API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to the configured Google Drive API endpoint, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to the Google Drive API endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.