Actions148
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Files Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
Files → Search Files
AI-generatedOverview
This node interacts with the WaliChat WhatsApp API, specifically enabling users to search for files stored or managed by the service. The "Search Files" operation under the "Files" resource allows filtering and retrieving files based on various criteria such as filename, tags, creation date, file format, status, MIME type, and more.
Typical use cases include:
- Retrieving media files (images, videos, audio) sent or received via WhatsApp for archival or processing.
- Filtering files uploaded or linked remotely by date or size.
- Searching for specific documents or messages attachments by checksum or reference.
- Managing and auditing files by their permission level or owner.
For example, a user might want to find all JPEG images uploaded in the last month tagged with "invoice" or retrieve all files currently marked as "processing" to monitor upload status.
Properties
| Name | Meaning |
|---|---|
| Filters | A collection of filters to narrow down the search results. Includes: |
| - Search Term | Search files by filename, tags, or reference text. |
| - Created After | Only include files created after this date/time. |
| - Created Before | Only include files created before this date/time. |
| - File Format | Filter files by format type. Options: GIF, Voice Message, Native. |
| - File IDs | Filter files by specific file IDs (multiple values allowed). |
| - Tags | Filter files by one or more tags. |
| - SHA2 Checksum | Find a file by its SHA2 checksum value. |
| - Reference | Search files by a reference string. |
| - Status | Filter files by status. Options: Ready, Processing, Failed. |
| - Device ID | Filter files by device ID (selectable from available devices). |
| - Filename | Search files by filename string. |
| - Origin | Filter files by origin source. Options: Remote URL, Upload. |
| - MIME Type | Filter files by MIME type. Options include JPEG Image, PNG Image, MP4 Video, MP3 Audio, OGG Audio, PDF Document. |
| - File Type | Filter files by general type. Options: Image, Video, Audio, Document, Other. |
| - Extension | Filter files by file extension. Options: JPG, PNG, MP4, MP3, OGG, PDF, DOCX, XLSX. |
| - Permission | Filter files by permission level. Options: Public, Read-only, Private. |
| - Owner User ID | Filter files by the creator's user ID. |
| - File Size Range (bytes) | Filter files within a size range specified as min,max in bytes (e.g., "10000,1000000"). |
| - Results Page Size | Number of results per page (pagination). Default is 20. |
| - Page Number | Page number to retrieve (starting from 0). |
Output
The node outputs an array of JSON objects representing the files matching the search criteria. Each object contains metadata about a file, such as its ID, filename, tags, creation date, format, status, MIME type, size, owner, permissions, and other relevant attributes as returned by the WaliChat API.
If binary data is included (not explicitly shown in the provided code), it would represent the actual file content or downloadable links, but this node primarily returns metadata for searched files.
Dependencies
- Requires an API key credential for authenticating with the WaliChat WhatsApp API.
- The node depends on the WaliChat API endpoints for file management.
- No additional environment variables are indicated beyond the API key credential.
- The node uses internal methods to load options dynamically for fields like device IDs and file IDs.
Troubleshooting
- No results returned: Ensure that the filter criteria are correct and not overly restrictive. For example, check date ranges, tags, or file formats.
- Invalid API key or authentication errors: Verify that the API key credential is correctly configured and has sufficient permissions.
- Pagination issues: If expecting many results, adjust the "Results Page Size" and "Page Number" properties accordingly.
- Filter field errors: Some filters require valid IDs or existing values (e.g., device ID). Use the dynamic load options to select valid entries.
- API rate limits or timeouts: Large queries may hit API limits; consider narrowing filters or paginating results.
Links and References
- WaliChat WhatsApp API Documentation (hypothetical link, replace with actual if known)
- n8n Documentation on Creating Custom Nodes
- General info on WhatsApp Business API