SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node enables sending WhatsApp contact cards through the SparkBot WhatsApp API. It is designed to send one or multiple contacts (up to 10) as vCard-like messages to a specified WhatsApp chat target, which can be an individual phone number, a group chat, or a channel.

Common scenarios where this node is beneficial include:

  • Sharing contact information with customers or team members directly via WhatsApp.
  • Automating distribution of business contacts or support agents' details in customer service workflows.
  • Broadcasting contact cards to groups or channels for marketing or informational purposes.

For example, a customer support automation could send a contact card of a support agent to a user requesting help, or a sales team could share product specialist contacts in a group chat.

Properties

Name Meaning
WhatsApp number The SparkBot WhatsApp number ID used to send the message. This identifies the sender device/account.
Target Type of target chat: Phone (individual), Group, or Channel. Determines how the message is routed.
Phone Number The recipient's 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.
Contacts A collection of contacts to send (minimum 1, maximum 10). Each contact requires a phone number (E.164 format) and a name.
Options Additional options for message delivery including:
- Priority (Normal, High, Low)
- Custom label to categorize the message
- Reference ID
- Team Agent to send on behalf of
- Real-time sending toggle
- Delivery queue mode
- Maximum retries
- Post-delivery chat actions (assign, resolve, label, metadata management, etc.)
Message Expiration Defines a time-to-live (TTL) for the message using seconds, duration string (e.g., "1h"), or specific date/time.
Mark Chat as Read Boolean to notify WhatsApp that previous unread messages will be marked as read after delivery (blue double-check). Requires WhatsApp read confirmation enabled.
Typing simulation Seconds to simulate typing or recording status before sending (0 disables). Range 2-30 seconds.
Quote Message Message ID to quote when sending this message (18-32 hex characters). Can only quote messages in the same conversation.
Strict Message Order Boolean to ensure messages are sent in strict order. Useful for chatbots or sequences. Not compatible with real-time or never-queue modes.

Output

The node outputs JSON data representing the result of the send contacts operation. This typically includes message IDs, status, and any metadata returned by the SparkBot API confirming successful delivery or errors.

No binary data output is involved since this node sends structured contact information as message content.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on SparkBot services for WhatsApp messaging.
  • Some properties load dynamic options from the API, such as available devices, groups, channels, labels, team agents, and departments.
  • Proper configuration of these resources in SparkBot is necessary for correct operation.

Troubleshooting

  • Invalid phone number format: The phone numbers must follow the E.164 format (e.g., +1234567890). Errors occur if the regex validation fails. Ensure numbers start with "+" followed by country code and subscriber number.
  • Missing required fields: Depending on the target type, either phone number, group ID, or channel ID must be provided. Omitting these causes errors.
  • Agent or department ID validation: When assigning chats post-delivery, agent and department IDs must be valid 24-character hexadecimal strings.
  • Message delivery failures: If messages fail to send, check API credentials, network connectivity, and whether the target WhatsApp number is valid and active.
  • Real-time sending risks: Using live mode or disabling queuing may increase risk of WhatsApp bans if sending high volumes rapidly. Use queue modes appropriately.
  • Quote message restrictions: Quoting messages requires the quoted message to be in the same conversation and have a valid message ID.

Links and References

Discussion