Skip to main content
Connections link an external system (Google Drive, SharePoint, OneDrive, Microsoft Teams, or Odoo) to a workspace. You discover the connector, connect with credentials or OAuth, then sync to pull documents into AiQL.

Prerequisites

  • An AiQL API key in the AIQL_API_KEY environment variable
  • A workspace ID (see Quickstart to create one)
  • Credentials for the system you want to connect (API key for Odoo, or an OAuth-capable account for Google/Microsoft)

Discover connectors

List every connector in the marketplace catalog, including ones that are discoverable but not yet connectable through the API.
Each entry reports connectable, auth_type, and (when connectable) config_schema and example_config. Fetch one type for the full descriptor:
Connectable types today: google-drive, sharepoint, onedrive, microsoft-teams, and odoo.

Connect with an API key (Odoo)

For Odoo, pass the credential fields in the body. The connection is created immediately.
A successful response has status of connected and a populated connection object. Save connection.id for sync and management.

Connect with OAuth (Google / Microsoft)

For google-drive, sharepoint, onedrive, and microsoft-teams, omit credential_id to start an OAuth handshake. Pass a return_url so the browser lands back in your app when the handshake finishes.
The response has status of pending_authorization and an authorization_url. Open that URL in the user’s browser (redirect or popup). After the provider consent screen, AiQL completes the handshake and redirects to your return_url with ?status=success|error&connection_id=... appended. Microsoft Teams also requires tenant_id in config to start admin consent:
To reuse an existing credential instead of starting a new OAuth flow, pass credential_id from a previous connection. That path returns status: "connected" immediately, the same as Odoo.

List and get connections

Each connection includes connector_type, name, config, change_token, and last_synced_at.

Update a connection

Rename the connection or adjust connector-specific config (for example root_folder_id for Google Drive, or site_id / drive_id for SharePoint).

Sync a connection

Start a sync workflow. The endpoint returns 202 with Temporal identifiers while the sync runs asynchronously.
Set dry_run to true to enumerate changes without persisting new or updated documents. After a successful sync, last_synced_at and change_token on the connection update so the next sync can run incrementally.

Delete a connection

Deletion removes the connection and its attached credential.
Prefer OAuth with a return_url for browser-based apps. For headless or automation flows, use Odoo credentials or reuse an existing credential_id from a prior OAuth connect.