Actions6
Overview
This node integrates with OneDrive to interact with files shared with the user. It supports operations such as listing shared files, picking a specific shared file by filtering by file type, querying PRF (Purchase Request Form) status sheets, querying worksheet data, clearing cached authentication tokens, and forcing re-login for authentication. It is useful for automating workflows that involve accessing and processing shared OneDrive files, especially Excel sheets containing PRF data.
Use Case Examples
- Automatically list all shared Excel files to select one for further processing.
- Pick a specific shared file by filtering by file type (e.g., Excel, Word, PDF, PowerPoint) and retrieve its metadata.
- Query specific worksheets within a shared Excel file to extract columns of interest for reporting or data analysis.
- Clear cached authentication tokens to resolve access issues or force a fresh login session.
Properties
| Name | Meaning |
|---|---|
| File Type | Filter shared files by the selected file extension (Excel, Word, PDF, PowerPoint). Used to narrow down the list of shared files to pick from. |
| File | Select the shared file to operate on, represented as a JSON string containing driveId and itemId. This is required for operations that work on a specific file. |
Output
JSON
name- The name of the selected or listed shared file.id- The unique identifier of the selected shared file.
Dependencies
- Requires an API key credential for OneDrive device flow authentication.
- Uses Microsoft Graph API to access OneDrive shared files and file contents.
- Optionally integrates with a WhatsApp API to send authentication codes for device flow login notifications.
Troubleshooting
- Common issues include authentication failures requiring device code login. The node logs user codes and verification URLs and can send these via WhatsApp if configured.
- If a selected file is not found in the shared files list, an error 'File not found' is thrown. Ensure the fileId parameter is correct and the file is still shared.
- Token cache issues can be resolved by using the 'Clear Token Cache' operation to remove stale tokens.
- Force re-login operation helps recover from authentication token expiration or invalidation by initiating a new device code login flow.
Links
- Microsoft Graph OneDrive API - Official documentation for OneDrive API used to access shared files and file contents.
- OAuth 2.0 Device Code Flow - Explanation of the device code authentication flow used for OneDrive API access.