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:
<email>
<subject>invoice1134679</subject>
<received>202501091502540000</received>
<sent>202501091502460000</sent>
<from>
<address>
<email>•••@interform400.com</email>
</address>
</from>
<to>
<address>
<email>••••••••••@gmail.com</email>
</address>
</to>
<attachments>
<attachment>
<name>Invoice_1134679.pdf</name>
<size>151781</size>
</attachment>
<attachment>
<name>invoice.xml</name>
<size>83868</size>
</attachment>
</attachments>
</email>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.
3. The body section of the email
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)