Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Camel component for integrate with Google Drive
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Camel Google Drive Component

The Google Drive component supports storing objetcs to Google Drive service.

URI Format


You can append query options to the URI in the following format, ?options=value&option2=value&...

URI Options

Name Default Value Context Description
gDriveClient null Shared Reference to a in the Registry.
accessToken null Shared Google Drive access token
refreshToken null Shared Google Drive refresh token
clientId null Shared Application id to connect to Google Drive
clientSecret null Shared Application secret key to connect to Google Drive
deleteAfterRead true Shared Delete files from google drive after read


This component use Offline OAuth 2.0 for Web Server Applications, you should follow the following instructions to get an authentication code: The component doesn't provide the authentication process, it assumes that the token given is valid.

In case a clientId and clientSecret were configured, a refresh token request is made by the component. Enabling a expired token request still alive and sucess without throwing an unauthorized exception.

How to use with DSL

protected RouteBuilder createRouteBuilder() throws Exception {
    return new RouteBuilder() {
        public void configure() {

How to use with XML

  <from uri="file://local/path" />
  <process ref="myProcessor" />
  <to uri="gdrive://mydrive" />

Message Headers

Header Description
CamelGDriveContentType Content type of the file
CamelGDriveDescription Description for the file that will appear in Google Drive
CamelGDriveTitle Title of the file in Google Drive (the name)
CamelGDriveETag ETag for file
CamelGDriveFileId File identifier given by Google Drive
CamelGDriveAccessToken Access token for Google Drive
CamelGDriveRefreshToken Refresh token for Google Drive
CamelGDriveMD5 Content MD5 checksum
CamelGDriveContentLength Content length of the file
CamelGDriveLastModified File last modified date


Maven users will need to add the following dependency to their pom.xml.


where ${gdriveversion} must be replaced by the actual version (1.0-SNAPSHOT or higher).




Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Something went wrong with that request. Please try again.