Microsoft SharePoint Action Block
What it does: Interact with Microsoft SharePoint sites to manage files, list items, and document libraries as part of your workflow automation.
In simple terms: Automate SharePoint operations -- upload documents, manage list items, and work with SharePoint data directly from your workflows.
When to Use This
Use the SharePoint action when you need to:
- ✅ Upload or download documents from SharePoint document libraries
- ✅ Create, update, or query SharePoint list items programmatically
- ✅ Synchronize data between SharePoint lists and other systems
- ✅ Automate document management across your organization
Example: When a new employee is onboarded, create a SharePoint list item with their details and upload their signed documents to the HR document library.
Features
- OAuth2 Authentication: Secure Microsoft identity platform connection
- File Management: Download, upload, and update files in document libraries
- List Operations: Full CRUD operations on SharePoint list items
- List Metadata: Retrieve list definitions and schemas
- Variable Support: Use workflow variables for dynamic queries and content
- Multi-Site Support: Connect to any SharePoint site via subdomain configuration
Setup
1. Connect Your Microsoft Account
- Click Connect Microsoft Account in the block settings
- Sign in with your Microsoft 365 organizational account
- Grant the requested SharePoint permissions (Sites.ReadWrite.All)
- Your account will be linked securely via OAuth2
2. Configure Your SharePoint Subdomain
After connecting, you must specify your SharePoint subdomain:
Subdomain: yourcompanyThis corresponds to https://yourcompany.sharepoint.com. The block uses this to construct API requests to the correct SharePoint tenant.
SharePoint requires an organizational Microsoft 365 account. Personal Microsoft accounts do not have access to SharePoint. Your tenant must also have MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET configured in the Indite environment.
3. Select Site and Resource
- Choose the Action (e.g., Create Item, Upload File)
- Specify the Site ID or site path
- Specify the List ID or Document Library depending on the action
- Fill in the required fields
Supported Actions
File Operations
| Action | Description |
|---|---|
| Download File | Download a file from a SharePoint document library |
| Upload File | Upload a new file to a document library |
| Update File | Replace an existing file with a new version |
List Item Operations
| Action | Description |
|---|---|
| Create Item | Add a new item to a SharePoint list |
| Get Item | Retrieve a single list item by ID |
| Get All Items | Retrieve all items from a SharePoint list |
| Update Item | Modify an existing list item |
| Delete Item | Remove an item from a SharePoint list |
List Operations
| Action | Description |
|---|---|
| Get List | Retrieve metadata and schema for a single list |
| Get All Lists | Retrieve all lists available on a SharePoint site |
Using Variables
You can use workflow variables in any SharePoint field:
List Item Fields:
Title: {{project.name}} - {{date.today}}
Status: {{approval.status}}
Assigned To: {{employee.email}}File Upload Path:
/Shared Documents/{{department}}/{{date.year}}/{{document.name}}Filter Query (Get All Items):
Status eq '{{filter.status}}'Response Mapping
Map results from SharePoint actions to workflow variables:
Available Values (List Items):
- Item ID: Unique identifier for the list item
- Title: The item's title field
- Created: Creation timestamp
- Modified: Last modification timestamp
- Created By: User who created the item
- All Fields: All custom column values as key-value pairs
Available Values (Files):
- File ID: Unique identifier
- File Name: Name with extension
- File Size: Size in bytes
- Web URL: Browser link to the file
- Download URL: Direct download link
- ETag: Version identifier for concurrency control
Example Mapping:
Item ID → {{sharepoint.itemId}}
Title → {{sharepoint.title}}
Web URL → {{sharepoint.webUrl}}Common Use Cases
1. Employee Onboarding Tracker
Trigger: New hire form submission SharePoint Action: Create Item
List: Onboarding Tracker
Title: {{employee.fullName}}
Department: {{employee.department}}
Start Date: {{employee.startDate}}
Status: Pending2. Document Approval Workflow
Trigger: Document uploaded event SharePoint Action: Update Item
List: Document Approvals
Item ID: {{document.listItemId}}
Status: Approved
Approved By: {{approver.name}}
Approved Date: {{date.now}}3. Inventory Sync from External System
Trigger: Inventory update webhook SharePoint Action: Get All Items, then Update Item
List: Product Inventory
Filter: ProductSKU eq '{{inventory.sku}}'
Update Field - Quantity: {{inventory.newQuantity}}4. Automated Report Upload
Trigger: Schedule (Monthly) SharePoint Action: Upload File
Document Library: /Shared Documents/Monthly Reports
File Name: report-{{date.year}}-{{date.month}}.pdf
File Content: {{report.pdfData}}Best Practices
Data Management
- ✅ Use list item IDs rather than titles for reliable lookups
- ✅ Validate data before creating or updating list items
- ✅ Use filters in Get All Items to reduce response size
- ✅ Handle pagination for lists with more than 5,000 items
Performance
- ✅ Limit the fields returned when querying large lists
- ✅ Use specific site and list IDs rather than iterating through all sites
- ✅ Batch multiple item updates when possible
Security
- ✅ Use the principle of least privilege for SharePoint permissions
- ✅ Audit list item changes through SharePoint's built-in versioning
- ✅ Avoid storing sensitive data in list item titles (they appear in URLs)
- ✅ Regularly review which workflows have access to SharePoint data
Troubleshooting
Cannot Find Site or List
Check:
- The SharePoint subdomain is correctly configured
- Your account has access to the target site
- The site ID and list ID are correct (use Get All Lists to discover IDs)
Permission Denied on File Upload
Solutions:
- Verify your account has Contribute or Edit permissions on the document library
- Reconnect the Microsoft account to refresh the OAuth token
- Check that the document library does not have check-in/check-out enabled
List Item Creation Fails
Check:
- All required columns have values provided
- Column data types match (e.g., dates in ISO format, numbers as numeric values)
- The list has not exceeded its item limit threshold
Limitations
- List View Threshold: SharePoint lists with more than 5,000 items require indexed columns for filtered queries
- File Size: Maximum file upload size is 250 MB through the API
- API Rate Limits: Microsoft Graph API throttling applies per tenant
- Column Types: Some complex column types (managed metadata, calculated) may require special handling
- Permissions: Site-level permissions cannot be modified through this block
Tip: Use SharePoint's built-in column indexing on frequently filtered columns to avoid the 5,000 item list view threshold.
Related Blocks
- OneDrive: Manage personal OneDrive files
- Excel 365: Work with Excel files stored in SharePoint
- Microsoft To Do: Create tasks from SharePoint list items
- Condition: Add logic before SharePoint operations
- Set Variable: Prepare dynamic list item values