> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image import profiles

> Automate image import in ABBYY FlexiCapture by creating import profiles for scanners, Hot Folders, mailboxes, FTP servers, and Microsoft Graph Mail.

If you regularly import images from the same source, you can automate the process by creating an image import profile. *(Distributed)* Create the profile on the Verification Station or the Project Setup Station. *(Standalone)* Create the profile on the Project Setup Administrator Station.

An import profile can also import images at regular intervals and process them in background mode. After you configure the profile, you can scan, import, and process images — for example, despeckle them — with a single click, and change the import source or its settings at any time.

If your import sources change frequently, create several profiles and switch between them instead of reconfiguring the source each time.

## Create an import profile

To manage import profiles, click **Project → Image Import Profiles...** in the main window. In the **Image Import Profiles** dialog box, you can create, edit, remove, or copy profiles.

To create a profile, click **New\...** to start the **Import Profile Wizard**, and then select an import source, such as a scanner or a Hot Folder.

You can also open the wizard from the **Select Import Profile** dialog box: click **File → Import Images...**.

## Create an import profile for a scanner

<Steps>
  <Step title="Select the scanner as the import source">
    Select **Scanner** as the import source.

    <Note>
      The scanner must be connected. Follow the documentation supplied with the scanner, and install all of the software supplied with it.
    </Note>
  </Step>

  <Step title="Configure the image scanning options">
    * **Style of the settings dialog** — Choose how the program interacts with the scanner:
      * **FlexiCapture Scanner Settings** — Uses the ABBYY FlexiCapture **Scanner settings** dialog box. Click **Settings...** to [configure scanning options](/flexi-capture/operator-work/scan-params). If you select **Show scanner settings before scanning**, the **Scanner settings** dialog box appears before scanning whenever you select this import profile.
      * **Scanning Options** — Uses the scanner driver's dialog box. You cannot change the scanning options while creating the import profile, but the **Scanner settings** dialog box appears each time you start scanning.
    * Specify whether to scan one image or multiple images at a time.
  </Step>

  <Step title="Configure the image pre-processing options">
    Configure the [image pre-processing options](/flexi-capture/project-settings/image-processing-settings).
  </Step>

  <Step title="Rename the import profile">
    If required, change the default name of the import profile and add a comment.
  </Step>
</Steps>

## Create an import profile for a Hot Folder or mailbox

Select **Hot Folder** as the import source, and then select the type of your Hot Folder:

* **Local folder or LAN folder**
* **MAPI (mailbox)**
* **POP3 server**
* **IMAP server**
* **SFTP server**
* **FTP server**
* **Microsoft Graph Mail API**

<Note>
  For a local folder or LAN folder, you can use environment variables to specify the path to the import directory. A variable can contain the whole path or part of it, for example `<Env:import>/subfolder_name`.
</Note>

Click **Browse...** to specify the path to the Hot Folder, or click **Settings...** to enter your user name and password.

<Info>
  To add images from a Hot Folder, the user must have read and write privileges for that folder.
</Info>

After you select the source type, set it up in the matching section, and then complete the remaining wizard steps.

### Set up import from a MAPI mailbox

Before you set up import from a MAPI mailbox, make sure that:

* An email account is configured on the computer.
* The Operator Station or the Processing Station runs under the user account used to access the mailbox.

<Note>
  Start Microsoft Outlook under this user account at least once before you set up the import profile. The bitness of Microsoft Outlook must match the bitness of ABBYY FlexiCapture 12. For example, with the 64-bit version of ABBYY FlexiCapture 12, use the 64-bit version of Microsoft Outlook.
</Note>

<Warning>
  Use Outlook 2016 when you import to FlexiCapture 12 through the MAPI protocol. Later versions of Outlook are not supported.
</Warning>

Then click **Browse...** and select the mailbox.

### Set up import from a POP3 server

<Steps>
  <Step title="Specify the server address">
    Specify the address of your POP3 server (for example, `pop.server.com`).
  </Step>

  <Step title="Enter your credentials">
    Click **Settings...** and, in the dialog box that opens, enter the user name and password required to access the messages on the server.
  </Step>

  <Step title="Select the encryption type">
    Under **Type of encrypted connection**, select one of the following:

    | Option   | Description                                                                                            |
    | -------- | ------------------------------------------------------------------------------------------------------ |
    | **None** | The connection is not encrypted. Use this option for connections over an unsecured port.               |
    | **SSL**  | The connection is always encrypted.                                                                    |
    | **Auto** | The connection is encrypted if a secured port is specified, and not encrypted if no port is specified. |
  </Step>
</Steps>

<Note>
  If all the settings are correct but ABBYY FlexiCapture still cannot retrieve messages from the POP3 email server, make sure that a firewall is not blocking the email server.
</Note>

### Set up import from an IMAP server

<Steps>
  <Step title="Specify the server address">
    Specify the address of the IMAP server (for example, `imap.server.com`).
  </Step>

  <Step title="Enter your credentials and authentication method">
    1. Click **Settings...**.
    2. In the dialog box that opens, enter a valid user name, and then select one of the following authentication options:
       * **Use OAuth 2.0 authentication** — Opens an [OAuth 2.0](/flexi-capture/project-settings/o-auth20) authentication dialog in the browser. The first time you connect to the server, enter a login and password. The browser then closes automatically.
       * **Define authentication parameters** — Lets you enter a password for the specified user name.
  </Step>

  <Step title="Select the encryption type">
    Under **Type of encrypted connection**, select one of the following:

    | Option   | Description                                                                                            |
    | -------- | ------------------------------------------------------------------------------------------------------ |
    | **None** | The connection is not encrypted. Use this option for connections over an unsecured port.               |
    | **SSL**  | The connection is always encrypted.                                                                    |
    | **TLS**  | The connection is always encrypted.                                                                    |
    | **Auto** | The connection is encrypted if a secured port is specified, and not encrypted if no port is specified. |
  </Step>

  <Step title="Select a mailbox subfolder">
    Click **Browse...** and select a subfolder inside the mailbox.
  </Step>
</Steps>

<Note>
  If all the settings are correct but ABBYY FlexiCapture still cannot retrieve messages from the IMAP email server, make sure that a firewall is not blocking the connection to the email server.
</Note>

### Set up import from an SFTP or FTP server

<Steps>
  <Step title="Specify the server address">
    Specify the address of the SFTP or FTP server. If you use a non-standard port, add it after the address in the format `sftp://address:port/` or `ftp://address:port/`.
  </Step>

  <Step title="Enter your credentials">
    Click **Settings...** and, in the dialog box that opens, enter the user name and password required to access the messages on the server.
  </Step>

  <Step title="Validate the server key">
    Click **Next**. If you set up import from an SFTP server, a public key validation dialog box appears.
  </Step>
</Steps>

<Note>
  If all the settings are correct but ABBYY FlexiCapture still cannot receive a response from the SFTP or FTP server, make sure that a firewall is not blocking the server.
</Note>

### Set up import through the Microsoft Graph Mail API

<Steps>
  <Step title="Start the OAuth 2.0 Authorization Wizard">
    In the **Network Settings** dialog box, click **Sign in...** to launch the [OAuth 2.0](/flexi-capture/project-settings/o-auth20) Authorization Wizard.
  </Step>

  <Step title="Sign in to your Microsoft account">
    Click the link in the **OAuth 2.0 Authorization Wizard** to sign in to your Microsoft account. The browser then closes automatically.

    <Note>
      Sometimes, after you confirm authorization, authentication is denied with the error `Flow failed. Failure info/error: Connect to token endpoint failed`. For more information, see [Microsoft Graph API connection error](/flexi-capture/tg-integration-ms-graph-import-error).
    </Note>
  </Step>

  <Step title="Grant permissions to the application">
    Grant the required permissions to the application. For more information, see [Importing images using Microsoft Graph Mail API](/flexi-capture/project-settings/ms-graph-import).
  </Step>

  <Step title="Return to the network settings">
    Go back to the **Network Settings** window and click **OK**.
  </Step>

  <Step title="Select a mailbox subfolder">
    Click **Browse...** in the **Import Profile Wizard** and select an available subfolder inside the mailbox.
  </Step>
</Steps>

<Note>
  By default, the refresh token required to use the Microsoft Graph Mail API expires after 90 days of inactivity, and you must re-authenticate to obtain a new one. An Active Directory administrator can configure the token lifetime. For more information, see the [Microsoft documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-configurable-token-lifetimes).
</Note>

<a id="backgroundimport" />

### Specify the image loading options

Specify how ABBYY FlexiCapture loads images from the Hot Folder.

#### Check Hot Folder every

Select this option and enter how often the program checks the Hot Folder for new images.

If a mailbox is the Hot Folder, the program checks it for new email after it imports the first message. When new email is present and the Processing Server computer has free CPU cores, the program imports the messages one by one until the mailbox is empty. It then checks the mailbox again at the end of the interval you set.

<Note>
  To import images from Hot Folders, *(Distributed)* enable Hot Folder processing for your project in the Administration and Monitoring Console (click **Settings → Projects**), or *(Standalone)* select the **Autochecking** option for the profile in the **Image Import Profiles** dialog box.
</Note>

#### Batch settings

Select one of the following options to specify which batch new images are added to:

* **Add images to current batch** — Adds images from the Hot Folder to the current batch.
* **Add images to specified batch** — Adds images to a batch you select from the drop-down list.
* **Create new batches for imported images automatically** — Creates batches for new images automatically. At each check (the interval set in **Check Hot Folder every**), the program creates one or more batches and adds the Hot Folder images to them according to the rule you specify. Set the batch type in the **Batch type** field. Optionally, set the batch [registration parameters](/flexi-capture/project-settings/reg-params) by clicking **Registration parameters...**, and set the batch priority in the **Priority** field.

<Info>
  If import tasks run on the Processing Server, select **Create new batches for imported images automatically**. You can use **Add images to current batch** and **Add images to specified batch** only when you import images on the Project Setup Station or use a standalone edition of ABBYY FlexiCapture.
</Info>

#### Attach mail to batch

This option is available only for a POP3 server Hot Folder. Select it to attach the email message as an EML file to the new batch. You can download and open attached messages in an email client. For more information, see [User attachments](/flexi-capture/project-settings/attachments-project-settings).

#### Number of files to add

In this drop-down list, select how many files are added to each batch:

* **According to description file** — Adds files according to a description file. Click **Settings...** to specify the name and type of the description file. To import from a mailbox with a description file, add the XML description file as an email attachment. For more information, see [Description file](/flexi-capture/project-settings/description-file).
* **All files** — Adds all files from the Hot Folder. Files in subfolders are ignored.
* **From subfolder** — Adds files from subfolders whose names match a naming scheme. Click **Settings...** to specify the scheme, where an asterisk (`*`) matches any string of characters and a question mark (`?`) matches any single character. Rename a subfolder to match your scheme only after you copy all required files to it; otherwise, file access conflicts can occur.
* **Several files** — Adds several files. Click **Settings...** and enter a number or a range. Files in subfolders are ignored. If you enter a number, such as 5, and only 4 files remain in the Hot Folder, those files are not imported. If you enter a range, such as `1-5`, the remaining 4 files are imported.
* **Single file** — Adds one file.
* **Attached to the letter** — Adds all files attached to the email message, in ascending order by file name.
* **Message bodies and attachments** — Adds both the attached files and the message bodies.

<Note>
  When you use the Microsoft Graph Mail API, each import task imports only one email message. Parallel import is not supported: Processing Stations carry out import tasks one by one.
</Note>

The following sample description file supports the **According to description file** option. It imports 10 images from a POP3 server, assembled into two documents of five images each:

```xml theme={null}
<Batch>
    <Name>batch 1</Name>
    <SourceID>EXAMPLE</SourceID>
    <Documents>
        <Document Index="0">
            <Name>1</Name>
            <Images>
                <Image Index="0" PageIndex="0" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="0">1.pdf</Image>
                <Image Index="1" PageIndex="1" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="1">1.pdf</Image>
                <Image Index="2" PageIndex="2" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="2">1.pdf</Image>
                <Image Index="3" PageIndex="3" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="3">1.pdf</Image>
                <Image Index="4" PageIndex="4" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="4">1.pdf</Image>
            </Images>
        </Document>
        <Document Index="1">
            <Name>2</Name>
            <Images>
                <Image Index="0" PageIndex="0" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="0">2.pdf</Image>
                <Image Index="1" PageIndex="1" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="1">2.pdf</Image>
                <Image Index="2" PageIndex="2" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="2">2.pdf</Image>
                <Image Index="3" PageIndex="3" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="3">2.pdf</Image>
                <Image Index="4" PageIndex="4" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="4">2.pdf</Image>
            </Images>
        </Document>
    </Documents>
</Batch>
```

In the **If no files are found, log the following** drop-down list, select **Error**, **Warning**, or **Information**.

### Configure the image pre-processing options

Configure the [image pre-processing options](/flexi-capture/project-settings/image-processing-settings). To apply the document separation and image processing settings defined for the batch type, select **Use image processing options from batch type**.

### Clean up the Hot Folder after import

The wizard prompts you to specify how to clean up the Hot Folder after import. You can delete successfully imported images or move them to another folder. For images processed with errors — for example, when a file is corrupt or a network error occurs — you can leave them in the Hot Folder or move them to another folder.

<Note>
  Avoid keeping images processed with errors in the Hot Folder. Keep such images only if:

  * You import images manually. During automatic export, a corrupt file can prevent the other files in the Hot Folder from being processed.
  * Hot Folder processing is often interrupted by an unstable network connection.
</Note>

### Rename the import profile

If required, change the default name of the import profile and add a comment.

## Related topics

* [Adding page images](/flexi-capture/operator-work/operator-import)
