Skip to content
background-image background-image

Gmail IMAP Reader

[ | version 3.0]

Connector

The connector is permitted for use of the platform background agent.

Connector processing type: Row by row!

This connector allows to download email messages from Gmail Mail boxes with IMAP protocol.

Prerequisites

Gmail services doesn't supports authentication with account username/ account password from July 2022. There must be App-Password added for third party application to consume data from/to Gmail account:

  1. Go to your Gmail Account site

  2. Select Security

  3. Under Signing in to Google, select App Passwords. You may need to sign in. If you don’t have this option, it might be because:

    1. 2-Step Verification is not set up for your account.
    2. 2-Step Verification is only set up for security keys.
    3. Your account is through work, school, or other organization.
    4. You turned on Advanced Protection.
  4. At the bottom, choose Select app and choose the app you using and then > Select device and choose the device you’re using and then > Generate.

  5. Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.

  6. Tap Done

App Passwords revoked after password change

To help protect your account, we revoke your App Passwords when you change your Google Account password. To continue to use an app with your Google Account, create a new App Password.

Using placeholders

For string properties in configuration you can use single cell placeholder which can be wrapped by other text. Typically it can be used to read messages for different users. So each input row can contain username and password to be used in configuration.

Example

  • ${input.UserName}
  • ${input.Password}

Storage data

This connector saves last read email for each username or mailbox.

{
  "LastReadEmail": {
    "test.user@gmail.com": {
      "LastRead": {
        "IDs": [
          "ZAAAfWGVlAAA="
        ],
        "Received": "2020-03-17T07:50:07Z"
      }
    },
    "test.user2@gmail.com": {
      "LastRead": {
        "IDs": [
          "ZADJSpsadIIDAAA="
        ],
        "Received": "2020-04-17T03:50:07Z"
      }
    }
  }
}

Configuration

Mail Credentials Connection configuration

Timeout

The number of seconds to wait before terminating the request. Default value is set to 100 seconds.

Username

Define mailbox server Bind user login which is used for authentication of the connection.

Password

Define mailbox server Bind user password which is used for authentication of the connection.

IMAP Folder configuration

Folder

Mailbox folder.

Folder searching is done via case-sensitive comparisons.

Example

  • Inbox
  • Folder1
  • Folder1/SubFolder
  • ...

Include SubFolders

If set to true, also messages included in subfolders will be processed.

Mail Filter configuration

Filter From

Comma-separated set of filter expressions. ie *test,*prod would match anything ending with test or prod. Empty filter matches everything.

Filter To

Comma-separated set of filter expressions. ie *test,*prod would match anything ending with test or prod. Empty filter matches everything.

Filter Subject

Comma-separated set of filter expressions. ie *test,*prod would match anything ending with test or prod. Empty filter matches everything.

Email Types

Emails to check

  • All untreated emails - all emails which have not yet been processed
  • Only untreated emails with no attachments - all not yet processed emails which must NOT have attachment
  • Only untreated emails with attachments - all not yet processed emails which MUST have at least one attachment

Batchsize

Maximum number of messages which will be processed in one task run (0 = unlimited, n = exact number).

Transfer Attachments

If false, output schema property Attachment will be always null.

Filter Attachment name

Comma-separated set of filter expressions. ie *pdf,*jpg would match anything ending with pdf or jpg. Empty filter matches everything.

Ignore Attachments linked from body

If true and if attachment, ie. image, is linked from body content, then is ignored.

Input & Output Schema

Input

Input schema is optional

Output

Result of Gmail IMAP reader connector are email messages from given mailbox. Attachments are encoded to Base64 and saved to Attachment of output schema.

E-Mail (ver. 1.4.0)

Column Data type Allow null Description
ID string No ID of message
Email string No Actual email address from Username field in configuration
Subject string Yes Subject
From E-Mail Person 1.0.0 No Sender of email data
To E-Mail Person 1.0.0 No The recipient/s of the email data object
Cc E-Mail Person 1.0.0 Yes Recipients that are copied on the email data object
Bcc E-Mail Person 1.0.0 Yes Recipients that are blind-copied on the email data object
DateSent DateTime No Date when email was sent
DateReceived DateTime No Date when email was received
ReplyTo E-Mail Person 1.0.0 Yes Serialized content of HTTP response
BodyText String Yes Serialized content of HTTP response
Body String Yes Body
Importance String No Importance of email (low, normal, high)
Attachment E-Mail Attachment 1.0.0 Yes Email attachments

E-Mail Person (ver. 1.0.0)

Column Data type Allow null Description
Name string Yes Name of person
Address string No Email address

E-Mail Attachment (ver. 1.0.0)

Column Data type Allow null Description
Name string No File name with extension
Content Base64 No Encoded file content

Release notes

3.0.2

  • Added connector icon
  • Fixed connector description
  • Created release notes in connector documentation

3.0.1

  • Fixed right configuration propagation.

3.0.0

  • Reads messages from Gmail mail account through IMAP protocol.