This page was recently updated. What do you think about it? Let us know!.

Connect Outlook to your preprocessing pipeline, and use the Unstructured Ingest CLI or the Unstructured Ingest Python library to batch process all your documents and store structured outputs locally on your filesystem.

You will need:

The Outlook prerequisites:

  • The Outlook user’s email address.

  • A Microsoft Entra ID app registration in the same Azure account as the Outlook account. You will need this app registration’s client (application) ID, client secret, and directory (tenant) ID. Learn how.

  • The Entra ID app registration must have the following Graph API permission levels of the application (not delegated) type:

    • Mail.Read
    • Mail.ReadBasic
    • User.Read.All

    Learn how.

The Outlook connector dependencies:

CLI, Python
pip install "unstructured-ingest[outlook]"

You might also need to install additional dependencies, depending on your needs. Learn more.

The following environment variables:

  • OUTLOOK_USER_EMAIL - The Outlook user’s email address, represented by --user-email (CLI) or user_mail (Python).
  • OUTLOOK_APP_CLIENT_ID - The application (client) ID of the Microsoft Entra ID app registration that has access to the user’s email account, represented by --client-id (CLI) or client_id (Python).
  • OUTLOOK_APP_CLIENT_SECRET - The client secret for the Entra ID app registration, represented by --client-cred (CLI) or client_cred (Python).
  • OUTLOOK_APP_TENANT - The directory (tenant) ID of the Entra ID app registration, represented by --tenant (CLI) or tenant (Python).

These environment variables:

  • UNSTRUCTURED_API_KEY - Your Unstructured API key value.
  • UNSTRUCTURED_API_URL - Your Unstructured API URL.

Now call the Unstructured CLI or Python SDK. The destination connector can be any of the ones supported. This example uses the local destination connector: