Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.unstructured.io/llms.txt

Use this file to discover all available pages before exploring further.

First time creating a connector? Read this first.
Ingest your files into Unstructured from Outlook.

Requirements

You will need:
  • 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 application (client) 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.

Examples

To create an Outlook source connector, see the following examples. For more information on working with source connectors using the Unstructured API, see Source endpoints.
import os

from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import CreateSourceRequest
from unstructured_client.models.shared import CreateSourceConnector

with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as client:
    response = client.sources.create_source(
        request=CreateSourceRequest(
            create_source_connector=CreateSourceConnector(
                name="<name>",
                type="outlook",
                config={
                    "client_id": "<client-id>",
                    "authority_url": "<authority-url>",
                    "tenant": "<tenant>",
                    "client_cred": "<client-cred>",
                    "user_email": "<user-email>",
                    "outlook_folders": ["<folder-name>", "<folder-name>"],
                    "recursive": <True|False>
                }
            )
        )
    )

    print(response.source_connector_information)

Configuration settings

Replace the preceding placeholders as follows:
name
string
required
A unique name for this connector.
client_id
string
required
The application (client) ID of the Microsoft Entra ID app registration that has access to the Outlook account.
authority_url
string
default:"https://login.microsoftonline.com"
The authentication token provider URL for the Entra ID app registration.
tenant
string
required
The directory (tenant) ID of the Entra ID app registration.
client_cred
string
required
The client secret for the Entra ID app registration.
user_email
string
required
The user’s email address for the target Outlook account.
outlook_folders
string
required
An array of folder names to access, for example: ["Inbox","Sent"]. Do not specify any subfolder names.
recursive
boolean
default:"false"
Source connector only. Set to true to access any and all subfolders within each of the specified top-level folders.