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 afile_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 whenSHAREPOINT_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 providesite_idordrive_id.item_id: Microsoft Graph drive-item ID.file_path: Exact slash-separated path inside the document library.
item_id and file_path, also provide:
drive_id(preferred): Exact document-library drive ID; orsite_id: SharePoint site ID. The site’s default document library is used whendrive_idis omitted.
Idempotency
The tool derives an idempotency key from the authoritativesite_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.
Output
The structured result contains:file_id,file_name,storage_url,mime_type, andfile_size- Authoritative
site_id,drive_id, anditem_id - Source
sharepoint_url idempotency_keyduplicate
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_idorfile_pathwithoutdrive_idorsite_idis 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.