Actions6
Overview
This node integrates with OneDrive to manage and query shared files, specifically focusing on querying PRF (Purchase Request Form) status from Excel worksheets shared with the user. It supports listing shared files, picking a specific shared file, querying PRF status with multiple filter criteria, querying worksheet data by selected columns, clearing token cache, and forcing re-login for authentication. This node is useful for automating workflows that involve accessing and filtering shared OneDrive Excel files, such as tracking PRF statuses or extracting specific worksheet data for further processing.
Use Case Examples
- Automate retrieval of PRF status from a shared Excel sheet by filtering on description, submitter, PRF number, status, additional keywords, and submission date.
- List all shared files of a specific type (e.g., Excel) to select one for further querying.
- Extract specific columns from a worksheet in a shared Excel file for reporting or data analysis.
Properties
| Name | Meaning |
|---|---|
| File Type | Filter shared files by this extension (Excel, Word, PDF, PowerPoint). Used to narrow down file selection when picking or querying files. |
| File | Select the shared file to operate on, represented as a JSON string containing driveId and itemId. |
| Sheet Name | Select the worksheet within the chosen Excel file to query. |
| Description contains | Filter PRF entries where the description contains this string. |
| Submitter contains | Filter PRF entries where the submitter contains this string. |
| PRF No equals | Filter PRF entries where the PRF number exactly matches this string. |
| Status contains | Filter PRF entries where the status contains this string. |
| Additional Keywords | Comma-separated keywords to match in the description for additional filtering. |
| Date Submit (exact) | Filter PRF entries by exact submission date in YYYY-MM-DD format. |
| Cache Duration (minutes) | Duration in minutes to reuse the downloaded file before refreshing it from OneDrive. |
Output
JSON
name- Name of the shared file or worksheet row entry.id- Identifier of the shared file.success- Indicates success status for cache clearing or re-login operations.message- Descriptive message about the operation result.timestamp- Timestamp of the operation result.userCode- User code for device authentication when re-login is required.verificationUri- Verification URL for device authentication.whatsappSent- Indicates if WhatsApp notification was sent for authentication.whatsappError- Error message if WhatsApp notification failed.
Dependencies
- Microsoft Graph API for OneDrive access
- An API key credential for OneDrive device flow authentication
- Axios for HTTP requests
- ExcelJS for reading Excel files
Troubleshooting
- Authentication failures due to expired or invalid tokens. Solution: Use the 'Force Re-login' operation to re-authenticate.
- File not found errors when the selected file is not in the shared files list. Solution: Refresh the file list and ensure correct file selection.
- Issues with loading sheet names or columns if the fileId or sheetName parameters are incorrect or missing.
- WhatsApp notification failures if the WhatsApp API URL or number is not configured properly in credentials.
Links
- Microsoft Graph OneDrive API - Official documentation for OneDrive API used for file access and management.
- ExcelJS - Library used to read and manipulate Excel files.