SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node interacts with the SparkBot WhatsApp API to retrieve detailed information about a specific chat contact associated with a given WhatsApp number. The "Get Contact Details" operation under the "Chat Contacts" resource fetches comprehensive data about a contact, optionally including related entities such as chat history.

Common scenarios where this node is beneficial include:

  • Fetching up-to-date contact details for customer support or CRM integration.
  • Retrieving contact metadata before sending personalized messages.
  • Auditing or analyzing communication history with a particular contact.

For example, a user might input a WhatsApp number and a contact ID to get the contact's profile information and optionally include recent chat data to understand the context of previous interactions.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which to retrieve the contact details.
Contact ID The unique identifier of the contact (e.g., 447362053576@c.us) whose details are fetched.
Include Items Optional related entities to include in the response. Currently supports: Chat (includes chat history related to the contact).

Output

The output is a JSON object containing the detailed information of the specified contact. This includes standard contact fields such as name, phone number, status, and possibly other metadata depending on the API response.

If the "Include Items" property includes "Chat," the output will also contain related chat data associated with the contact, providing conversation history or message summaries.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the SparkBot WhatsApp API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The node depends on the internal method executeChatContactOperations to perform the actual API call for this resource and operation.

Troubleshooting

  • Missing or invalid WhatsApp Number: Ensure that the WhatsApp number (device) provided is valid and correctly loaded via the node’s device loading method.
  • Invalid Contact ID: The contact ID must be in the correct format (e.g., 447362053576@c.us). Incorrect IDs will result in errors or empty responses.
  • API Authentication Errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Network or API Downtime: Temporary connectivity issues or API service interruptions can cause failures; retry after some time.
  • Empty or incomplete response: If "Include Items" is used, ensure the requested related entities exist for the contact.

Error messages typically reflect these issues and should guide users to check their inputs 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.

Discussion