Skip to content


Folder Import#

If you want to import documents from a specific email folder, here are the steps you need to take:

Your email folder could look like this.

Go to SETTINGS in the top bar and click on Import.

As you can see, there is no email account setup for the import yet.

Click on the OFF button to open the Email import settings.

The boxes for E-Mail and Password as well as the API Key might get automatically filled in with your login information for DOC², depending on your browser settings. Please empty the fields before continuing to enter the needed information for the E-Mail Import.

What you need to do is enter the protocol (IMAP or POP3), the encryption (SSL or TSL), server-name, port, a username (e.g. "incoming invoices") as well as the email address and password from which the documents are going to be imported from.

This example is for a google email account:

Important due to changes made by Google

You now need to set up 2-Factor Authentication and create an App-Password which you have to use here to make sure that the E-Mail import will work.

After you have entered all required fields of your respective provider, save the data.

You can test the login by pressing the TEST LOGIN button. If all data is correct you will get the following feedback.

After you click the IMPORT button, the documents will be fetched from the mailbox and you will be taken directly to the Dashboard.

Configuring Microsoft Email Services with OAuth2#

Register App on Azure AD#

Follow the steps below to register an App to allow email ingestion in DOC² using OAuth2:
Note: The permissions may require authorization from an administrator.

1. Sign in to the Azure Portal using your credentials.

2. From Azure services, locate and open Azure Active Directory (also known as Azure AD).

3. Under the Manage section, select App registrations.

4. In the App registrations screen, click + New registration.

5. The Register an application screen displays. Enter the user-facing display name for the App in Name.

6. Select one of the following account types depending on your needs:

  • Accounts in any organizational directory (Any Azure AD directory – Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)

7. Leave the option Redirect URI (optional) as is.

8. Click Register to complete the App registration. This will return you to the screen for the new App.

9. In the App screen, locate the Application (client) ID. Copy it to be used when configuring email ingestion for DOC².

10. From left panel, select Certificates & secrets:

11. In the Certificates & secrets screen, click on + New client secret button under Client secrets section:

12. In the Add a client secret dialog box, click the Add button:

It is recommended to fill in a description to identify this secret among many (as of now the limit is 2 secrets per App).
Note: Select this expiration date according to your company policy. Once expired, a new client secret will need to be created and specified for each email configuration where it was used previously.

13. The newly generated client secret will be visible. Copy this client secret Value to be used when configuring email ingestion for DOC²

Important: Ensure that you have copied the client secret value as it will not display again once it is closed.

14. Select Authentication on the left panel. This will present the Authentication screen on the right-hand side.

15. In the Advanced settings section, click Yes for Allow public client flows.

16. Click Save to confirm changes.

17. Select API permissions on the left panel. This will present the API permissions screen.

18. By default the User.Read permission from Microsoft Graph is present, leave this as is.

Note: This is a required permission.
If this permission is not available, then add the permission with the steps mentioned below for Mail.ReadWrite permission.

19. Click + Add a permission.This will open the Request API permissions panel.

20. Click Microsoft Graph.

21. From the two sub-categories, select Delegated permissions.

22. Type Mail.ReadWrite in the search box. Select the Mail.ReadWrite checkbox for the permission.

23. This will enable the Add permissions button at the bottom of the panel. Click Add permissions. This will add the Mail.ReadWrite permission to the list of Configured permissions for the App.

24. Note: Administrator permissions may be required. The administrator will have to authorize the App for using these permissions.
Once authorized the granted status will be indicated as follows:

This concludes the steps for App registration for DOC² email ingestion using OAuth2.