Read from email server

Read from email server

The workflow input type, Read from email server can be used, if you want InterFormNG2 to read incoming emails from a mail server and then process these emails.

You can select this input type, when you create a new workflow:


The parameters of this input type are:

Input type
The input type must be set to XML as the input email is converted into XML.

Email input server
Here you need to refer to an existing email input server configuration as setup under the tenant workflow configuration.

Folder
The optional input folder where the input emails are to be found. You can e.g. use this to make InterFormNG2 only process some of the incoming emails.

Sample XML file
Here you refer to an optional existing XML file (found in the Library documents) that was previously created by the same kind of workflow, so that it is easier to refer to the XML contents (representing an input email) in this workflow. For the structure of this XML you can also refer to the example below.

On error workflow
An optional error workflow to call if this workflow should stop with an error.

Description of how this workflow works

After reading an incoming email the workflow does this:

1. Converts the email into XML in the payload:

The nodes in the XML are:

email/subject: Contains the subject field content of the email.
email/received: The timestamp for when the email was received
email/sent: The timestamp for when the email was sent
email/from: address for the sender
email/to: address for the recipient(s)
email/cc: cc addresses in the mail (if available)
email/bcc: bcc addresses in the mail (if available)
email/attachments: List of attachments
email/attachments/attachment: One attachment node
email/attachments/attachment/name: The name of the attachment
email/attachments/attachment/size: The size in bytes of the attachment


2. Attachments in the incoming email becomes attachments in the workflow
Any attachments (e.g. PDF files) and images (e.g. found in the signature) in the incoming email are converted into attachments in the workflow - with the same name as the original attachment.
You can extract such attachments with various workflow components like e.g. Attachment to payload, Attachment to windows share, From attachment to file, From attachment to resource and From attachment to variable.

3. The body section of the email
The body section of the email is copied into either of these predefined workflow variables:
interform.input.emailRead.body: The text body of the mail (if it exists)

interform.input.emailRead.htmlBody: The HTML version of the body (if it exists)


    • Related Articles

    • Email server inputs

      It is in InterFormNG2 possible to setup a workflow as an email reader from an input email server and extract data from the incoming email with the workflow input type, Read from email server. A prerequisite for this is, that you first setup an email ...
    • Email input

      This section describes the various email inputs. Email input covers both the various payloads, that you can use when emailing, but it also includes the option to setup a workflow to monitor an email account for incoming emails. 1. Use an XML file or ...
    • To email server

      The advanced output workflow component, to email server is able to send out an email, that you have already configured via one of the tenant email servers. The input payload for this component can be eml or even text or html - as long as the email ...
    • Global email server setup

      You need to setup a global email server order to be able to send system emails from InterFormNG2 e.g. to reset emails. Notice a similar email configuration for each tenant is normally also required. In order to setup the global email server, you ...
    • Read from Windows share

      You can setup InterFormNG2 to read input files from a folder found via Windows share (Samba network/UNC). For that you need to create a workflow with the input type, Read from Windows share. This can e.g. be useful, if you want to monitor a folder on ...