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
Overview
This node interacts with the Wassenger WhatsApp API to search for files stored or managed by the service. It allows filtering files based on various criteria such as filename, tags, creation date, file format, MIME type, status, and more. This is useful in scenarios where you need to programmatically locate specific media or document files associated with WhatsApp communications, for example:
- Retrieving all images uploaded after a certain date.
- Searching for voice messages tagged with specific keywords.
- Filtering files by their permission level or owner user ID.
- Paginating through large sets of files matching complex filters.
Such functionality helps automate workflows involving file management, archival, or further processing of WhatsApp-related media.
Properties
| Name | Meaning |
|---|---|
| Filters | A collection of filter options to narrow down the search results. Includes: |
| - Search Term | Search files by filename, tags, or reference. |
| - 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 tags (multiple values allowed). |
| - SHA2 Checksum | Find a file by its SHA2 checksum. |
| - Reference | Search files by reference string. |
| - Status | Filter files by status. Options: Ready, Processing, Failed. |
| - Device ID | Filter files by device ID. |
| - Filename | Search files by filename. |
| - Origin | Filter files by origin. 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 type. Options: Image, Video, Audio, Document, Other. |
| - Extension | Filter files by 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 creator user ID. |
| - File Size Range | Filter by file size range in bytes, specified as "min,max". |
| - 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 that match the specified filters. Each object contains metadata about a file, such as its ID, filename, tags, creation date, format, MIME type, status, owner, permissions, size, and other relevant attributes provided by the Wassenger API.
If binary data is included (not explicitly shown in the code), it would represent the actual file content or downloadable links, but this node primarily returns metadata for searching purposes.
Dependencies
- Requires an API key credential for authenticating with the Wassenger WhatsApp API.
- The node depends on the Wassenger API endpoints related to outbound files.
- No additional environment variables are indicated beyond the API key credential.
- The node uses internal methods to load options dynamically for some properties (e.g., devices, files).
Troubleshooting
Common issues:
- Incorrect or missing API key will cause authentication failures.
- Using invalid filter values (e.g., wrong date format, unsupported file formats) may result in empty results or errors.
- Pagination parameters out of range might return no results.
- Network connectivity issues can prevent communication with the Wassenger API.
Error messages:
- Errors returned from the API will be caught and can be output as error messages if "Continue On Fail" is enabled.
- Typical errors include authentication errors, invalid parameter errors, or rate limiting responses.
Resolutions:
- Verify the API key is correctly configured and has necessary permissions.
- Double-check filter inputs for correct types and valid values.
- Use pagination carefully to avoid requesting pages beyond available data.
- Ensure stable network connection and retry on transient failures.
Links and References
- Wassenger Official Website
- Wassenger API Documentation (for detailed API usage and file resource info)
- n8n Documentation on Creating Custom Nodes