020-010 MetaServer Import – Import Email
MetaServer’s Import Email feature allows you to watch one or multiple email inboxes and detach, import and process PDF attachments from incoming e-mails. You can also watch folders and import .eml and .msg files instead of watching an email inbox through IMAP. You also have the option to archive the imported mail in a folder or subfolder of your mail-client or disk.
Each import action in a workflow can have a different next action. Consequently, you can process a PDF attachment differently depending on the watched inbox.
Example Case 1:
– A catering company receives incoming invoices through e-mail and on paper by post (snail mail). So, they watch an email inbox dedicated to incoming invoices and scan their physical invoices to a watched folder. MetaServer extracts all relevant data such as supplier name, invoice number, amount, due date etc. and uploads the data in QuickBooks for booking and payment.
Example Case 2:
– Insurance agents scan supporting insurance claim documents with their smartphone and the result is emailed as a PDF attachment to a central inbox to extract critical data and file the documentation in the correct claim folder.
To add an Import Email action, select the action after which you want to insert the Import from Email action and press Add -> Import -> Email. The Setup window will automatically open.
You can also open the setup window of an existing Import Email action by double clicking the action or by pressing the setup button on the right side of the action or in the ribbon, as shown below.
In our example, we will make use of the “CB – INVOICES US” workflow. This workflow is automatically installed with CaptureBites MetaServer.
TIP: The thumbnail on the right will follow you, so you can easily refer to the Setup window. Click on the thumbnail to make the image larger.
01 – Source: you can choose to import emails from the following sources:
IMAP Server: replace the placeholder CaptureBites IMAP Server settings with your own IMAP Server details. The CaptureBites IMAP server is only meant for demo purposes, don’t forget to change this to your own IMAP server settings for the correct inbox when the workflow is used in production.
Your IMAP Server settings can be found through your email provider or you can find a range of popular IMAP settings here.
1) Name: enter a friendly name for your watched inbox.
2) Address: enter your email provider’s IMAP server address.
3) User name: the user name is the email address of the account holding the watched inbox. When in doubt, contact your IT department.
4) Password: enter your IMAP server password. This is the password you use to log into the watched inbox’s email system. When in doubt, contact your IT department.
5) SSL: SSL (secure socket layer) is a way of encrypting your email data as it travels across the internet. Check with your email provider if they require SSL and enable this option if they do. Gmail, for example, requires SSL.
6) Port: the IMAP Port is most often 993, but there are exceptions. Check with your email provider or, when in doubt, contact your IT department.
Disk: using the Disk as a source, you can import .eml and .msg files from a watched folder instead of watching an email inbox through IMAP.
1) Watched folder: you can browse to the watched folder using the “…” button or enter the path manually. Make sure this path already exists.
2) Import file [x] seconds after file creation: some MFP devices (we’ve experienced it with some MFPs from Konica-Minolta) write PDF files gradually in the destination folder and don’t always lock them while being written. This can generate a corrupt PDF file and cause errors. In that case, by setting a delay before importing the file with this setting, the MFP can correctly finish the PDF file.
3) Move file to: once a document is imported in MetaServer, you can choose to delete it from the watched folder or you can move it to another folder for archiving purposes.
4) Remove empty sub folders: disable this option if you don’t want to remove empty sub folders. This can be useful if, for example, the sub folder names in the watched folder hold the name of the person who scanned the document. The name can then be used in an Extract action’s Reserve rule to reserve the document for Validation by the person who scanned the document.
02 – Test: press the “Test” button to check your connection to the IMAP server. A pop-up will appear confirming that the connection is successful or not.
03 – Replace invalid files with red warning image: when enabled, invalid/corrupt files will be replaced with red warning images, including a QR code with the value “File Not Valid”.
This makes it visually clear that some attachments were corrupt. You can also use the QR code value to let the document go through a special exception flow.
This makes it visually clear that some attachments were password protected. You can also use the QR code value to let the document go through a special exception flow.
The final PDF will look like this:
05 – Convert PDF XFA to Image PDF: this option is enabled by default. PDF XFA is a legacy format that is not supported by Adobe anymore and was replaced by “ACROFORM”.
For archiving purposes, you still may need to process PDF XFA files, but they will cause a lot of problems because of their unsupported, complex format. To avoid these problems, this option automatically converts PDF XFA to an Image PDF.
You can press the Setup button to adjust the JPEG Compression of the Convert to Image PDF engine.
06 – Import: press the drop-down arrow to specify what part of the email you want to import.
1 document per attachment: this is the default mode. You can specify if you want to prepend or append the body in the body options (see Body options below).
Email body: this only imports the body of the email. It will convert it to a PDF and is handled as a regular PDF document in MetaServer. The attachments are ignored.
Email body and attachments: this merges all attachments in a single PDF and prepends (or appends) the email body, depending on the selected Body option.
Without the Apply Separation & Page Processing action, the Processed PDF format in the Export for Folder action would be the Email body and all its attachments as a single PDF. With an Apply Separation & Page Processing action, the email is split in a body and its attachments as separate PDFs.
TIP: if you view a PDF with the “Email body and attachments” in Validation, the attachments can be selected from a “Bookmark” drop-down list. This way, the Operator can easily jump to each attachment and the email body.
NOTE: As soon as your document goes through an Apply Separation & Page Processing action, your document will be split in separate documents and your single PDF with bookmarks will be lost.
07 – Body: press the drop-down arrow to specify where the converted email body should be placed in your PDF.
None: The body is not imported.
Before attachments: Prepends the body.
After attachments: Appends the body.
08 – Convert Email Body to PDF: Setup
If you want to keep your email body, press the Setup button to set up your Convert to Email Body to PDF settings.
1) PDF Compression: by default, Standard PDF compression is perfect for business documents containing a lot of text and some pictures. If most emails contain pictures that need to keep their original image quality, you can select Low or no PDF compression.
2) JPEG compression: enable this option to compress photographic images. A low value will generate a smaller file size but will decrease the image quality.
3) Page size: select your desired output page size. You can choose between A4, Letter or Legal size.
4) Margins: the margins change the distance of the body of the email relative to the borders of the PDF page. By default, a margin of 1,27 cm (0,5 inches) is applied.
09 – File types: press the drop-down arrow to select the type(s) of the attached files. By default, PDF is selected. Support for other file sources is planned for a future release.
10 – PDF passwords: if you want to import password-protected PDFs, enter all possible passwords here. If none of the passwords work when importing a PDF, the document will be moved to the Errors tab.
IMPORTANT: In your export action(s), select “Imported PDF” to export the original version with password. Select “Processed PDF” to export a version without password.
11 – Fit JPG and PNG to page size: enable this option to reduce very large JPG or PNG files to A4 or Letter Size. Image quality is preserved, only the paper size is updated. JPG and PNG images with small dimensions such as receipts or business cards remain untouched.
For example, documents captured with a smart phone in JPG or PNG format often have incorrect, too large page dimensions causing data extraction and viewing problems.
12 – Reject reason: you can overwrite the default reject reason with a custom reject reason. You can, for example, add instructions to what should happen to the rejected document. When an email is rejected, it’s a common use to send the document to an Export to Email action and add the Reject Reason field value to the body of the email, as seen in the example below.
13 – Archive: after e-mails are imported by MetaServer, you can archive them in different ways depending on their status. This can be done for processed, rejected and deleted emails.
Processed status: the email contains one or more valid attachment and were successfully processed
Rejected status: a “Rejected” email is an email without any valid attachments. Rejected emails can be processed with a different set of actions than valid emails.
For each of the 3 possible statuses you can define what happens with the original email:
1) Keep them in inbox: keeps the email in the inbox. It is marked as read so it won’t be imported by MetaServer anymore.
2) Delete: deletes the email from your inbox.
3) Move to archive folder: you can move the email to a folder or subfolder in your inbox for archiving purposes. If the folder doesn’t exist yet, it will be created automatically.
TIP: you can copy the current settings and paste them in another setup window of the same type. Do this by pressing the Settings button in the bottom left of the Setup window and by selecting Copy. Then open another setup window of the same type and select Paste.