SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node enables sending WhatsApp messages through the SparkBot WhatsApp API, specifically supporting the operation to send a catalog product message. It is designed for scenarios where businesses want to share product information directly from their WhatsApp Business catalog with customers or groups via WhatsApp.

Typical use cases include:

  • Sending product details to individual customers by phone number.
  • Sharing product info in group chats or channels.
  • Automating product promotions or customer support interactions that involve product references.

For example, a retail business can automatically send a product card from their catalog to a customer who requests product information via WhatsApp.

Properties

Name Meaning
WhatsApp number The SparkBot Number ID used to send the message. This identifies the WhatsApp number/account from which the message will be sent.
Target Type of target chat: Phone (individual), Group, or Channel.
Phone Number Target phone number in international E.164 format (e.g., +1234567890). Required if Target is "Phone".
Group ID The ID of the target group chat (e.g., 12345678902401234@g.us). Required if Target is "Group".
Channel ID The ID of the target channel (e.g., 12345678902402200@newsletter). Required if Target is "Channel".
Product ID The ID of the product from the WhatsApp Business catalog to send. Must be 16-18 numeric characters.
Options Collection of optional settings including:
- Priority: Normal, High, Low
- Label: Custom label to categorize the message
- Reference ID: Custom reference for tracking
- Team Agent: Send on behalf of an agent
- Live mode: Real-time sending without queue
- Delivery Queue Mode: Controls queuing behavior (Default, Always Queue, Never Queue, Opportunistic)
- Maximum Retries: Number of delivery retries
- Chat Actions: Post-delivery actions like assigning chat, resolving, labeling, metadata management
Message Expiration Defines time-to-live (TTL) for the message with options:
- Seconds (expire after N seconds)
- Duration (e.g., 1h, 30m)
- Specific Date/time expiration
Mark Chat as Read Boolean to notify WhatsApp that previous unread messages are read after this message is delivered (blue double-check).
Typing simulation Number of seconds (0-30) to simulate typing or recording status before sending the message.
Quote Message Message ID to quote when sending this message (must be 18-32 hex characters and in the same conversation).
Strict Message Order Boolean to ensure messages are sent in strict order. Useful for chatbots or sequences. Not compatible with live mode or never queue delivery.

Output

The node outputs JSON data representing the result of the send operation. This typically includes confirmation details such as message IDs, status, timestamps, and any relevant metadata returned by the SparkBot API.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on SparkBot's backend services for WhatsApp messaging.
  • Some properties load dynamic options (e.g., devices, groups, channels, labels, team agents) via internal methods, implying network calls to fetch these lists.
  • Proper configuration of the SparkBot API key in n8n credentials is necessary.

Troubleshooting

  • Invalid phone number format: The phone number must be in E.164 format (e.g., +1234567890). Errors occur if the regex validation fails.
  • Invalid product ID: Product ID must be numeric and between 16-18 characters. Incorrect IDs cause validation errors.
  • Missing required fields: Depending on the target type, either phone number, group ID, or channel ID must be provided.
  • Delivery failures due to rate limits: Using real-time delivery mode ("live" or "never queue") at high message volumes may increase the risk of WhatsApp bans. Use queue modes appropriately.
  • Agent or department IDs invalid: When assigning chats post-message, agent and department IDs must be valid 24-character hexadecimal strings.
  • Quote message ID invalid: Quoting requires a valid message ID within the same conversation.
  • Strict order conflicts: Enabling strict message order is incompatible with live mode or never queue options.
  • Read receipt not working: Marking chat as read depends on WhatsApp privacy settings allowing read confirmations.

To resolve errors, verify input formats, required fields, and adjust delivery options according to usage volume and API plan limitations.

Links and References

Discussion