SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node interacts with the SparkBot WhatsApp API to retrieve user status information for a specified WhatsApp number. It is particularly useful for monitoring and managing WhatsApp statuses, such as checking which statuses are published, filtering by delivery status, or searching statuses by content or sender.

Common scenarios include:

  • Fetching all statuses posted by a specific WhatsApp number.
  • Filtering statuses by type (text, image, video) or delivery acknowledgment (pending, sent, delivered, read, failed).
  • Searching statuses by partial text, contact name, or media filename.
  • Paginating through large sets of statuses with sorting options.

Practical example: A marketing team could use this node to track the statuses they have scheduled or published on their official WhatsApp business number, filtering only those that have been successfully delivered or read by recipients.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number from which to retrieve user statuses. This is selected from available devices.
Filters A collection of optional filters to narrow down the retrieved statuses:
  Flow Filter statuses by message flow direction: "Inbound" or "Outbound".
  My Status Only Return only statuses published by your own WhatsApp number (boolean).
  Scheduled Only Return only statuses that are scheduled to be published in the future (boolean).
  Delivery Status Filter statuses by delivery acknowledgment status. Options include: "Pending", "Sent", "Delivered", "Read", "Failed". Multiple selections allowed.
  WhatsApp IDs Filter statuses by one or more WhatsApp IDs (WID).
  Search Search statuses by partial text content, contact name, or media filename (string).
  Chat ID Filter statuses by chat WhatsApp ID (string).
  Phone Number Return statuses sent from a given phone number or WhatsApp WID (string).
  Reference Filter statuses by exact match of the reference field (string).
  Type Filter statuses by entry kind. Options include: "Text", "Image", "Video". Multiple selections allowed.
  Begin From Message ID Return newest messages starting from the given message ID (string).
  End At Message ID Return oldest messages starting from the given message ID (string).
  Created After Return messages created after the given date/time.
  Created Before Return messages created before the given date/time.
  Sort Sort messages by date. Options: "Recent First" (date descending), "Oldest First" (date ascending).
  Results Page Size Number of results per page (number). Default is 20.
  Page Number Page number to return, starting from 0 (number).

Output

The node outputs an array of JSON objects representing user statuses matching the specified filters. Each object typically contains details about a single status entry, such as its content, type (text, image, video), creation date, delivery status, sender information, and any associated metadata like references or chat IDs.

If binary data is included (e.g., images or videos attached to statuses), it would be represented in the binary output fields, allowing further processing or downloading within n8n workflows.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on the SparkBot service being accessible and properly configured.
  • The "WhatsApp Number" property relies on dynamically loaded device options, which requires connectivity to the API to fetch available WhatsApp numbers.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Selecting a WhatsApp number that does not exist or is inactive may result in empty or error responses.
    • Using incompatible filter combinations might yield no results.
    • Pagination parameters out of range can lead to empty pages.
  • Error messages:

    • Authentication errors: Verify that the API key credential is correctly set up and has necessary permissions.
    • "No devices found": Ensure that the WhatsApp number/device exists and is linked to the account.
    • "Invalid filter parameter": Check that filter values conform to expected types and options.
    • Network or timeout errors: Confirm network connectivity and API availability.

Links and References

Discussion