Google Sheets
Manage spreadsheets in Google Sheets.
What’s inside
-
Google Sheets component, URI syntax:
google-sheets:apiName/methodName -
Google Sheets Stream component, URI syntax:
google-sheets-stream:spreadsheetId
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-google-sheets-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 36 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.google-sheets-stream.access-token | The OAuth 2.0 access token, used with clientId and clientSecret. An access token typically expires after an hour, so set refreshToken for long-running use. | String | |
camel.component.google-sheets-stream.application-name | The application name that the client sends in the User-Agent header of each request, such as camel-google-sheets/1.0. | String | |
camel.component.google-sheets-stream.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.google-sheets-stream.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.google-sheets-stream.client-factory | The factory that creates the Google Sheets client of each endpoint. By default, BatchGoogleSheetsClientFactory. The option is a org.apache.camel.component.google.sheets.GoogleSheetsClientFactory type. | GoogleSheetsClientFactory | |
camel.component.google-sheets-stream.client-id | The OAuth 2.0 client ID of the application. When clientId and clientSecret are both set, the client uses OAuth 2.0 with accessToken and refreshToken; otherwise it uses serviceAccountKey, or the Application Default Credentials when that is not set either. | String | |
camel.component.google-sheets-stream.client-secret | The OAuth 2.0 client secret of the application, used together with clientId. | String | |
camel.component.google-sheets-stream.configuration | The shared configuration, whose options the endpoints use as defaults. The option is a org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration type. | GoogleSheetsStreamConfiguration | |
camel.component.google-sheets-stream.delegate | The email address of the user that the service account impersonates, with domain-wide delegation. Used only with serviceAccountKey. | String | |
camel.component.google-sheets-stream.enabled | Whether to enable auto configuration of the google-sheets-stream component. This is enabled by default. | Boolean | |
camel.component.google-sheets-stream.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.google-sheets-stream.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.google-sheets-stream.include-grid-data | Whether the spreadsheet that a poll gets includes the grid data: the cells of each sheet with their values and formats. Only used when range is not set. | false | Boolean |
camel.component.google-sheets-stream.major-dimension | Whether the values of a range are grouped by rows (ROWS) or by columns (COLUMNS). Only used when range is set. | ROWS | String |
camel.component.google-sheets-stream.max-results | The maximum number of rows (or columns, by majorDimension) kept of each range: the values after it are dropped from the ValueRange, or with splitResults, no message is sent for them. Only used when range is set. The default 0 means no limit. | Integer | |
camel.component.google-sheets-stream.range | The ranges whose values each poll gets, in A1 notation and separated by commas, such as Sheet1!A1:C10. When not set, each poll gets the whole spreadsheet instead. | String | |
camel.component.google-sheets-stream.refresh-token | The OAuth 2.0 refresh token, used with clientId and clientSecret to obtain a new access token whenever the current one expires. Needed when the application runs for a long time. | String | |
camel.component.google-sheets-stream.scopes | The OAuth 2.0 scopes to request, separated by commas, such as https://www.googleapis.com/auth/spreadsheets.readonly (see SheetsScopes). They apply to serviceAccountKey and to the Application Default Credentials; with clientId and clientSecret the scopes are those granted with the refresh token, and this option is not used. No scopes are requested by default. | String | |
camel.component.google-sheets-stream.service-account-key | The JSON key file of a service account, used when clientId and clientSecret are not set. It is loaded from the classpath by default; use a prefix such as file: for another location. | String | |
camel.component.google-sheets-stream.split-results | Whether to send one message per row (or column, by majorDimension) of each range, with the List of its values as body, instead of one message per range with its ValueRange. Only used when range is set. | false | Boolean |
camel.component.google-sheets-stream.value-render-option | How the values of a range are rendered: FORMATTED_VALUE as calculated and formatted by the format of the cell, UNFORMATTED_VALUE as calculated but not formatted, FORMULA as the formula of the cell (not calculated). Only used when range is set. | FORMATTED_VALUE | String |
camel.component.google-sheets.access-token | The OAuth 2.0 access token, used with clientId and clientSecret. An access token typically expires after an hour, so set refreshToken for long-running use. | String | |
camel.component.google-sheets.application-name | The application name that the client sends in the User-Agent header of each request, such as camel-google-sheets/1.0. | String | |
camel.component.google-sheets.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.google-sheets.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.google-sheets.client-factory | The factory that creates the Google Sheets client of each endpoint. By default, BatchGoogleSheetsClientFactory. The option is a org.apache.camel.component.google.sheets.GoogleSheetsClientFactory type. | GoogleSheetsClientFactory | |
camel.component.google-sheets.client-id | The OAuth 2.0 client ID of the application. When clientId and clientSecret are both set, the client uses OAuth 2.0 with accessToken and refreshToken; otherwise it uses serviceAccountKey, or the Application Default Credentials when that is not set either. | String | |
camel.component.google-sheets.client-secret | The OAuth 2.0 client secret of the application, used together with clientId. | String | |
camel.component.google-sheets.configuration | The shared configuration, whose options the endpoints use as defaults. The option is a org.apache.camel.component.google.sheets.GoogleSheetsConfiguration type. | GoogleSheetsConfiguration | |
camel.component.google-sheets.delegate | The email address of the user that the service account impersonates, with domain-wide delegation. Used only with serviceAccountKey. | String | |
camel.component.google-sheets.enabled | Whether to enable auto configuration of the google-sheets component. This is enabled by default. | Boolean | |
camel.component.google-sheets.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.google-sheets.refresh-token | The OAuth 2.0 refresh token, used with clientId and clientSecret to obtain a new access token whenever the current one expires. Needed when the application runs for a long time. | String | |
camel.component.google-sheets.scopes | The OAuth 2.0 scopes to request, separated by commas, such as https://www.googleapis.com/auth/spreadsheets (see SheetsScopes). They apply to serviceAccountKey and to the Application Default Credentials; with clientId and clientSecret the scopes are those granted with the refresh token, and this option is not used. No scopes are requested by default. | String | |
camel.component.google-sheets.service-account-key | The JSON key file of a service account, used when clientId and clientSecret are not set. It is loaded from the classpath by default; use a prefix such as file: for another location. | String | |
camel.component.google-sheets.split-result | When consumer return an array or collection this will generate one exchange per element, and their routes will be executed once for each exchange. Set this value to false to use a single exchange for the entire list or array. | true | Boolean |