Skip to main content
This document covers import_from_sharepoint (display name “SharePoint Import”), the tool that copies one file from a SharePoint document library into platform storage. The returned storage_url can be passed to extraction, CSV, code, and export tools.

When to use

Use this tool when an agent needs one known SharePoint file during a task. Use a file_import trigger instead when a folder must be watched continuously for new files. The import is a point-in-time copy. Changes made in SharePoint afterward do not update the stored copy.

Authentication and enablement

The tool uses the workspace’s SharePoint connector. Its OAuth token is injected by the platform and not shown as a per-run input. Outbound Microsoft Graph calls are audited. The tool registers only when SHAREPOINT_CLIENT_ID is configured. Off by default — enable it in the agent’s Tools panel.

Inputs

Choose exactly one file selector:
  • sharing_url: SharePoint file sharing URL. Do not also provide site_id or drive_id.
  • item_id: Microsoft Graph drive-item ID.
  • file_path: Exact slash-separated path inside the document library.
For item_id and file_path, also provide:
  • drive_id (preferred): Exact document-library drive ID; or
  • site_id: SharePoint site ID. The site’s default document library is used when drive_id is omitted.
Stable Graph IDs returned by this tool can be reused by workbook and export operations.

Idempotency

The tool derives an idempotency key from the authoritative site_id, drive_id, and item_id. Repeating the same resolved import within one task returns the existing platform file with duplicate: true instead of uploading another copy. Idempotency is scoped to the task and workspace; it does not silently reuse another tenant’s artifact.

Size and file restrictions

  • Maximum file size: 250 MB.
  • Folders and non-downloadable items are rejected.
  • Empty files are rejected.
  • The limit is checked from Graph metadata and again while streaming the download.
Downloads are streamed through a temporary file rather than buffered entirely in memory.

Output

The structured result contains:
  • file_id, file_name, storage_url, mime_type, and file_size
  • Authoritative site_id, drive_id, and item_id
  • Source sharepoint_url
  • idempotency_key
  • duplicate
On React tasks, storage_url may be returned as a ${VAR_N} reference so downstream tools can consume it without exposing the raw storage URL in later steps.

Errors

  • Missing or multiple selectors fail validation before a Graph request.
  • item_id or file_path without drive_id or site_id is rejected.
  • Sharing URLs that do not resolve to authoritative site, drive, and item IDs are rejected.
  • Folder, empty-file, oversized-file, download, storage, and file-registration failures return structured tool errors.