WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to manage WhatsApp contacts programmatically. Specifically, the "Create Contact" operation allows users to add a new contact to their WhatsApp account by specifying the contact's WhatsApp ID and name details.

Common scenarios where this node is beneficial include:

  • Automating the addition of new customer contacts from external systems into WhatsApp for business communication.
  • Synchronizing CRM or database contacts with WhatsApp contacts.
  • Bulk importing contacts into WhatsApp as part of onboarding or marketing workflows.

For example, a user can create a new contact by providing the WhatsApp ID in the format 1234567890@s.whatsapp.net along with the full name "John Smith". This enables sending messages or managing chats with that contact later.

Properties

Name Meaning
Contact ID The WhatsApp ID for the new contact being created. Must be a phone number with country code followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net). This uniquely identifies the contact in WhatsApp.
Full Name The complete display name for the contact as it should appear in your WhatsApp contacts (e.g., "John Smith" or "ABC Company").
First Name The given or first name of the contact (e.g., "John").

Output

The node outputs JSON data representing the result of the contact creation operation. This typically includes confirmation details such as the newly created contact's information or status messages returned by the WSAPI WhatsApp API.

If the operation returns binary data (not typical for contact creation), it would represent associated media or files related to the contact, but this operation primarily deals with JSON data.

Dependencies

  • Requires an API key credential for authenticating with the WSAPI WhatsApp API.
  • The node expects the base URL of the WSAPI service to be configured in the credentials.
  • No additional external dependencies are required beyond the WSAPI WhatsApp API access.

Troubleshooting

  • Invalid Contact ID Format: If the Contact ID does not follow the required format (phone_number@s.whatsapp.net), the API may reject the request. Ensure the phone number includes the country code and the suffix @s.whatsapp.net.
  • Missing Required Fields: Both Contact ID and Full Name are required. Omitting these will cause errors.
  • Authentication Errors: Verify that the API key credential is correctly set up and has permissions to create contacts.
  • API Endpoint Issues: Ensure the base URL in the credentials points to a valid WSAPI WhatsApp API endpoint.
  • Operation Not Implemented: If the node throws an error about the operation not implemented, verify you selected the correct Resource ("Contact") and Operation ("Create Contact").

Links and References

Discussion