SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node enables sending location messages via the SparkBot WhatsApp API. It supports specifying the target recipient as a phone number, group chat, or channel and allows sending a location either by address or geographic coordinates. This is useful for automating location sharing in customer support, delivery notifications, event invitations, or any scenario where you want to share a precise place with WhatsApp users programmatically.

Practical examples:

  • A delivery service automatically sends the current location of a driver to a customer.
  • An event organizer shares the venue location with attendees through a WhatsApp group.
  • A business sends its office address to customers who inquire about directions.

Properties

Name Meaning
WhatsApp number The SparkBot Number ID used to send the message (select from available devices).
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 ID of the target group chat (e.g., 12345678902401234@g.us). Required if Target is Group.
Channel ID ID of the target channel (e.g., 12345678902402200@newsletter). Required if Target is Channel.
Location Type How to specify the location: Address or Coordinates.
Address The physical address string (3-100 characters) to send as location. Required if Location Type is Address.
Latitude Latitude coordinate (-90 to 90) of the location. Required if Location Type is Coordinates.
Longitude Longitude coordinate (-180 to 180) of the location. Required if Location Type is Coordinates.
Location Name Optional name or description for the location (up to 100 characters).
Options Collection of optional settings including:
- Priority (Normal, High, Low)
- Label (custom categorization label)
- Reference ID (custom message ID)
- Team Agent (send on behalf of an agent)
- Live mode (real-time delivery without queue)
- Delivery Queue Mode (default, always queue, never queue, opportunistic)
- Maximum Retries (0-100)
- Chat Actions (assign, resolve, label, metadata operations after delivery)
Message Expiration Define message time-to-live (TTL) 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).
Typing simulation Seconds (0-30) to simulate typing or recording status before sending the message. 0 disables this feature.
Quote Message Message ID (18-32 hex characters) to quote when sending this message (must be in the same conversation).
Strict Message Order Boolean to ensure messages are sent in strict order to the target chat. Not compatible with live mode or never queue options. Useful for chatbots or message sequences.

Output

The node outputs JSON data representing the result of the send location operation. This typically includes confirmation details such as message IDs, status, timestamps, and any metadata related to the sent message.

If binary data were involved (not applicable here), it would represent media content; however, this operation only sends location data.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on the SparkBot backend services to send WhatsApp messages.
  • Some properties load dynamic options (e.g., devices, groups, channels, labels, team agents) which require proper API access and permissions.
  • Proper configuration of the SparkBot API credentials in n8n is necessary.

Troubleshooting

  • Invalid phone number format: Ensure the phone number is in E.164 format (e.g., +1234567890). The node validates this with a regex.
  • Missing required fields: Depending on the target type, the corresponding ID or phone number must be provided.
  • Delivery failures: Using real-time delivery mode ("live" or "never queue") at high message rates may increase the risk of WhatsApp bans. Use queue modes appropriately.
  • Invalid message quoting: Quoting requires the message ID to be in the same conversation and match length/format constraints.
  • Agent or department assignment errors: When performing chat actions like assigning, ensure valid agent or department IDs are provided.
  • Typing simulation issues: Values outside 0-30 seconds are invalid.
  • Expiration settings: TTL values must be within allowed ranges (e.g., seconds between 5 and 2592000).
  • API errors: Check API key validity and network connectivity if messages fail to send.

Links and References

Discussion