Gmail Connector 1.1 Reference | MuleSoft Documentation
| Configures how Mule processes streams. Repeatable streams are the default behavior.  
Custom Query Parameters | 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 | 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 | Response timeout for the request.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Streaming Type |  Enumeration, one of:
  * 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 | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The expression outcome is stored in the target variable. | #[payload]  
Reconnection Strategy | 
  *   * Reconnect Forever

| A retry strategy in case of connectivity errors.  
### Output
Attributes Type |  HTTP Response Attributes  
---|---  
### For Configurations
  * Default Configuration


### Throws
  * GMAIL:BAD_REQUEST
  * GMAIL:CLIENT_ERROR
  * GMAIL:CONNECTIVITY
  * GMAIL:INTERNAL_SERVER_ERROR
  * GMAIL:NOT_ACCEPTABLE
  * GMAIL:NOT_FOUND
  * GMAIL:RETRY_EXHAUSTED
  * GMAIL:SERVER_ERROR
  * GMAIL:SERVICE_UNAVAILABLE
  * GMAIL:TIMEOUT
  * GMAIL:TOO_MANY_REQUESTS
  * GMAIL:UNAUTHORIZED
  * GMAIL:UNSUPPORTED_MEDIA_TYPE


## Setup Push Notifications
`<gmail:gmailuserswatch>`
Set up or update a push notification watch on the given user mailbox. This operation makes an HTTP POST request to the /gmail/v1/users/{userId}/watch endpoint.
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
User’s email address. The special value `me` can be used to indicate the authenticated user.  
The content to use. | #[payload]  
Config Ref |  ConfigurationProvider | Name of the configuration used to execute this component.  
Streaming Strategy | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

| Configures how Mule processes streams. Repeatable streams are the default behavior.  
Custom Query Parameters | 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 | 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 | Response timeout for the request.  
Response Timeout Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| Time unit for the **Response Timeout** field.  
Streaming Type |  Enumeration, one of:
  * 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 | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The expression outcome is stored in the target variable. | #[payload]  
Reconnection Strategy | 
  *   * Reconnect Forever

| A retry strategy in case of connectivity errors.  
### Output
Attributes Type |  HTTP Response Attributes  
---|---  
### For Configurations
  * Default Configuration


### Throws
  * GMAIL:BAD_REQUEST
  * GMAIL:CLIENT_ERROR
  * GMAIL:CONNECTIVITY
  * GMAIL:INTERNAL_SERVER_ERROR
  * GMAIL:NOT_ACCEPTABLE
  * GMAIL:NOT_FOUND
  * GMAIL:RETRY_EXHAUSTED
  * GMAIL:SERVER_ERROR
  * GMAIL:SERVICE_UNAVAILABLE
  * GMAIL:TIMEOUT
  * GMAIL:TOO_MANY_REQUESTS
  * GMAIL:UNAUTHORIZED
  * GMAIL:UNSUPPORTED_MEDIA_TYPE


## Unauthorize
`<gmail:unauthorize>`
Deletes all of the access token information of a given resource owner ID so that it is impossible to execute any operation for that user without doing the authorization dance again.
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Resource Owner Id | ID of the resource owner which access should be invalidated.  
Config Ref |  ConfigurationProvider | Name of the configuration used to execute this component.  
### For Configurations
  * Default Configuration


## On New Email
`<gmail:on-new-email-listener>`
Enters the flow when a new email is received.
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Date that emails are polled. The format of the date is yyyy/mm/dd.  
Search Query | Search phrase, such as `in:label` or `from:foo@bar.com`.  
Config Ref |  ConfigurationProvider | Name of the configuration used to execute this component.  
Scheduling Strategy |  scheduling-strategy | Configures the scheduler that triggers the polling.  
Streaming Strategy | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

| Configures how Mule processes streams. Repeatable streams are the default behavior.  
Redelivery Policy |  RedeliveryPolicy | Defines a policy for processing the redelivery of the same message.  
Reconnection Strategy | 
  *   * Reconnect Forever

| Retry strategy in case of connectivity errors.  
### Output
**Attributes Type** |  HTTP Response Attributes  
---|---  
### For Configurations
  * Default Configuration


## Types
### Default Header
Headers automatically added to every outbound request.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Key for this type.  
Value for this type.  
### Default Query Param
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Key for this type.  
Value for this type.  
### Proxy
Configures the settings used to connect through a proxy.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Hostname or IP address of the proxy server.  
Port of the proxy server.  
Username to authenticate against the proxy server.  
Password to authenticate against the proxy server.  
**Non Proxy Hosts**  
Configures TLS to provide secure communications for the Mule app.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Enabled Protocols** |  Comma-separated list of protocols enabled for this context.  
**Enabled Cipher Suites** |  Comma-separated list of cipher suites enabled for this context.  
**Trust Store** |  Configures the TLS truststore.  
Configures the TLS keystore.  
**Revocation Check** | 
  * Standard Revocation Check
  * Custom OCSP Responder
## Types
### Default Header
Headers automatically added to every outbound request.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Key for this type.  
Value for this type.  
### Default Query Param
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Key for this type.  
Value for this type.  
### Proxy
Configures the settings used to connect through a proxy.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Hostname or IP address of the proxy server.  
Port of the proxy server.  
Username to authenticate against the proxy server.  
Password to authenticate against the proxy server.  
**Non Proxy Hosts**  
Configures TLS to provide secure communications for the Mule app.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Enabled Protocols** |  Comma-separated list of protocols enabled for this context.  
**Enabled Cipher Suites** |  Comma-separated list of cipher suites enabled for this context.  
**Trust Store** |  Configures the TLS truststore.  
Configures the TLS keystore.  
**Revocation Check** | 
  * Standard Revocation Check
  * Custom OCSP Responder

|  Configures how to validate certificates.  
### Truststore
Configures the truststore for TLS.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Path to the truststore. Mule resolves the path relative to the current classpath and file system, if possible.  
Password used to protect the truststore.  
Type of truststore.  
Encryption algorithm that the truststore uses.  
If `true`, Mule stops performing certificate validations. Settig this to `true` can make connections vulnerable to attacks.  
### Keystore
Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a public certificate.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Path to the keystore. Mule resolves the path relative to the current classpath and file system, if possible.  
Type of store used.  
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** |  Password used to protect the private key.  
Password used to protect the keystore.  
Encryption algorithm that the keystore uses.  
### Standard Revocation Check
Configures standard revocation checks for TLS certificates.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Only End Entities** |  Which elements to verify in the certificate chain: Verify only the last element in the certificate chain. Verify all elements in the certificate chain.  
**Prefer Crls** |  How to check certificate validity: Check the Certification Revocation List (CRL) for certificate validity. Use the Online Certificate Status Protocol (OCSP) to check certificate validity.  
**No Fallback** |  Whether to use the secondary method to check certificate validity: Use the method that wasn’t specified in the <b>Prefer Crls</b> field (the secondary method) to check certificate validity. Do not use the secondary method to check certificate validity.  
What to do if the revocation server can’t be reached or is busy: Avoid verification failure. Allow the verification to fail.  
### Custom OCSP Responder
Configures a custom OCSP responder for certification revocation checks.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
URL of the OCSP responder.  
**Cert Alias** |  Alias of the signing certicate for the OCSP response. If specified, the alias must be in the truststore.  
### CRL File
Specifies the location of the certification revocation list (CRL) file.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Path to the CRL file.  
### Reconnection
Configures a reconnection strategy for an operation.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Fails Deployment** |  What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: Allow the deployment to fail. Ignore the results of the connectivity test.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  Reconnection strategy to use.  
### Reconnect
Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
How often to attempt to reconnect, in milliseconds.  
If false, the reconnection strategy will run in a separate, non-blocking thread.  
How many reconnection attempts the Mule app can make.  
### Reconnect Forever
Configures a forever reconnection strategy by which the connector operation source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
How often the Mule app attempts to reconnect to the remote service or API, in milliseconds.  
If false, the reconnection strategy will run in a separate, non-blocking thread.  
### Expiration Policy
Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Idle Time** |  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.  
Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  Time unit for the **Max Idle Time** field.  
### HTTP Response Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Status Code**  
**Reason Phrase**  
### 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.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Initial Buffer Size** |  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**.  
**Buffer Size Increment** |  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.  
**Max Buffer Size** |  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.  
**Buffer Unit** |  Enumeration, one of: |  Unit for the **Initial Buffer Size** , **Buffer Size Increment** , and **Buffer Unit** fields.  
### 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.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**In Memory Size** |  Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:
  * Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.
  * Configure a smaller buffer size to decrease memory load at the expense of response time.

  
**Buffer Unit** |  Enumeration, one of: |  Unit for the **In Memory Size** field.  
## See Also
  * Gmail Connector Overview
  * MuleSoft Help Center