# mulesoft Google Sheets Connector - Full Documentation --- product: Google Sheets Connector version: 1.0 --- # Google Sheets - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/google-sheets http://www.mulesoft.org/schema/mule/google-sheets/current/mule-google-sheets.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-google-sheets-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `google sheets`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try the [Examples](https://docs.mulesoft.com/google-sheets-connector/1.0/google-sheets-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.1 is-latest-version: true --- # Google Sheets - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/google-sheets http://www.mulesoft.org/schema/mule/google-sheets/current/mule-google-sheets.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-google-sheets-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `google sheets`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try the [Examples](https://docs.mulesoft.com/google-sheets-connector/latest/google-sheets-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.0 --- # Google Sheets Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Google Sheets (Google Sheets Connector) synchronizes data and automates business processes between Google Sheets and third-party applications, either on-premises or in the cloud. Google Sheets is a real-time spreadsheet tool with powerful functions to help teams efficiently perform multiple functions such as helping sales teams collaborate on leads and opportunities, and helping HR teams collaborate on candidates for interviewing and hiring. For compatibility information and fixed issues, see the Google Sheets Connector release notes. ## Before You Begin To use this connector, you must be familiar with: - The Google Sheets API and the Google Drive API (if planning to use the List Drive Files operation) - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - Creating a Mule app using Anypoint Studio or Anypoint Code Builder Before creating an app, you must have access to: - The Google Sheets API target resource - Anypoint Studio or Anypoint Code Builder ## Common Use Case for the Connector Common use cases for the connector include the following: - Improve sales operations Automate a workflow in which a Google Sheets spreadsheet is auto-populated every time a new lead is created in Salesforce. This sales team can then use the spreadsheet to collaborate on further research. - Enhance customer service Catalog all incoming issues in a spreadsheet and set up automatic rules to alert the team when an issue starts approaching SLA deadlines. - Optimize HR processes When a new candidate reaches out via an applicant tracking system such as Workday or Greenhouse, capture the candidate details in a spreadsheet so that other stakeholders can review and contact the appropriate candidates. ## Next Step After you complete the prerequisites, you are ready to create your own app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/google-sheets-connector/1.0/google-sheets-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.0 --- # Google Sheets Connector 1.0 - Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following examples show how to use Anypoint Connector for Google Sheets (Google Sheets Connector) to create a row in an existing spreadsheet. ## Before You Begin You must have: - Access to Google Sheets - OAuth username and password ## Configure HTTP Listener Configure **HTTP Listener** to initiate a Mule flow when a call is made to the `/` account path on localhost, port 8081. This example uses variables for some field values. You can either: - Replace the variables with their values in the code. - Provide the values for each variable in a properties file and then refer to that file from the connector configuration. If you don’t know how to use a properties file, see [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure). To configure **HTTP Listener**: 1. Create a new Mule project in Studio. 2. In the **Mule Palette** view, search for `http` and select the **Listener** operation: 3. Drag the **Listener** operation onto the canvas. 4. In the **Listener** configuration, click **+** next to the **Connector configuration** field to add a global element. 5. Click **OK** to accept the defaults. 6. Set the **Path** field to `/`: ## Add and Configure the Append Spreadsheets Values Operation 1. In the **Mule Palette** view, search for `Google Sheets` and select the **Append Spreadsheets Values** operation. 2. Drag the **Append Spreadsheets Values** operation onto the canvas, to the right of the **HTTP Listener** component. 3. In the **Append Spreadsheets Values** configuration, click **+** next to the **Connector configuration** field to add a global element. 4. Configure the global element as follows: - **Configuration Name**: `Google_Sheets_Connector_Mule4Connector_Config` - **Consumer key**: `${config.consumerKey}` - **Consumer secret**: `${config.consumerSecret}` - **Authorization url**: Leave the default - **Access token url**: Leave the default - **Callback path**: `${config.callbackPath}` - **Authorize path**: `${config.authorizePath}` 5. Click **Test Connection** to ensure your username, password, and tenant name are correct. 6. Click **OK**. ## Configure required parameters of the Append Spreadsheets Values Operation 1. Click the **Append Spreadsheets Values** component. 2. In the configuration panel of the component set parameters with your proper values (next values are examples): - **Spreadsheet id**: `19y7nVZPQz3NQSTSGfCh06KXPIqGV2YXohTupmynJyZ5` - **range**: `Sheet1!A1` 3. Click **OK**. ## Add a Logger Component to Display the Response in the Mule Console 1. In the **Mule Palette** view, search for `logger` and select **Logger (Core)**. 2. Drag the **Logger** component onto the canvas, to the right of the **Append Spreadsheets Values** component. 3. Configure the following fields:
FieldValue

Display Name

Enter Log Response.

Message

Enter `#[payload]`.

Level

Leave the default, INFO.

4. Create property file mule-artifact.properties in the src/main/resources with properties used in this demo - `config.consumerKey` - `config.consumerSecret` - `config.callbackPath` - `config.authorizePath` 5. Save the project. 6. Test the app by sending a request to `/` on port 8081. 7. You will receive an JSON response similar to this one: ```xml { "spreadsheetId": "19y7nVZPQz3NQSTSGfCh06KXPIqGV2YXohTupmynJyZ5", "tableRange": "Demo!A1:C38", "updates": { "spreadsheetId": "19y7nVZPQz3NQSTSGfCh06KXPIqGV2YXohTupmynJyZ5", "updatedRange": "Demo!A39" } } ``` ## Append Spreadsheets Values in a Spreadsheet Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.0 --- # Google Sheets Connector 1.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Google Sheets (Google Sheets Connector) enables you to interface with the Google Sheets platform without having to interact with the Google Sheets API directly. ## Configurations --- ### Config #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Response Timeout

Number

The timeout for the request to the remote service.

1

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

MINUTES

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

AUTO

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Connection Types ##### Oauth 2 0 Connection Provider ###### Parameters
NameTypeDescriptionDefault ValueRequired

Default Headers

Query Parameters

Connection Timeout

Number

The timeout for establishing connections to the remote service

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Connection Timeout

SECONDS

Use Persistent Connections

Boolean

If false, each connection is closed after the first request is completed.

true

Max Connections

Number

The maximum number of outbound connections to keep open at the same time

-1

Connection Idle Timeout

Number

A timeout for how long a connection can remain idle before it is closed

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Connection Idle Timeout

SECONDS

Proxy Config

Reusable configuration element for outbound connections through a proxy

Stream Response

Boolean

Whether or not received responses should be streamed

false

Response Buffer Size

Number

The space, in bytes, for the buffer where the HTTP response is stored.

-1

Protocol

Enumeration, one of:

  • HTTP

  • HTTPS

Protocol to use for communication. Valid values are HTTP and HTTPS.

HTTP

TLS Configuration

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Consumer Key

String

The OAuth consumer key as registered with the service provider

x

Consumer Secret

String

The OAuth consumer secret as registered with the service provider

x

Authorization Url

String

The service provider’s authorization endpoint URL

https://accounts.google.com/oauth2/auth/

Access Token Url

String

The service provider’s access token endpoint URL

https://oauth2.googleapis.com/token

Scopes

String

The OAuth scopes to request during the dance.

https://www.googleapis.com/auth/spreadsheets, https://www.googleapis.com, and /auth/drive.readonly

Resource Owner Id

String

The resource owner ID that each component should use if it isn’t referenced otherwise.

Before

String

The name of a flow to execute before starting the OAuth dance

After

String

The name of a flow to execute after an access token is received

Listener Config

String

A reference to an <http:listener-config /> to use to create the listener that will catch the access token callback endpoint.

x

Callback Path

String

The path of the access token callback endpoint

x

Authorize Path

String

The path of the local HTTP endpoint that triggers the OAuth dance

x

External Callback Url

String

If the callback endpoint is behind a proxy or should be accessed through an indirect URL, use this parameter to tell the OAuth provider the URL it should use to access the callback

Object Store

String

A reference to the object store to use to store each resource owner ID’s data. If not specified, runtime automatically provisions the default object store.

## Sources - [On New Row Listener](#NewRowListener) - [On New Spreadsheet Listener](#NewSpreadsheetListener) - [On Updated Row Listener](#UpdatedRowListener) ### On New Row Listener `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Response timeout

Number

30

Response timeout time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

SECONDS

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running in a cluster

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Redelivery Policy

RedeliveryPolicy

Defines a policy for processing the redelivery of the same message

Spreadsheet

String

ID of the spreadsheet

x

Worksheet Name

String

Name of the worksheet

x

Reconnection Strategy

A retry strategy in case of connectivity errors

#### Output

Type

Any

#### For Configurations - [Config](#Config) ### On New Spreadsheet Listener `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Response timeout

Number

30

Response timeout time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

SECONDS

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running in a cluster

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

sour

Redelivery Policy

RedeliveryPolicy

Defines a policy for processing the redelivery of the same message

sour

Reconnection Strategy

A retry strategy in case of connectivity errors

sour

#### Output

Type

Any

#### For Configurations - [Config](#Config) ### On Updated Row Listener `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Response timeout

Number

30

Response timeout time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

SECONDS

Include Newly Added Rows

Boolean

Indicates whether to include newly added rows in the output.

false

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running in a cluster

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Redelivery Policy

RedeliveryPolicy

Defines a policy for processing the redelivery of the same message

Spreadsheet

String

The ID of the spreadsheet

x

Worksheet Name

String

The name of the worksheet

x

Reconnection Strategy

A retry strategy in case of connectivity errors

#### Output

Type

Any

### For Configurations - [Config](#Config) ## Supported Operations - [Append Spreadsheets Values](#CreateSpreadsheetsValuesRangeappendBySpreadsheetId) - [List Drive Files](#GetFiles) - [Get Spreadsheet Properties](#GetSpreadsheetsBySpreadsheetId) - [Get Spreadsheets Values](#GetSpreadsheetsValuesBySpreadsheetIdRange) - [Unauthorize](#Unauthorize) - [Update Spreadsheets Values](#UpdateSpreadsheetsValuesBySpreadsheetIdRange) ## Operations ## Append Spreadsheets Values `` Appends values to an existing spreadsheet, as determined by the specified range This operation makes an HTTP POST request to the `/spreadsheets/{spreadsheetId}/values/{range}:append` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Spreadsheet

String

ID of the target spreadsheet

x

Range

String

A1 notation of a range that determines where to start appending the values. The values are appended starting in the first column and after the last row in the specified range.

x

Value Input Option

Enumeration, one of:

  • USER_ENTERED

  • INPUT_VALUE_OPTION_UNSPECIFIED

  • RAW

Indicates how to interpret the new content: INPUT_VALUE: Default input value. This value must not be used. RAW: Append the content as is, without parsing it. USER_ENTERED: Parse the values as if they were entered into the Google Sheets UI.

USER_ENTERED

Content Type

String

Type of content

application/json

Spreadsheets Values Rangeappend Content

Any

Content to append

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Custom Query Parameters

Object

Custom Headers

Object

Response Timeout

Number

The timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

Target Variable

String

Name of the variable that stores the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## List Drive Files `` Returns a list of the user’s Google Drive files This operation makes an HTTP GET request to the `/files` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Page Size

String

Page size for the returned results

100

Query

String

Search query

Fields

String

Paths to the fields to include in the response. Use * to retrieve all fields.

Order By

String

Order By

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Custom Query Parameters

Object

#[null]

Custom Headers

Object

Response Timeout

Number

The timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

Target Variable

String

Name of the variable that stores the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### Output

Type

Array of Any

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Get Spreadsheet Properties `` Returns the Properties of the specified Google spreadsheet This operation makes an HTTP GET request to the `/spreadsheets/{spreadsheetId}?fields=sheets.properties` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Spreadsheet Id

String

ID of the target spreadsheet

x

Fields

String

Paths to the fields to include in the response. Use * to retrieve all fields.

Content Type

String

Content type

application/json

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Custom Query Parameters

Object

#[null]

Custom Headers

Object

Response Timeout

Number

The timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

Target Variable

String

Name of the variable that stores the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Get Spreadsheets Values `` Returns the values from the specified range in a Google spreadsheet This operation makes an HTTP GET request to the `/spreadsheets/{spreadsheetId}/values/{range}` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Spreadsheet

String

ID of the target spreadsheet

x

Range

String

A1 notation of the range whose properties to return. You can specify multiple ranges.

x

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Custom Query Parameters

Object

#[null]

Custom Headers

Object

Response Timeout

Number

The timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

Target Variable

String

Name of the variable that stores the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Unauthorize `` Deletes all of the access token information associated with a given resource owner ID, so that it’s impossible to execute an operation for that user without redoing the authorization dance ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Resource Owner Id

String

The ID of the resource owner whose access should be invalidated

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

### For Configurations - [Config](#Config) ## Update Spreadsheets Values `` Updates the values of a spreadsheet at the specified range This operation makes an HTTP PUT request to the `/spreadsheets/{spreadsheetId}/values/{range}` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Spreadsheet

String

ID of the target spreadsheet

x

Range

String

A1 notation of the range where you want to update values

x

Value Input Option

Enumeration, one of:

  • USER_ENTERED

  • INPUT_VALUE_OPTION_UNSPECIFIED

  • RAW

Indicates how to interpret the new content: INPUT_VALUE: Default input value. This value must * not be used. RAW: Append the content as is, without parsing it. USER_ENTERED: Parse the values as if they were entered into the Google Sheets UI.

USER_ENTERED

Content Type

String

Content type

application/json

Spreadsheets Values Rangeappend Content

Any

Updated values

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Custom Query Parameters

Object

Custom Headers

Object

Response Timeout

Number

The timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

Target Variable

String

Name of the variable that stores the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Types ### Default Header
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Default Query Param
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Proxy
FieldTypeDescriptionDefault ValueRequired

Host

String

x

Port

Number

x

Username

String

Password

String

Non Proxy Hosts

String

### Tls
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

A comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

A comma-separated list of cipher suites enabled for this context.

Trust Store

Key Store

Revocation Check

### Trust Store
FieldTypeDescriptionDefault ValueRequired

Path

String

The location (which is resolved relative to the current classpath and file system, if possible) of the trust store.

Password

String

The password used to protect the trust store.

Type

String

The type of store used.

Algorithm

String

The algorithm used by the trust store.

Insecure

Boolean

If true, no certificate validations is performed, rendering connections vulnerable to attacks. Use at your own risk.

### Key Store
FieldTypeDescriptionDefault ValueRequired

Path

String

The location (which is resolved relative to the current classpath and file system, if possible) of the key store.

Type

String

The type of store used.

Alias

String

When the key store contains many private keys, this attribute indicates the alias of the key that should be used. If not defined, the first key in the file is used by default.

Key Password

String

The password used to protect the private key.

Password

String

The password used to protect the key store.

Algorithm

String

The algorithm used by the key store.

### Standard Revocation Check
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Only verify the last element of the certificate chain.

Prefer Crls

Boolean

Try CRL instead of OCSP first.

No Fallback

Boolean

Do not use the secondary checking method (the one not selected before).

Soft Fail

Boolean

Avoid verification failure when the revocation server can not be reached or is busy.

### Custom Ocsp Responder
FieldTypeDescriptionDefault ValueRequired

Url

String

The URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response (must be in the trust store), if present.

### Crl File
FieldTypeDescriptionDefault ValueRequired

Path

String

The path to the CRL file.

### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

The reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread

Count

Number

How many reconnection attempts to make.

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

### Http Response Attributes
FieldTypeDescriptionDefault ValueRequired

Status Code

Number

x

Headers

Object

x

Reason Phrase

String

x

### Repeatable In Memory Stream
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

The amount of memory that is allocated to consume the stream and provide random access to it. If the stream contains more data than can be fit into this buffer, then the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which these attributes are expressed

### Repeatable File Store Stream
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed, content on the disk is buffered.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed

### Repeatable In Memory Iterable
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

The number of instances to initially keep in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize. Default value is 100 instances.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. Default value is 100 instances.

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

### Repeatable File Store Iterable
FieldTypeDescriptionDefault ValueRequired

In Memory Objects

Number

The maximum amount of instances to keep in memory. If more than that is required, content on the disk is buffered.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.1 is-latest-version: true --- # Google Sheets Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Google Sheets (Google Sheets Connector) synchronizes data and automates business processes between Google Sheets and third-party applications, either on-premises or in the cloud. Google Sheets is a real-time spreadsheet tool with powerful functions to help teams efficiently perform multiple functions such as helping sales teams collaborate on leads and opportunities, and helping HR teams collaborate on candidates for interviewing and hiring. For compatibility information and fixed issues, see the Google Sheets Connector release notes. ## Before You Begin To use this connector, you must be familiar with: - The Google Sheets API and the Google Drive API (if planning to use the List Drive Files operation) - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - Creating a Mule app using Anypoint Studio or Anypoint Code Builder Before creating an app, you must have access to: - The Google Sheets API target resource - Anypoint Studio or Anypoint Code Builder ## Common Use Case for the Connector Common use cases for the connector include the following: - Improve sales operations Automate a workflow in which a Google Sheets spreadsheet is auto-populated every time a new lead is created in Salesforce. This sales team can then use the spreadsheet to collaborate on further research. - Enhance customer service Catalog all incoming issues in a spreadsheet and set up automatic rules to alert the team when an issue starts approaching SLA deadlines. - Optimize HR processes When a new candidate reaches out via an applicant tracking system such as Workday or Greenhouse, capture the candidate details in a spreadsheet so that other stakeholders can review and contact the appropriate candidates. ## Next Step After you complete the prerequisites, you are ready to create your own app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/google-sheets-connector/latest/google-sheets-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.1 is-latest-version: true --- # Google Sheets Connector 1.1 - Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following examples show how to use Anypoint Connector for Google Sheets (Google Sheets Connector) to create a row in an existing spreadsheet. ## Before You Begin You must have: - Access to Google Sheets - OAuth username and password ## Configure HTTP Listener Configure **HTTP Listener** to initiate a Mule flow when a call is made to the `/` account path on localhost, port 8081. This example uses variables for some field values. You can either: - Replace the variables with their values in the code. - Provide the values for each variable in a properties file and then refer to that file from the connector configuration. If you don’t know how to use a properties file, see [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure). To configure **HTTP Listener**: 1. Create a new Mule project in Studio. 2. In the **Mule Palette** view, search for `http` and select the **Listener** operation: 3. Drag the **Listener** operation onto the canvas. 4. In the **Listener** configuration, click **+** next to the **Connector configuration** field to add a global element. 5. Click **OK** to accept the defaults. 6. Set the **Path** field to `/`: ## Add and Configure the Append Spreadsheets Values Operation 1. In the **Mule Palette** view, search for `Google Sheets` and select the **Append Spreadsheets Values** operation. 2. Drag the **Append Spreadsheets Values** operation onto the canvas, to the right of the **HTTP Listener** component. 3. In the **Append Spreadsheets Values** configuration, click **+** next to the **Connector configuration** field to add a global element. 4. Configure the global element as follows: - **Configuration Name**: `Google_Sheets_Connector_Mule4Connector_Config` - **Consumer key**: `${config.consumerKey}` - **Consumer secret**: `${config.consumerSecret}` - **Authorization url**: Leave the default - **Access token url**: Leave the default - **Callback path**: `${config.callbackPath}` - **Authorize path**: `${config.authorizePath}` 5. Click **Test Connection** to ensure your username, password, and tenant name are correct. 6. Click **OK**. ## Configure required parameters of the Append Spreadsheets Values Operation 1. Click the **Append Spreadsheets Values** component. 2. In the configuration panel of the component, enter your own values for the following parameters, for example: - **Spreadsheet id**: `19y7nVZPQz3NQSTSGfCh06KXPIqGV2YXohTupmynJyZ5` - **range**: `Sheet1!A1` 3. Click **OK**. ## Add a Logger Component to Display the Response in the Mule Console 1. In the **Mule Palette** view, search for `logger` and select **Logger (Core)**. 2. Drag the **Logger** component onto the canvas, to the right of the **Append Spreadsheets Values** component. 3. Configure the following fields:
FieldValue

Display Name

Enter Log Response.

Message

Enter `#[payload]`.

Level

Leave the default, INFO.

4. Create a property file named `mule-artifact.properties` in `src/main/resources` with the properties used in this example: - `config.consumerKey` - `config.consumerSecret` - `config.callbackPath` - `config.authorizePath` 5. Save the project. 6. Test the app by sending a request to `/` on port 8081. 7. You will receive a JSON response similar to this one: ```xml { "spreadsheetId": "19y7nVZPQz3NQSTSGfCh06KXPIqGV2YXohTupmynJyZ5", "tableRange": "Demo!A1:C38", "updates": { "spreadsheetId": "19y7nVZPQz3NQSTSGfCh06KXPIqGV2YXohTupmynJyZ5", "updatedRange": "Demo!A39" } } ``` ## Append Spreadsheets Values in a Spreadsheet Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.1 is-latest-version: true --- # Google Sheets Connector 1.1 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Google Sheets (Google Sheets Connector) enables you to interface with the Google Sheets platform without having to interact with the Google Sheets API directly. ## Configurations --- ### Config #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Response Timeout

Number

The timeout for the request to the remote service.

1

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

MINUTES

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

AUTO

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

## Connection Types ### Oauth 2 0 Connection Provider Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). #### Parameters
NameTypeDescriptionDefault ValueRequired

Default Headers

Query Parameters

Connection Timeout

Number

Timeout for establishing connections to the remote service.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Use Persistent Connections

Boolean

If false, each connection is closed after the first request is completed.

true

Max Connections

Number

Maximum number of outbound connections to keep open concurrently.

-1

Connection Idle Timeout

Number

Timeout for how long a connection can remain idle before it is closed.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

Proxy Config

Reusable configuration element for outbound connections through a proxy.

Stream Response

Boolean

Whether or not to stream received responses.

false

Response Buffer Size

Number

The space, in bytes, for the buffer where the HTTP response is stored.

-1

Protocol

Enumeration, one of:

  • HTTP

  • HTTPS

Protocol to use for communication. Valid values are HTTP and HTTPS.

HTTP

TLS Configuration

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Consumer Key

String

The OAuth consumer key as registered with the service provider.

x

Consumer Secret

String

The OAuth consumer secret as registered with the service provider.

x

Authorization Url

String

The service provider’s authorization endpoint URL

https://accounts.google.com/oauth2/auth/

Access Token Url

String

The service provider’s access token endpoint URL

https://oauth2.googleapis.com/token

Scopes

String

OAuth scopes to request during the dance.

  • https://www.googleapis.com/auth/spreadsheets

  • https://www.googleapis.com

  • /auth/drive.readonly

Resource Owner Id

String

Resource owner ID that each component should use if it isn’t otherwise referenced.

Before

String

Name of a flow to execute before starting the OAuth dance.

After

String

Name of a flow to execute after an access token is received.

Listener Config

String

Reference to an <http:listener-config /> to use to create the listener that will catch the access token callback endpoint.

x

Callback Path

String

Path of the access token callback endpoint.

x

Authorize Path

String

Path of the local HTTP endpoint that triggers the OAuth dance.

x

External Callback Url

String

If the callback endpoint is behind a proxy or should be accessed through an indirect URL, use this parameter to tell the OAuth provider the URL to use to access the callback.

Object Store

String

Reference to the object store to use to store each resource owner ID’s data. If not specified, Mule runtime automatically provisions the default object store.

## Sources - [New Row](#NewRowListener) - [New Spreadsheet](#NewSpreadsheetListener) - [Updated Row](#UpdatedRowListener) ### New Row `` Listens for when a new row is added at the end of a sheet. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Response timeout

Number

30

Response timeout time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

SECONDS

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running in a cluster

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Redelivery Policy

RedeliveryPolicy

Defines a policy for processing the redelivery of the same message

Spreadsheet

String

ID of the spreadsheet

x

Worksheet Name

String

Name of the worksheet

x

Reconnection Strategy

A retry strategy in case of connectivity errors

#### Output

Type

Any

#### For Configurations - [Config](#Config) ### New Spreadsheet `` Listens for when a new spreadsheet is created in the Google Drive associated with the connection. Google Sheets are not saved at the moment of creation; instead, they are saved the first time they are edited. Adding a new spreadsheet won’t trigger a flow until after that spreadsheet is edited and saved. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Response timeout

Number

30

Response timeout time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

SECONDS

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running in a cluster

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Redelivery Policy

RedeliveryPolicy

Defines a policy for processing the redelivery of the same message

Reconnection Strategy

A retry strategy in case of connectivity errors

#### Output

Type

Any

#### For Configurations - [Config](#Config) ### Updated Row `` Listens for when a row is created or updated in a sheet. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

Response timeout

Number

30

Response timeout time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

SECONDS

Include Newly Added Rows

Boolean

Indicates whether to include newly added rows in the output.

false

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running in a cluster

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Redelivery Policy

RedeliveryPolicy

Defines a policy for processing the redelivery of the same message

Spreadsheet

String

The ID of the spreadsheet

x

Worksheet Name

String

The name of the worksheet

x

Reconnection Strategy

A retry strategy in case of connectivity errors

#### Output

Type

Any

### For Configurations - [Config](#Config) ## Supported Operations - [Append Spreadsheets Values](#CreateSpreadsheetsValuesRangeappendBySpreadsheetId) - [List Drive Files](#GetFiles) - [Get Spreadsheet Properties](#GetSpreadsheetsBySpreadsheetId) - [Get Spreadsheets Values](#GetSpreadsheetsValuesBySpreadsheetIdRange) - [Unauthorize](#Unauthorize) - [Update Spreadsheets Values](#UpdateSpreadsheetsValuesBySpreadsheetIdRange) ## Operations ## Append Spreadsheets Values `` Appends values to an existing spreadsheet, as determined by the specified range This operation makes an HTTP POST request to the `/spreadsheets/{spreadsheetId}/values/{range}:append` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Spreadsheet

String

ID of the target spreadsheet.

x

Range

String

A1 notation of a range that determines where to start appending the values. The values are appended starting in the first column and after the last row in the specified range.

x

Value Input Option

Enumeration, one of:

  • USER_ENTERED

  • INPUT_VALUE_OPTION_UNSPECIFIED

  • RAW

Indicates how to interpret the new content: INPUT_VALUE: Default input value. This value must not be used. RAW: Append the content as is, without parsing it. USER_ENTERED: Parse the values as if they were entered into the Google Sheets UI.

USER_ENTERED

Insert Data Option

Enumeration, one of:

  • INSERT_ROWS

  • OVERWRITE

Determines how existing data is changed when new data is input.

Content Type

String

Type of content

application/json

Spreadsheets Values Rangeappend Content

Any

Content to append

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

Timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## List Drive Files `` Returns a list of the user’s Google Drive files. This operation makes an HTTP GET request to the `/files` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Page Size

String

Page size for the returned results

100

Query

String

Search query

Fields

String

Paths to the fields to include in the response. Use * to retrieve all fields.

Order By

String

Order By

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Config Ref

ConfigurationProvider

The name of the configuration to use to execute this component

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

Timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines if the request should be sent using streaming. Setting the value to AUTO automatically defines the best strategy based on the request content.

Target Variable

String

Name of the variable that stores the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Array of Any

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Get Spreadsheet Properties `` Returns the Properties of the specified Google spreadsheet. This operation makes an HTTP GET request to the `/spreadsheets/{spreadsheetId}?fields=sheets.properties` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Spreadsheet Id

String

ID of the target spreadsheet.

x

Fields

String

Paths to the fields to include in the response. Use * to retrieve all fields.

Content Type

String

Content type

application/json

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

Timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines whether to send the request using streaming. If the value is set to AUTO, the best strategy is automatically determined based on the content of the request.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Get Spreadsheets Values `` Returns the values from the specified range in a Google spreadsheet. This operation makes an HTTP GET request to the `/spreadsheets/{spreadsheetId}/values/{range}` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Spreadsheet

String

ID of the target spreadsheet.

x

Range

String

A1 notation of the range for which to return properties. You can specify multiple ranges.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

Timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines whether to send the request using streaming. If the value is set to AUTO, the best strategy is automatically determined based on the content of the request.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Unauthorize `` Deletes all of the access token information associated with a given resource owner ID, so that it’s impossible to execute an operation for that user without repeating the authorization dance. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Resource Owner Id

String

ID of the resource owner for whom to invalidate access.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

### For Configurations - [Config](#Config) ## Update Spreadsheets Values `` Updates the values of a spreadsheet at the specified range. This operation makes an HTTP PUT request to the `/spreadsheets/{spreadsheetId}/values/{range}` endpoint. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Spreadsheet

String

ID of the target spreadsheet.

x

Range

String

A1 notation of the range for which to update values.

x

Value Input Option

Enumeration, one of:

  • USER_ENTERED

  • INPUT_VALUE_OPTION_UNSPECIFIED

  • RAW

Indicates how to interpret the new content:

  • INPUT_VALUE: Default input value. This value must not be used.

  • RAW: Append the content as is, without parsing it.

  • USER_ENTERED: Parse the values as if they were entered into the Google Sheets UI.

USER_ENTERED

Content Type

String

Content type

application/json

Spreadsheets Values Rangeappend Content

Any

Updated values

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Disables the repeatable stream functionality and uses non-repeatable streams to have less performance overhead, memory use, and cost.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

Timeout for the request to the remote service.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Defines whether to send the request using streaming. If the value is set to AUTO, the best strategy is automatically determined based on the content of the request.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - GOOGLE-SHEETS:BAD\_REQUEST - GOOGLE-SHEETS:CLIENT\_ERROR - GOOGLE-SHEETS:CONNECTIVITY - GOOGLE-SHEETS:INTERNAL\_SERVER\_ERROR - GOOGLE-SHEETS:NOT\_ACCEPTABLE - GOOGLE-SHEETS:NOT\_FOUND - GOOGLE-SHEETS:RETRY\_EXHAUSTED - GOOGLE-SHEETS:SERVER\_ERROR - GOOGLE-SHEETS:SERVICE\_UNAVAILABLE - GOOGLE-SHEETS:TIMEOUT - GOOGLE-SHEETS:TOO\_MANY\_REQUESTS - GOOGLE-SHEETS:UNAUTHORIZED - GOOGLE-SHEETS:UNSUPPORTED\_MEDIA\_TYPE ## Types ### Default Header Headers automatically added to every outbound request.
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Default Query Param
FieldTypeDescriptionDefault ValueRequired

Key

String

x

Value

String

x

### Proxy Configures the settings used to connect through a proxy.
FieldTypeDescriptionDefault ValueRequired

Host

String

Hostname or IP address of the proxy server.

x

Port

Number

Port of the proxy server.

x

Username

String

Username to authenticate against the proxy server.

Password

String

Password to authenticate against the proxy server.

Non Proxy Hosts

String

### TLS Configures TLS to provide secure communications for the Mule app.
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

A comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

A comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

### Trust Store Configures the TLS truststore.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system, if possible.

Password

String

Password used to protect the truststore.

Type

String

The type of truststore used.

Algorithm

String

Algorithm used by the truststore.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

### Key Store Configures the TLS keystore.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system, if possible.

Type

String

Type of keystore used.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Algorithm used by the keystore.

### Standard Revocation Check
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Only verify the last element of the certificate chain.

Prefer Crls

Boolean

Try CRL instead of OCSP first.

No Fallback

Boolean

Do not use the secondary checking method (the one not selected before).

Soft Fail

Boolean

Avoid verification failure when the revocation server can not be reached or is busy.

### Custom OCSP Responder
FieldTypeDescriptionDefault ValueRequired

Url

String

The URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response (must be in the trust store), if present.

### CRL File
FieldTypeDescriptionDefault ValueRequired

Path

String

The path to the CRL file.

### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

The reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread

Count

Number

How many reconnection attempts to make.

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

### HTTP Response Attributes
FieldTypeDescriptionDefault ValueRequired

Status Code

Number

x

Headers

Object

x

Reason Phrase

String

x

### Repeatable In Memory Stream Configures the in-memory streaming strategy by which the request fails if the data exceeds the buffer size. Always run performance tests to find the optimal buffer size for your specific use case.
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

The amount of memory that is allocated to consume the stream and provide random access to it. If the stream contains more data than can be fit into this buffer, then the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which these attributes are expressed

### Repeatable File Store Stream Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed, content on the disk is buffered.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed

### Repeatable In Memory Iterable
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Initial amount of memory to allocate to the memory stream. If the stream data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value. Default value is 100 instances.

100

Buffer Size Increment

Number

Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand. Default value is 100 instances.

100

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

### Repeatable File Store Iterable
FieldTypeDescriptionDefault ValueRequired

In Memory Objects

Number

The maximum amount of instances to keep in memory. If more than that is required, content on the disk is buffered.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.0 --- # Using Anypoint Studio to Configure Google Sheets Connector > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Google Sheets Reference](https://docs.mulesoft.com/google-sheets-connector/1.0/google-sheets-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Google Sheets Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `google sheets` in the search field. 3. Click **Google Sheets** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Google Sheets Connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met Text for using HTTP Listener as an input source For example, to configure an HTTP listener, follow these steps: 1. In the **Mule Palette** view, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (+) next to the **Connector configuration** field to configure a global element that can be used by all instances of HTTP **Listener** in the app. 6. On the **General** tab, specify connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Google Sheets Connector, follow these steps: 1. In the **Mule Palette** view, select **Google Sheets** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. Each Google Sheets operation has its own required fields in Anypoint Studio. For more information, see the [Google Sheets Connector Reference](https://docs.mulesoft.com/google-sheets-connector/1.0/google-sheets-connector-reference). ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target Google Sheets system. Google Sheets Connector supports OAuth 2.0 authorization. To configure the global element for Google Sheets Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, configure the authentication for the connection as described in [OAuth Authentication](#oauth-authentication). You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### OAuth 2.0 Authentication Enter the following information on the **General** tab of the **Global Element Properties** screen to configure OAuth 2.0 Authentication:
FieldDescription

Consumer key

Enter a consumer key belonging to your authentication server’s client application.

Consumer password

Enter a consumer password belonging to your authentication server’s client application.

Authorization url

URL for the OAuth 2.0 authorization, filled in by the connector.

Access token url

URL for the access token, filled in by the connector.

Scopes

Scopes used by the connector.

Callback path

Callback path used during the Oauth dance.

Authorize path

Authorize path used during the Oauth dance.

Object store

Object store to contain the access tokens created during the authorization.

## Configure Additional Connector Fields After you configure a global element for Google Sheets Connector, configure the other required fields for the connector, as described in the [Google Sheets Connector Reference](https://docs.mulesoft.com/google-sheets-connector/1.0/google-sheets-connector-reference). ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Google Sheets Reference](https://docs.mulesoft.com/google-sheets-connector/1.0/google-sheets-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Google Sheets Connector version: 1.1 is-latest-version: true --- # Using Anypoint Studio to Configure Google Sheets Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Google Sheets Reference](https://docs.mulesoft.com/google-sheets-connector/latest/google-sheets-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Google Sheets Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `google sheets` in the search field. 3. Click **Google Sheets** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Google Sheets Connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met Text for using HTTP Listener as an input source For example, to configure an HTTP listener, follow these steps: 1. In the **Mule Palette** view, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (+) next to the **Connector configuration** field to configure a global element that can be used by all instances of HTTP **Listener** in the app. 6. On the **General** tab, specify connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Google Sheets Connector, follow these steps: 1. In the **Mule Palette** view, select **Google Sheets** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. Each Google Sheets operation has its own required fields in Anypoint Studio. For more information, see the [Google Sheets Connector Reference](https://docs.mulesoft.com/google-sheets-connector/latest/google-sheets-connector-reference). ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target Google Sheets system. Google Sheets Connector supports OAuth 2.0 authorization. To configure the global element for Google Sheets Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, configure the authentication for the connection as described in [OAuth Authentication](#oauth-authentication). You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### OAuth 2.0 Authentication Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). Enter the following information on the **General** tab of the **Global Element Properties** screen to configure OAuth 2.0 Authentication:
FieldDescription

Consumer key

Enter a consumer key belonging to your authentication server’s client application.

Consumer password

Enter a consumer password belonging to your authentication server’s client application.

Authorization url

URL for the OAuth 2.0 authorization, filled in by the connector.

Access token url

URL for the access token, filled in by the connector.

Scopes

Scopes used by the connector.

Callback path

Callback path used during the Oauth dance.

Authorize path

Authorize path used during the Oauth dance.

Object store

Object store to contain the access tokens created during the authorization.

## Configure Additional Connector Fields After you configure a global element for Google Sheets Connector, configure the other required fields for the connector, as described in the [Google Sheets Connector Reference](https://docs.mulesoft.com/google-sheets-connector/latest/google-sheets-connector-reference). ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Google Sheets Reference](https://docs.mulesoft.com/google-sheets-connector/latest/google-sheets-connector-reference) - [Salesforce Help](https://help.salesforce.com)