Skip to main content
Version: 10.2.8

Email connector

High-level description

Email is a very common source of incoming data. Often, a bot needs to connect to a specific mailbox and read messages for further processing.

Email Connector is designed with this built-in capability. It supports the most common email protocols, such as MS Exchange and IMAP. Note that POP3 is not supported due to limited usage.

How it works

The Email Connector logic is the same for both Exchange and IMAP protocols.

  1. Email Connector connects to the target server folder using the specified settings and fetches unread emails. If the Mark As Read flag is set to true, all emails will be marked as read.
  2. Each email fetched from the server becomes a Transaction object. By default, each transaction has at least one document representing the email message. This document contains metadata such as From, To, Subject, CC, BCC, and the message body as its content.
  3. If the email contains attachments, they can be inline (for example, an embedded image) or regular attached files. Email Connector creates a document for each attachment as part of the same transaction and assigns the appropriate type.

The example below shows a Transaction created from an email with both inline and file attachments, as represented 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 can look as follows:

How to use

Email Connector consists of two steps:

  1. Email server settings are configured in a Form view. There is one configuration template for Exchange and another for IMAP.
  2. The bot connects to the server using the parameters from the previous step, retrieves the email messages, and creates Transactions.

An example configuration is shown below:

Exchange Mail Connector Settings

  1. To create the Exchange settings step, add an empty step first.

  2. Double-click it and select the ETL section.

  3. Choose Exchange Mail Connector Settings.

  4. Configure the form according to your server settings.

The table below describes all parameters for Exchange Mail Connector Settings.

ParameterDescriptionRequiredDefault value
ServerExchange server URL, including the port if it is not the default, for example: https://outlook.office365.com/EWS/Exchange.asmxYesn/a
DomainUser domainNo
Credentials Alias NameSecret name stored in Secrets Vault. The secret entry key is the username, and the value is the password.Yesn/a
Exchange VersionAcceptable values: Exchange2007_SP1, Exchange2010, Exchange2010_SP1, Exchange2010_SP2YesMS Exchange 2010 SP2
Input FolderTarget folder name from from which email messages will be fetched.NoDefault mailbox folder (Inbox)
Mark as ReadIndicates whether fetched email messages should be marked as read.YesYes
Copy or MoveAllows to move or copy read messages to a target folder. Select None, if no action is required.YesNone
Copy/Move toTarget folder name where messages should be moved or copied. Leave blank if no action is required.Non/a

IMAP Mail Connector Settings

To set up IMAP, follow the same steps as for Exchange Mail Connector Settings but select IMAP Mail Connector Settings in the the ETL list.

The example of the configuration form is shown below.

The table below describes all parameters for IMAP Mail Connector Settings.

ParameterDescriptionRequiredDefault value
HostnameTarget server host (without port), for example, Outlook.office365.com.Yesn/a
PortTarget server port number. The default is 993.Yes993
Credentials Alias NameSecret name stored in Secrets Vault. The secret entry key is the username, and the value is the password.Yesn/a
Use SSLIndicates whether the connection should be secured. The server must also support SSL connections.YesYes
Input FolderTarget folder name from which email messages will be fetched, for example, input/folder_name.NoDefault mailbox folder (Inbox)
Mark as ReadIndicates whether fetched email messages should be marked as read.YesYes
Copy or MoveAllows to move or copy messages after reading them. Select None if no action is required.YesNone
Copy/Move toTarget folder name where messages should be moved or copied. Leave blank if no action is required.Non/a

Mail Connector step

After the Settings step is set up, drag the Intake Bots (Email Connector) bot from available Bot Configurations.