Wassenger icon

Wassenger

Interact with Wassenger WhatsApp API

Actions148

Overview

This node interacts with the Wassenger WhatsApp API to manage files associated with outbound messages. Specifically, the "Delete Files" operation under the "Files" resource allows users to delete multiple files from their Wassenger account based on various filtering criteria.

Common scenarios where this node is beneficial include:

  • Cleaning up old or unused media files to free storage space.
  • Removing files that match specific attributes such as file type, creation date, or owner.
  • Automating file management workflows by deleting files in bulk according to business rules.

Practical example:

  • A user wants to delete all image files older than 30 days that are larger than 1MB and have a "public" permission setting. This node can be configured with those filters to perform the deletion automatically.

Properties

Name Meaning
Delete Options Collection of options to specify which files to delete. Contains the following sub-properties:
- Maximum Files to Delete (limit) Limits the number of files to delete in one operation (range 1-500).
- File IDs (ids) Specific file IDs to delete. Multiple values allowed.
- Created Before (before) Deletes files created before this date/time.
- Created After (after) Deletes files created after this date/time.
- Expires Before (expires) Deletes files that expire before this date/time.
- Filename (filename) Deletes files matching this exact filename.
- File Extensions (ext) Deletes files with these extensions (e.g., jpg, png). Multiple values allowed.
- MIME Types (mime) Deletes files with these MIME types (e.g., image/jpeg, video/mp4). Multiple values allowed.
- File Types (kind) Deletes files of these types. Options include Image, Video, Audio, Document, Other. Multiple selections allowed.
- Owner IDs (owner) Deletes files created by these user IDs. Multiple values allowed.
- Format (format) Deletes files with this format. Options: GIF, Voice Message, Native.
- Permission (permission) Deletes files with this permission level. Options: Public, Read-only, Private.
- Tags (tags) Deletes files tagged with any of these tags. Multiple values allowed.
- Minimum Size (bytes) (size) Deletes files larger than this size in bytes.
- Origin (origin) Deletes files with this origin. Options: Remote URL, Upload.
- SHA2 Hashes (sha2) Deletes files with these SHA2 hashes. Multiple values allowed.

Output

The node outputs JSON data representing the result of the delete operation for each input item processed. The output typically includes information about the success or failure of the deletion request(s).

If binary data were involved, it would represent file content, but since this operation deletes files, no binary output is expected.

Dependencies

  • Requires an active connection to the Wassenger WhatsApp API.
  • Needs an API key credential configured in n8n for authentication.
  • No additional external dependencies beyond the Wassenger API.

Troubleshooting

  • Common issues:

    • Providing invalid or non-existent file IDs may cause errors or no files being deleted.
    • Setting conflicting or overly restrictive filters might result in zero files matched for deletion.
    • Exceeding the maximum limit of files to delete (more than 500) will likely cause an error.
  • Error messages:

    • Errors related to authentication failures indicate missing or incorrect API credentials.
    • Validation errors may occur if date formats or filter values are invalid.
    • API rate limits or network issues could cause temporary failures; retrying later may help.
  • Resolutions:

    • Verify API key credentials are correctly set up.
    • Double-check filter values and ensure they conform to expected formats.
    • Use smaller batch sizes when deleting large numbers of files.

Links and References

Discussion