SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node allows sending a typing status indicator in WhatsApp chats via the SparkBot WhatsApp API. It is useful for signaling to recipients that the sender is currently typing, recording a voice message, or has stopped these actions. This enhances user experience by providing real-time feedback during conversations.

Practical examples include:

  • Indicating to a user that a customer support agent is typing a reply.
  • Showing that a voice message is being recorded before sending.
  • Stopping the typing or recording indicator after a pause or message send.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which the typing status will be sent.
Action The type of typing status to send: "Typing", "Recording", or "Stop".
Duration (seconds) Optional duration (2-30 seconds) for how long the typing status should be shown.
Target Type The type of chat to send the typing status to: either a "User Chat" or a "Group Chat".
User Phone Number The phone number in E.164 format of the individual user chat recipient (required if target is User Chat).
Group ID The group chat ID (e.g., ending with @g.us) to send the typing status to (required if target is Group Chat).

Output

The node outputs JSON data representing the result of the typing status operation. This typically includes confirmation details from the API about the typing status sent. There is no binary output.

Example output structure (conceptual):

{
  "status": "success",
  "action": "typing",
  "target": "+447362053576",
  "duration": 5
}

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on the SparkBot WhatsApp API service being accessible and properly configured.
  • The WhatsApp number (device) must be registered and available in the system.
  • For group typing status, valid group IDs must be retrievable via the node's options.

Troubleshooting

  • Invalid phone number format: Ensure the user phone number is in correct E.164 format (e.g., +1234567890).
  • Missing or invalid device ID: Verify that the WhatsApp number (device) is correctly selected and authorized.
  • Duration out of range: Duration must be between 2 and 30 seconds; values outside this range may cause errors.
  • API authentication errors: Check that the API key credential is valid and has necessary permissions.
  • Group ID not found: When sending to a group, ensure the group ID exists and is associated with the selected device.
  • Network or API downtime: Temporary connectivity issues can cause failures; retry or check API status.

Common error messages usually relate to invalid parameters or authentication failures and can be resolved by verifying input properties and credentials.

Links and References

Discussion