SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node enables creating WhatsApp groups via the SparkBot WhatsApp API. It is useful for automating group management tasks such as setting up new groups with specific participants, permissions, and message settings. Typical use cases include:

  • Automatically creating customer support or sales groups with predefined members.
  • Setting group permissions to control who can send messages or invite others.
  • Configuring ephemeral message durations for privacy-focused conversations.

For example, a business could create a group for a project team, add all relevant participants, assign admin roles, and set message expiration to 7 days automatically when triggered by an event.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which the group will be created.
Group Name The name of the group to be created.
Description Optional description of the group (up to 500 characters).
Group Permissions Settings controlling who can perform certain actions in the group:
- Edit Settings Permission: All Participants or Admins Only
- Send Messages Permission: All Participants or Admins Only
- Invite Permission: All Participants or Admins Only
- Require Approval: Boolean indicating if new participants require admin approval
Ephemeral Messages Duration after which messages are automatically deleted: Off, 24 Hours, 7 Days, or 90 Days
Participants List of participants to add to the group, each with:
- Phone Number (in international format, e.g., +1234567890)
- Make Admin: Boolean indicating if the participant should be an admin

Output

The node outputs JSON data representing the result of the group creation operation. This typically includes details about the newly created group such as its ID, name, participants, and configured permissions.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on the SparkBot API service being accessible and properly configured.
  • The "WhatsApp Number" property must correspond to a valid WhatsApp device registered with the API.

Troubleshooting

  • Common Issues:

    • Invalid or missing WhatsApp number/device ID may cause failures.
    • Providing phone numbers for participants in incorrect format (not international) can lead to errors.
    • Exceeding the maximum length for the description (over 500 characters) might cause rejection.
    • Insufficient permissions in the API key or account to create groups.
  • Error Messages:

    • Errors related to authentication usually indicate invalid or missing API credentials.
    • Validation errors on input properties (e.g., invalid phone number format) will be returned by the API.
    • Network or connectivity issues with the SparkBot API can cause timeouts or request failures.
  • Resolutions:

    • Verify that the API key credential is correctly set up in n8n.
    • Ensure phone numbers are formatted with the "+" and country code.
    • Keep descriptions within allowed length.
    • Check API service status and network connectivity.

Links and References

Discussion