SharePointDocumentsComponent
This component helps you organize, upload, download, search, and share documents within your SharePoint environment. It acts as a central hub for handling file operations, allowing you to automate data management tasks across Microsoft 365 sites and libraries without needing to write code.
How it Works
This component connects to your SharePoint environment through Microsoft’s secure cloud services. When you run it, it first checks your selected site and library, then performs the chosen action using background services that handle data synchronization and security checks. It automatically adapts to changes in your file structure and returns updated results that can be passed to other steps in your automation flow.
Connection & Credentials
This component requires configuring a credential in the Nappai panel before interacting with the external service:
- Go to the Credentials section in your Nappai panel.
- Create a new credential of the type Microsoft Shared Point and fill in the required fields (Client ID, Client Secret, Tenant ID, and Microsoft Shared Point Scope). You can manage your identities and access at Microsoft Entra.
- In your workflow, select the saved credential in the Credential input field of this node.
Operations
This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:
- Get Drive Items: Retrieve a list of files and folders from a specified location.
- Upload File: Upload a single document or file to a chosen folder.
- Download File: Retrieve and save a specific file from SharePoint to your local environment.
- Create Folder: Generate a new folder inside a selected directory.
- Delete Item: Remove a file or folder from SharePoint.
- Move Item: Relocate a file or folder to a different directory.
- Copy Item: Create a duplicate of a file or folder in a new location.
- Share Item: Send access permissions to specific users or groups.
- Search Files: Look up documents based on keywords or metadata.
- Get File Metadata: View detailed information about a specific file, such as size and modification date.
- Bulk Upload Files: Upload multiple documents at once for faster processing.
To use the component, first select the operation you need in the “Operation” field.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
- Operation: Select the specific action you want to perform.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Credential: Select the Microsoft Shared Point credential configured in your Nappai panel.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Site: Select the SharePoint site you want to work with.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Library/Drive: Select a document library or drive within the chosen site.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Path: Choose a folder path or type one directly. By default, only top-level folders are listed.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Item Type: Filter items by type to show all, files only, or folders only.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Items: Select an item from the list. Click refresh to update the list based on your filters.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Search Items: Type a name or keyword to filter results.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Depth Limit: Control how many folder levels deep the component will search or list.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Site ID: Enter the unique identifier for your SharePoint site.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Document Library: Enter the ID of the document library or drive.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Folder Path: Specify the folder location where files will be listed, uploaded, or moved.
- Visible in: Get Drive Items, Upload File, Create Folder, Search Files, Bulk Upload Files
- File Name: Provide the name of the file to upload.
- Visible in: Upload File, Create Folder
- Bulk Files Data: Prepare a list of file objects with names and content for bulk uploads.
- Visible in: Bulk Upload Files
- File Content: Upload the actual content of the file as text, bytes, or base64.
- Visible in: Upload File
- Item ID: Enter the unique ID of the file or folder you want to download, delete, move, copy, share, or view.
- Visible in: Download File, Delete Item, Move Item, Copy Item, Share Item, Get File Metadata
- Folder Name: Enter the name for the new folder you want to create.
- Visible in: Create Folder
- New Name: Provide a new name for an item when moving or copying it.
- Visible in: Move Item, Copy Item
- Target Parent ID: Enter the ID of the destination folder for move or copy operations.
- Visible in: Move Item, Copy Item
- Share Recipients: Enter email addresses to share the item with.
- Visible in: Share Item
- Share Message: Add an optional note to appear in the sharing invitation.
- Visible in: Share Item
- Share Role: Choose the permission level to grant (e.g., view or edit).
- Visible in: Share Item
- Search Query: Enter a search term to find files and folders by name or content.
- Visible in: Search Files
- File Types Filter: Specify file extensions to include or exclude (e.g., .pdf, .docx).
- Visible in: Get Drive Items, Search Files
- Items Count: Set the maximum number of items to retrieve (default is 100).
- Visible in: Get Drive Items, Search Files
- Mode: Choose whether to enter data manually or select from proposed options.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
- Mapping Mode: Toggle to enable batch processing and dynamic field linking.
- Visible in: Get Drive Items, Upload File, Download File, Create Folder, Delete Item, Move Item, Copy Item, Share Item, Search Files, Get File Metadata, Bulk Upload Files
Outputs
This component returns updated file lists, downloaded file content, and metadata after performing the selected operation. The results can be automatically passed to other steps in your workflow for further processing, storage, or sharing.
Output Data Example (JSON)json
{ “data”: { “available_items”: [ { “id”: “01ABCDEF123456789”, “name”: “Q3_Report.pdf”, “type”: “file”, “size”: 245600, “modifiedDate”: “2024-05-20T14:30:00Z”, “parentFolderId”: “01XYZ789ABCDEF123” } ], “items_count”: 1, “file_content”: “<binary_stream_or_base64_placeholder>”, “operation_status”: “success” } }
Connectivity
This component is typically connected to the beginning or middle of a document management workflow. It works well with input nodes that provide file paths or user lists, and it feeds into output nodes for saving files, sending notifications, or updating databases. Its structured output makes it ideal for chaining with automation steps that require file metadata, content, or item IDs.
Usage Example
Scenario: Automating Monthly Report Distribution
- Set Operation to
Get Drive Itemsand select your Finance SharePoint site and the “Reports” library. - Use File Types Filter to only show
.xlsxfiles and set Items Count to 50. - Once the list appears, select a specific file using the Items dropdown.
- Change Operation to
Share Item, enter the team’s email addresses in Share Recipients, and set Share Role toeditor. - Run the workflow to automatically locate the latest reports and share them with the right people.
Important Notes
🔒 Limit Shared Document Permissions 🔴 When sharing documents, only grant the minimum required permissions to users. Review SharePoint permission settings to avoid accidental exposure of sensitive data.
⚠️ Component is in Development 🟡 Because the component is marked as development, some features may not be fully stable or may change in future releases. Users may encounter unexpected behavior or bugs.
⚠️ Network Connectivity to SharePoint 🟡 The component communicates with SharePoint over the internet. Ensure that your network allows outbound HTTPS traffic to the SharePoint tenant and that any firewall or proxy settings are properly configured.
📋 Microsoft SharePoint Credentials Needed 🟡 To use this component, you must have a valid SharePoint account with appropriate permissions for the sites and libraries you intend to manage. Provide your credentials during configuration or ensure they are stored in your environment.
💡 Use Consistent Naming Conventions 🟢 Adopt clear and consistent file or folder names when uploading. This simplifies later searching, sharing, and automation tasks within SharePoint.
⚙️ Avoid Large Bulk Uploads 🟡 Uploading many large files simultaneously can exceed SharePoint’s throttling limits and result in failures. Consider batching uploads or using a dedicated bulk upload tool if you need to transfer large volumes.
ℹ️ Mapping Mode Enabled 🟢 Mapping mode automatically links input fields to SharePoint fields. Users should verify that the mappings match the target SharePoint list or library schema to avoid data mismatches.
Tips and Best Practices
- Always verify site and library access before running workflows to prevent permission errors.
- Use the refresh button in the Items dropdown after changing filters to see updated results.
- Break large file transfers into smaller batches to avoid network or server timeouts.
- Keep file names descriptive and follow your organization’s naming standards for easier retrieval.
- Review sharing permissions regularly to ensure only authorized users have access.
Security Considerations
- Ensure your network allows outbound HTTPS traffic to Microsoft SharePoint services.
- Only grant necessary permissions when using the sharing operation to protect sensitive data.
- Keep your Microsoft Shared Point credentials secure and rotate them according to your organization’s security policies.
- The component handles data encryption during transmission automatically, but verify that your SharePoint site uses modern authentication.