> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Google Drive connector

- Connector: `appmixer.google.drive`
- Version: 2.4.4
- Components: 16 (3 triggers, 13 actions)

Google Drive is a cloud-based storage service that enables users to store and access files online. The service syncs stored documents, photos and more across all the user's devices, including mobile devices, tablets and PCs.

- Connector page: <https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4>
- Source code: <https://github.com/clientIO/appmixer-connectors/tree/dev/src/appmixer/google/drive>
- Download package: <https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/download>

## Authentication

**Type:** OAuth 2

This connector is globally authenticated and verified by Appmixer (Authentication Hub) and is ready to use without registering your own OAuth application with the provider. You can still use your own OAuth credentials (clientId and clientSecret) - see the Connector Configuration section of the documentation. The Authentication Hub is enabled for all hosted Appmixer tenants; on self-managed installations it has to be explicitly set.

**Scopes:**

- `profile`
- `email`

## Triggers (3)

- [Deleted File Or Folder](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.DeletedFileOrFolder.md) (`appmixer.google.drive.DeletedFileOrFolder`): Trigger every time a file or folder is deleted in your Google Drive. This does not download the file content. Use DownloadFile if you need the file content. Additional scopes: `https://www.googleapis.com/auth/drive.readonly`.
- [New File Or Folder](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.NewFileOrFolder.md) (`appmixer.google.drive.NewFileOrFolder`): Trigger every time a new file or folder is added to your Google Drive. This does not download the file content. Use DownloadFile if you need the file content. Additional scopes: `https://www.googleapis.com/auth/drive.readonly`.
- [Updated File Or Folder](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.UpdatedFileOrFolder.md) (`appmixer.google.drive.UpdatedFileOrFolder`): Trigger every time a file or folder is updated in your Google Drive. This does not download the file content. Use DownloadFile if you need the file content. Additional scopes: `https://www.googleapis.com/auth/drive.readonly`.

## Actions (13)

- [Copy File](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.CopyFile.md) (`appmixer.google.drive.CopyFile`): Copy a file within your Google Drive. Additional scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.readonly`.
- [Create File From Text](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.CreateFileFromText.md) (`appmixer.google.drive.CreateFileFromText`): Create a new file from text content and upload it to your Google Drive. Additional scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.readonly`.
- [Create Folder](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.CreateFolder.md) (`appmixer.google.drive.CreateFolder`): Create a new folder in your drive. Additional scopes: `https://www.googleapis.com/auth/drive.file`, `https://www.googleapis.com/auth/drive.readonly`.
- [Create Shortcut](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.CreateShortcut.md) (`appmixer.google.drive.CreateShortcut`): Create a shortcut to a file or folder. Additional scopes: `https://www.googleapis.com/auth/drive.file`, `https://www.googleapis.com/auth/drive.readonly`.
- [Add File Or Folder Permission](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.AddFileOrFolderPermission.md) (`appmixer.google.drive.AddFileOrFolderPermission`): Add a permission to a file or folder in Google Drive. Additional scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.readonly`.
- [Delete File Or Folder](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.DeleteFileOrFolder.md) (`appmixer.google.drive.DeleteFileOrFolder`): Delete a file or folder from your Google Drive. Additional scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.readonly`.
- [Find Files Or Folders](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.FindFilesOrFolders.md) (`appmixer.google.drive.FindFilesOrFolders`): Find files or folders in your Google Drive. Additional scopes: `https://www.googleapis.com/auth/drive.readonly`.
- [Get File Metadata](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.GetFileMetadata.md) (`appmixer.google.drive.GetFileMetadata`): Get Google Drive file metadata. Additional scopes: `https://www.googleapis.com/auth/drive.readonly`.
- [Make Api Call](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.MakeApiCall.md) (`appmixer.google.drive.MakeApiCall`): Generic method for making API calls to a 3rd party service. Additional scopes: `https://www.googleapis.com/auth/drive`.
- [Move File Or Folder](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.MoveFileOrFolder.md) (`appmixer.google.drive.MoveFileOrFolder`): Move a file or folder within your Google Drive. Additional scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.readonly`.
- [Update File Or Folder](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.UpdateFileOrFolder.md) (`appmixer.google.drive.UpdateFileOrFolder`): Update an existing file or folder. Additional scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.readonly`.
- [Upload File](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.UploadFile.md) (`appmixer.google.drive.UploadFile`): Upload file into drive. Additional scopes: `https://www.googleapis.com/auth/drive.file`, `https://www.googleapis.com/auth/drive.readonly`.
- [Download File](https://connectors.appmixer.com/connector/appmixer.google.drive/2.4.4/component/appmixer.google.drive.DownloadFile.md) (`appmixer.google.drive.DownloadFile`): Download the content of the file from your Google Drive. Additional scopes: `https://www.googleapis.com/auth/drive.readonly`.

## Changelog

### 2.4.4

- NewFileOrFolder: files added by other users to a watched folder were sometimes not detected. A file counted as new only if it had not been modified or opened by the connected account since it was created, so a file that the uploader edited right after uploading, or that the connected account opened before the change was processed, was skipped. Any file created since the trigger last processed the change feed is now emitted (once).

### 2.4.3

- Security: upgraded uuid to 11.1.1 (missing buffer bounds check in v3/v5/v6).
- Security: upgraded moment to 2.31.0 (medium advisory).

### 2.4.2

- MakeApiCall: Request Headers and Query Parameters set in the Designer are now sent. They were silently dropped: the key-value field stores its rows as a JSON object string, which the component did not parse.

### 2.4.1

- NewFileOrFolder, UpdatedFileOrFolder, DeletedFileOrFolder: fixed a lock livelock which could produce a storm of 'Exceeded 30 attempts to lock the resource' errors and receive timeouts when a large change backlog was being processed.
- NewFileOrFolder, UpdatedFileOrFolder, DeletedFileOrFolder: the change backlog is now processed in bounded batches with the page token persisted after every page, so a redelivered message resumes instead of restarting.
- NewFileOrFolder, UpdatedFileOrFolder, DeletedFileOrFolder: webhook channel renewal from the trigger tick no longer retries a contended lock, holds the lock for the whole re-registration and no longer rewrites the stored page token; Google Drive API calls now have an HTTP timeout.
- NewFileOrFolder, UpdatedFileOrFolder, DeletedFileOrFolder: with Recursive enabled, a file created under a subfolder that appeared in the same batch of changes was silently skipped; the subfolder list is now rebuilt and the batch re-checked before it is marked as processed.
- NewFileOrFolder, UpdatedFileOrFolder, DeletedFileOrFolder: a freshly created file that Google Drive lists again in the change feed a few minutes later (same modifiedTime, higher version) was emitted a second time; the trigger now remembers the last 5000 processed files instead of the last three batches.
- GetFileMetadata: fixed a missing typeof check which made the component fail with 'Missing required parameters: fileId' whenever the file ID was passed as a plain string (a variable) instead of being chosen in the Google Picker.
- UpdateFileOrFolder: the file ID input is now declared required.
- CopyFile, MoveFileOrFolder, DownloadFile, GetFileMetadata, DeleteFileOrFolder, CreateFileFromText, UpdateFileOrFolder, AddFileOrFolderPermission: a missing required input now fails with a clear 'is required' error instead of an opaque Google API error.
- All components: realistic example values on every output port, so the designer variable picker shows previews.
- FindFilesOrFolders: output item schema exported for tooling; the output port options source no longer requires authentication.
- DeleteFileOrFolder: the declared googleDriveFileId output is now actually emitted (the component only ever sent fileId, so the designer variable resolved to nothing); fileId is still sent as well.

### 2.4.0

- Added MakeApiCall component for performing arbitrary authorized API calls to the Google Drive API.

### 2.3.0

- NewFileOrFolder, UpdatedFileOrFolder: added test() method for Flow Test Mode (read-only fetch of the newest matching file/folder). DeletedFileOrFolder has no read-only example source and is intentionally not testable this way.

### 2.2.4

- Fixed an issue with NewFileOrFolder trigger causing false negatives when processing changes in shared folders.

### 2.2.3

- Fixed an issue with triggers NewFileOrFolder, UpdatedFileOrFolder, and DeletedFileOrFolder which could result in errors when accessing file parents in some scenarios (e.g., read-only access and/or shared drives).

### 2.2.2

- UploadFile: fixed an issue with uploading files to shared drives.

### 2.2.0

- Added multiselect input normalization for improved compatibility.
- FindFilesOrFolders: fileTypes field now accepts both array and comma-separated string inputs.
- DeletedFileOrFolder, NewFileOrFolder, UpdatedFileOrFolder: fileTypesRestriction field now accepts both array and comma-separated string inputs.

### 2.1.1

- FindFilesOrFolders: added support for recursive search and ordering of returned items.
- NewFileOrFolder, UpdatedFileOrFolder: added support for monitoring files/folders in a folder recursively.
- DeletedFileOrFolder: new component to monitor deleted files or folders.
- AddFileOrFolderPermission: fixed domain type permissions.

### 2.0.1

- Removed deprecated components: GetFile, ExportFile. Use DownloadFile instead. Removed ListFiles. Use FindFilesOrFolders instead.
- Renamed FindFileOrFolder to FindFilesOrFolders.
- Renamed NewFile to NewFileOrFolder.
- Renamed UpdatedFile to UpdatedFileOrFolder.
- Added new components: UpdatedFile, GetFileMetadata, CreateFileFromText, AddFileOrFolderPermission, CreateShortcut, UpdateFile.
- Improved input fields UX of multiple components.
- Improved labels and tooltips of all components.
- Improved output variables of all components.

### 1.4.7

- CreateFolder, FindFileOrFolder, UploadFile: handle the filename or folder name containing special characters.

### 1.4.6

- Debug messages are turned off by default. Set the DEBUG configuration key in the Backoffice to true to see the messages (currently in the NewFile and in the MoveFileOrFolder components only).

### 1.4.5

- MoveFileOrFolder: fixes - prevent 'Increasing the number of parents is not allowed', added DEBUG info message - logging file metadata and request params. Set the DEBUG configuration key in the Backoffice to true to see the messages.

### 1.4.4

- NewFile: fixes, improvements. Added DEBUG info messages. Set the DEBUG configuration key in the Backoffice to true to see the messages.

### 1.4.1

- Fixed 'ListFiles' component outPort options.

### 1.4.0

- Fixed returning metadata in the GetFile component.
- Added new component DownloadFile to retrieve the content of the file.

### 1.3.7

- Updated dependencies: moment.

### 1.3.6

- Fixed ListFiles output port schema.

### 1.3.2

- Fixed searching files in ListFiles component when using Custom search query.

### 1.3.1

- Fixed NewFile component detection of new files.

### 1.3.0

- Added support for filtering files in ListFiles component.
- Added standard outport types for ListFiles component: item, items, file.

### 1.2.1

- Fixed missing scope for ListFiles component.

### 1.2.0

- Add Google branded sign-in button.

### 1.1.0

- New components.

### 1.0.2

- NewFile description changed.

### 1.0.0

- Initial version
