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
Queue → Empty Queue
AI-generatedOverview
The "Empty Queue" operation under the "Queue" resource in this node allows users to delete messages that are currently queued for sending via a WhatsApp number. This is useful for managing and cleaning up message queues, especially when you want to cancel pending messages before they are sent.
Common scenarios include:
- Clearing all queued messages for a specific WhatsApp number to stop any further delivery.
- Selectively deleting queued messages based on filters such as message IDs, phone numbers, group/broadcast IDs, or date ranges.
- Skipping scheduled messages that are set to be delivered in the future while clearing the rest of the queue.
- Waiting for confirmation that all deletions have completed before proceeding.
Practical examples:
- A user wants to immediately clear all pending messages from a particular WhatsApp number due to an urgent change in campaign strategy.
- An administrator needs to remove only messages queued for certain phone numbers or groups to comply with updated privacy requests.
- A system automatically clears messages older than a certain date to maintain queue hygiene.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number whose message queue will be emptied. |
| Wait for Completion | Whether to wait until all queued messages are deleted before returning (response may take up to 90 seconds). |
| Skip Scheduled Messages | If enabled, scheduled messages that are set to be delivered in the future will not be deleted. |
| Filter Type | The type of filter to apply when emptying the queue. Options: None (delete all), Message IDs, Phone Numbers, Group/Broadcast IDs, Date Range. |
| Message IDs | (Required if Filter Type is "Message IDs") List of queued message IDs (24-character hexadecimal strings) to delete. |
| Phone Numbers | (Required if Filter Type is "Phone Numbers") List of phone numbers in E164 format (e.g., +447362053576) whose queued messages should be deleted. |
| Group/Broadcast IDs | (Required if Filter Type is "Group/Broadcast IDs") List of WhatsApp group or broadcast list IDs (e.g., 447362053576-000000000@g.us) to filter queued messages. |
| Date Filters | (Required if Filter Type is "Date Range") Collection with optional "Created Before" and/or "Created After" dates to filter queued messages by creation date. |
Output
The node outputs JSON data representing the result of the empty queue operation. This typically includes confirmation of which messages were deleted or status information about the queue cleanup process.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the WaliChat WhatsApp API.
- The node depends on the external WaliChat service to manage WhatsApp message queues.
- Proper configuration of the WhatsApp number (device) is necessary to target the correct message queue.
Troubleshooting
Common Issues:
- Providing invalid or non-existent WhatsApp number IDs will cause failures in queue operations.
- Using incorrect message IDs, phone numbers, or group IDs in filters may result in no messages being deleted.
- Long wait times if "Wait for Completion" is enabled, especially with large queues.
Error Messages:
- Errors related to authentication usually indicate missing or invalid API credentials.
- Validation errors occur if required properties for the selected filter type are missing.
- Timeout or network errors may happen if the external API is unreachable; retry or check connectivity.
Resolutions:
- Verify that the WhatsApp number ID is correct and active.
- Ensure that filter values match the expected formats (e.g., E164 for phone numbers).
- Use the "Wait for Completion" option judiciously to avoid long delays.
- Check API key validity and permissions.
Links and References
- WhatsApp Business API Documentation
- WaliChat API Documentation (Assumed, replace with actual if available)