Skip to main content
Version: 10.2.4

Email connector

High-level description​

Email is a very common source of incoming data. Very often, a Bot needs to connect to the particular mailbox and read messages for further processing.

Email Connector is designed to have this capability already built for usage. It supports the most common Email protocols such as MS Exchange and IMAP. Mind that POP3 is not supported due to low usage.

How it works​

The Email connector logic is absolutely the same for Exchange and IMAP protocols.

  1. Email connector connects to the target server folder with specified settings and fetches unread emails. If the Mark As Read flag is checked to true, all emails will be marked as read.
  2. Each email taken from the server represents the Transaction object. By default, each transaction has at least one document which presents the email message. It has all metadata such as From, To, Subject, CC, BCC, and message body as document content.
  3. The email message might contain an attachment that can be either an inline attachment, for example, an image embedded into the message, or an attached file. Email Connector creates a document as a part of the same transaction for each attachment and assigns the corresponding type.

The example of the Transaction created from an email with both types of attachments is shown below in the Transaction .json file.

{
"meta":{ },
"id":"65d96ce2-f7b9-48ad-91e8-726514d705a6",
"docs":[
{
"meta":{
"cc":"",
"bcc":"",
"subject":"sdsdfsdfsdf",
"from":"Maxim Turchin <mturchin@workfusion.com>",
"to":"rpa-coe-gf <rpa-coe-gf@workfusion.com>"
},
"doc_id":"e6228119-585d-48ca-9ff3-3890ac4332a5",
"doc_name":"sdsdfsdfsdf",
"doc_type":"Message",
"doc_text":"https://wfinst-307-92-ct1-s3.workfusion.com:443/intake-bucket/9d309a6b-e6f6-4380-bfdb-a6b35dc28989.html",
"doc_tagged_text":null,
"doc_original_link":null,
"doc_origin":null
},
{
"meta":{},
"doc_id":"68060f5a-1e54-4177-992d-cb444db3ad40",
"doc_name":"SharedFolderConnector.png",
"doc_type":"Attachments",
"doc_text":null,
"doc_tagged_text":null,
"doc_original_link":"https://wfinst-307-92-ct1-s3.workfusion.com:443/intake-bucket/39c902eb-c6e2-4395-9a93-13add261ea3f_SharedFolderConnector.png",
"doc_origin":null
},
{
"meta":{},
"doc_id":"03b4bce0-c888-41b5-a537-86fc012eb90f",
"doc_name":"image001.png",
"doc_type":"Inline Attachments",
"doc_text":null,
"doc_tagged_text":null,
"doc_original_link":"https://wfinst-307-92-ct1-s3.workfusion.com:443/intake-bucket/75807b16-5bbe-46d3-9e12-2c51383b70e8_image001.png",
"doc_origin":null
}
]
}

Email matching may lool like as follows.

How to use​

Email Connector consists of two steps.

  1. Email server settings are configured in a Form view. There is a configuration template for Exchange and another template for IMAP.
  2. The Bot actually connects to the server with parameters passed from the previous step, gets email messages, and creates Transactions.

The example of such configuration is shown below.

Exchange settings​

  1. To create the Exchange settings step, create an empty step first.
  2. Click on it and select the ETL section.
  3. Choose Exchange Mail Connector v0.4.
  4. Configure the form in accordance with your server settings.

The table below provides the full description of all parameters for the Exchange Mail settings.

ParameterDescriptionRequiredDefault Value
ServerExchange server URL including the port unless it is default, for example: https://outlook.office365.com/EWS/Exchange.asmxYesnot applicable
DomainUser domainNo
Credentials Alias NameSecret name taken from the Secret Vault. The secret entry key is a username, and the value is a password.Yesnot applicable
Exchange VersionAcceptable values: Exchange2007_SP1, Exchange2010, Exchange2010_SP1, Exchange2010_SP2.YesMS Exchange 2010 SP2
Input Folder

Target folder name from where email messages will be fetched.

NoDefault mail box folder. Usually, it is Inbox.
Mark as ReadIndicates whether the fetched email messages should be marked as read.YesYes
Copy or MoveAllows to move or copy read messages to the target folder. If no action is required, choose None.YesNone

Copy or Move to

Folder name where messages should be moved or copied to.
Leave blank if no action is required.

Nonot applicable

IMAP settings​

To set up IMAP, follow the same steps as for Exchange settings, but choose IMAP Mail Connector v0.4 in the the ETL list.

The example of the configuration form is shown below.

The table below provides the full description of all parameters for the IMAP Mail settings.

ParameterDescriptionRequiredDefault Value
Host Name

Target server host without port indication.

Example: Outlook.office365.com

Yesnot applicable
PortTarget server host number. The default port is 993 for IMAP.Yes993
Credentials Alias NameSecret name taken from the Secret Vault. The secret entry key is a username, and the value is a password.Yesnot applicable
Use SSLIndicates if the connection should be secured. The server also has to support this connection type.YesYes
Input Folder

The target folder name from where email messages will be fetched.

For example, folder in Input should be addressed as **Input/folder_name**.

NoDefault mail box folder. Usually, it is Inbox.
Mark as ReadIndicates whether the fetched email messages should be marked as read.YesYes
Copy or MoveAllows to move or copy messages after it was read to the target folder. If no action is required, choose NoneYesNone

Copy or Move to

Folder name where messages should be moved or copied to.
Leave blank if no action is required

Nonot applicable

Mail connector step​

After the Settings step is set up, you can drag-n-drop the Intake Bots v0.4 (Email Connector) Bot from Available Bots.