WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

Files → Delete Files

AI-generated

Overview

This node interacts with the "Files" resource of the WaliChat WhatsApp API, specifically supporting the operation to delete files. It allows users to delete multiple files from their outbound file storage based on various filtering criteria such as creation date, file type, owner, size, and more.

Typical use cases include:

  • Cleaning up old or expired media files automatically.
  • Removing files that match specific tags or MIME types to manage storage efficiently.
  • Deleting files uploaded by certain users or with particular permissions.
  • Bulk deletion of files matching complex filters without manual intervention.

For example, a user might configure this node to delete all image files created before a certain date or remove files larger than a specified size that are no longer needed.

Properties

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

Output

The node outputs JSON data representing the result of the delete operation. Typically, this will include information about which files were deleted or confirmation of successful deletion. The exact structure depends on the API response but generally includes identifiers or counts of deleted files.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the WaliChat WhatsApp API.
  • The node relies on the WaliChat API's outbound files endpoint to perform deletions.
  • Proper configuration of the API key credential within n8n is necessary.

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 allowed limit (over 500) for files to delete can cause errors.
    • Insufficient permissions associated with the API key may prevent deletion.
  • Error Messages:

    • Errors related to authentication usually indicate missing or invalid API credentials.
    • Validation errors may occur if date formats or filter values are incorrect.
    • API rate limits or quota exceeded errors may appear if too many requests are made in a short time.
  • Resolutions:

    • Verify API key validity and permissions.
    • Double-check filter values and ensure they conform to expected formats.
    • Reduce the number of files to delete per execution if hitting limits.
    • Use the "Continue On Fail" option in n8n to handle partial failures gracefully.

Links and References

Discussion