SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node interacts with the SparkBot WhatsApp API to manage WhatsApp numbers and their associated chats. Specifically, the Delete Chats operation under the WhatsApp Numbers resource allows users to delete chat histories for specified phone numbers linked to a particular WhatsApp number ID (device). This is useful for cleaning up or managing chat data programmatically.

Common scenarios:

  • Automatically clearing chat histories for specific contacts after a campaign or customer interaction.
  • Managing storage by deleting old or irrelevant chats from selected WhatsApp numbers.
  • Maintaining privacy compliance by removing chat data on demand.

Practical example:
You have a WhatsApp number connected to your business account and want to delete chats with up to 10 specific customers identified by their international phone numbers. Using this node, you specify the WhatsApp number ID and provide the list of phone numbers whose chats should be deleted.

Properties

Name Meaning
WhatsApp Number ID The unique identifier of the WhatsApp number (device) from which chats will be deleted.
Chat Phone Numbers One to ten phone numbers (with international country codes) whose chats will be deleted.

Output

The node outputs JSON data representing the result of the delete chats operation. Typically, this will include confirmation of successful deletion or details about any errors encountered during the process.

If the operation supports binary data output (not indicated here), it would represent related files or media, but in this case, the output is purely JSON-based.

Dependencies

  • Requires an active connection to the SparkBot WhatsApp API.
  • Needs an API key credential configured in n8n for authentication with the SparkBot service.
  • The node depends on internal methods that handle various resources and operations, including the executeNumberOperations method for the WhatsApp Numbers resource.

Troubleshooting

  • Common issues:

    • Providing invalid or non-existent WhatsApp Number IDs may cause failures.
    • Incorrectly formatted phone numbers (missing country code or invalid characters) can lead to errors.
    • Exceeding the maximum allowed phone numbers (more than 10) will likely cause validation errors.
    • Network or authentication issues with the SparkBot API can prevent successful execution.
  • Error messages:

    • Errors related to missing required parameters indicate that either the WhatsApp Number ID or phone numbers were not provided.
    • Authentication errors suggest problems with the API key credential setup.
    • API response errors might include rate limits or permission denials; resolving these requires checking API usage policies and credentials.

Links and References


Note: This summary is based solely on static analysis of the provided source code and property definitions without runtime execution or access to external documentation.

Discussion