Outlook Groups icon

Outlook Groups

Interact with Microsoft Outlook Groups and SharePoint

Overview

This node operation allows uploading a single file to a specified SharePoint document library within a SharePoint site. It is useful for automating the process of storing files in SharePoint, such as saving reports, documents, or any generated content directly from workflows.

Typical use cases include:

  • Uploading generated PDFs or CSVs to SharePoint for team access.
  • Archiving data exports automatically into SharePoint folders.
  • Integrating with other systems that produce files needing centralized storage on SharePoint.

The node supports both small and large files by using direct upload for files smaller than 4 MB and an upload session for larger files, ensuring reliable uploads regardless of file size.

Properties

Name Meaning
SharePoint Site The SharePoint site where the file will be uploaded.
Document Library The document library (drive) within the SharePoint site where the file will be stored.
Folder Path The folder path inside the document library where the file should be uploaded (e.g., "Documents/Attachments").
Overwrite Existing Whether to overwrite an existing file with the same name if it already exists in the target location.
File Name The name of the file to upload (e.g., "document.pdf").
File Content The content of the file to upload. Can be a string (plain text or base64) or a Buffer.

Output

The output is a JSON object containing details about the uploaded file:

  • id: The unique identifier of the uploaded file in SharePoint.
  • webUrl: A URL to access the uploaded file via a web browser.
  • size: The size of the uploaded file in bytes.
  • mimeType: The MIME type of the uploaded file.
  • Additional metadata fields may also be included depending on the API response.

If multiple input items are processed, the output is an array of such JSON objects, one per uploaded file.

The node does not output binary data for this operation; it only returns metadata about the uploaded file.

Dependencies

  • Requires an authenticated connection to Microsoft Graph API with permissions to access SharePoint sites and document libraries.
  • Needs configuration of an API key credential or OAuth2 token with appropriate SharePoint access rights.
  • The node uses Microsoft Graph endpoints to perform file uploads and create upload sessions for large files.

Troubleshooting

  • Error: "File content must be a string or Buffer"
    This occurs if the provided file content is neither a string nor a Buffer. Ensure the file content input is correctly formatted as a UTF-8 string, base64 string (optionally prefixed with data:), or a Buffer object.

  • Upload fails for files larger than 4 MB without creating an upload session
    The node automatically creates an upload session for files larger than 4 MB. If this fails, check API permissions and network connectivity.

  • Permission errors or "Access Denied"
    Verify that the API credentials have sufficient permissions to write to the specified SharePoint site and document library.

  • Invalid file name or path errors
    The node sanitizes file names by replacing invalid characters. However, ensure folder paths and file names do not contain unsupported characters or reserved words.

  • No binary data found error (for binary upload operations)
    For this specific "Upload File" operation, file content must be provided as a parameter, not as binary data from previous nodes.

Links and References

Discussion