google mail source Google Mail Source

Provided by: "Apache Software Foundation"

Support Level for this Kamelet is: "Stable"

Receive data from Google Mail.

Configuration Options

The following table summarizes the configuration options available for the google-mail-source Kamelet:

Property Name Description Type Default Example

accessToken

Access Token

Required OAuth 2 access token for google mail application. This typically expires after an hour so refreshToken is recommended for long term usage.

string

applicationName

Application name

Required Google Mail application name.

string

clientId

Client ID

Required Client ID of the gmail application.

string

clientSecret

Client Secret

Required Client Secret of the gmail application.

string

index

Index

Required An index for the google mail endpoint.

string

refreshToken

Refresh Token

Required OAuth 2 refresh token for google mail application. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.

string

delay

Delay

The number of milliseconds before the next poll.

integer

500

labels

Gmail Labels

Comma separated list of labels to take into account.

string

inbox

markAsRead

Mark as Read

Mark the message as read once it has been consumed.

boolean

true

query

Gmail Query

The query to execute on gmail box.

string

is:unread

is:unread -category:(promotions OR social)

Dependencies

At runtime, the google-mail-source Kamelet relies upon the presence of the following dependencies:

  • camel:jackson

  • camel:kamelet

  • camel:google-mail

Camel JBang usage

Prerequisites

  • You’ve installed JBang.

  • You have executed the following command:

jbang app install camel@apache/camel

Supposing you have a file named route.yaml with this content:

- route:
    from:
      uri: "kamelet:google-mail-source"
      parameters:
        .
        .
        .
      steps:
        - to:
            uri: "kamelet:log-sink"

You can now run it directly through the following command

camel run route.yaml