SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node allows you to create a new contact in the SparkBot WhatsApp API system under the "Chat Contacts" resource. It is useful for managing your WhatsApp contacts programmatically, enabling automation of contact creation with detailed information such as phone numbers, names, company details, and metadata.

Typical use cases include:

  • Automatically adding new customers or leads from other systems into your WhatsApp contact list.
  • Syncing contacts from CRM or other databases into WhatsApp for marketing or support purposes.
  • Enriching contacts with additional metadata and assigning them to specific users or groups within your WhatsApp environment.

For example, you could use this node to add a new business contact with their phone number, company info, and preferred languages, then assign that contact to a sales representative automatically.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) through which the contact will be created.
Phone Number The contact's phone number in E.164 format (e.g., +447362053576). This is required.
Contact Fields A collection of optional fields to describe the contact, including:
- Name (first name, max 30 chars)
- Surname (last name, max 50 chars)
- Title (max 15 chars)
- Contact Type (Personal or Business)
- Gender (Male, Female, Other)
- Alternative Phone (secondary phone in E.164)
- Email
- Description (max 100 chars)
- Languages (up to 3 language codes)
- Company Name, Code, Tax ID, Role, Website, Email, Phone, Country
- Currency code
- Address, City, Postal Code, Country
- Notes (internal, max 3000 chars)
- Birthday
- Notifications (On, Mute, Ignore)
- Timezone
- CRM source and reference
- Sync Across All Numbers (boolean)
- Assign to User (user ID)
- Upsert (boolean, update if exists instead of error)
Metadata Key-value pairs for additional metadata about the contact. Multiple entries allowed. Keys must be alphanumeric or underscores; values up to 300 characters.

Output

The node outputs JSON data representing the result of the contact creation operation. This typically includes the newly created contact's details as returned by the SparkBot API.

If an error occurs and "Upsert" is false, the node will throw an error unless "Continue On Fail" is enabled, in which case it outputs an error object with the message.

No binary data output is involved in this operation.

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 (device) must be valid and linked to your account.
  • Proper formatting of phone numbers (E.164) and adherence to field constraints (lengths, formats) is necessary.

Troubleshooting

  • Invalid phone number format: Ensure phone numbers are in E.164 format (e.g., +123456789).
  • Missing required fields: "WhatsApp Number" and "Phone Number" are mandatory.
  • API authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Contact already exists error: If "Upsert" is false and the contact exists, the node will error out. Enable "Upsert" to update existing contacts instead.
  • Field length exceeded: Some fields have maximum character limits; exceeding these may cause errors.
  • Assign to User invalid ID: The user ID must be a 24-character hexadecimal string if used.
  • Metadata key/value format: Keys must be alphanumeric or underscore only; values max 300 characters.

Links and References

  • E.164 Phone Number Formatting
  • SparkBot WhatsApp API documentation (refer to your API provider's official docs for detailed contact creation endpoints and field descriptions)

Discussion