Outlook and document knowledge for agents
Under Integrations → Agent connections (/app/agent-connectors), owners/admins connect Microsoft 365, OneDrive, SharePoint or Google Drive. The client ID and client secret come from your own app registration. OAuth authorization and token renewal run on the server; secrets are encrypted and bound to the workspace. The browser does not receive any access tokens.
The operator sets AIHUB_PUBLIC_URL to the public HTTPS address. The matching exact redirect URI is entered in the app registration:
- Microsoft 365:
<AIHUB_PUBLIC_URL>/api/agent-connectors/oauth/microsoft365/callback - OneDrive:
<AIHUB_PUBLIC_URL>/api/agent-connectors/oauth/onedrive/callback - SharePoint:
<AIHUB_PUBLIC_URL>/api/agent-connectors/oauth/sharepoint/callback - Google Drive:
<AIHUB_PUBLIC_URL>/api/agent-connectors/oauth/google_drive/callback
Microsoft uses a Web-platform app with delegated permissions. The tenant ID is optional (common); for organization-bound apps, enter the specific tenant ID. Outlook requests the User.Read, offline_access, Mail.ReadWrite, Mail.ReadWrite.Shared, Calendars.ReadWrite, Calendars.ReadWrite.Shared, Contacts.Read and Contacts.Read.Shared permissions. An organization policy may require administrator consent. OneDrive uses Files.Read.All, SharePoint additionally Sites.Read.All. SharePoint requires the site ID; a drive ID lets you select a specific document library. Google requires an enabled Drive API, an OAuth web client and the scope drive.readonly; depending on the publishing status, Google may require an app review.
The created actions are assigned in the agent editor and used in private live work orders. Outlook can read emails and contacts, query a calendar time range, and create email drafts and appointments. For shared mailboxes, the mailbox address/ID is specified in the mailbox field; the signed-in user must actually have access to it. The draft is saved in the Outlook mailbox. It is not sent automatically. Write actions use the existing work order approval. For appointments, request_id as a stable Microsoft transaction identifier.
Import and update documents
- With List documents you can find the file ID. Read further pages via the returned
cursorvalue. Optionally select a folder. - Read document returns text without creating knowledge. Import document as knowledge creates a knowledge source; importing the same file again through the same connection updates the existing entry with the same ID.
- Assign the imported knowledge source to the desired agent. Private work orders use the saved assignment directly; for public channels, publish a reviewed agent version.
- Update imported documents updates the files already imported through this connection. Each run processes at most 20 sources; pass a non-empty
cursorin the next run. The run is started manually as an agent action. No schedule or webhook is set up automatically.
Changes keep the knowledge ID. If a file has been removed, locked or is temporarily unavailable, its stored text is cleared and an error is recorded so that outdated knowledge is no longer used. A later successful sync run restores the content. The import covers specifically selected files, not an automatic full copy of entire drives.
Supported formats are TXT, Markdown, CSV, PDF, DOCX and XLSX up to 2 MB and 150,000 extracted characters. Google Docs and Slides are exported as text, Google Sheets as XLSX. Folders and unsupported Google file types cannot be imported.
Text recognition for scans
With ocr=true SIHub uses local text recognition for PDF, PNG, JPEG, TIFF and BMP when regular text extraction fails. The operator installs Tesseract and for PDF Poppler (pdftoppm), for example the operating system packages tesseract-ocr and poppler-utils. Without these programs, a specific setup error is shown. Processing uses temporary files, fixed time limits and at most 20 PDF pages. A mixed PDF with existing text uses its text layer first; OCR is not a layout or table reconstruction service.