Wasapbot icon

Wasapbot

Custom operations

Overview

This node integrates with a WhatsApp-related API service to perform various messaging and contact management actions. Specifically, the Remove Contact operation under the Action resource allows users to remove a WhatsApp contact from a specified group.

Typical use cases include:

  • Automating group membership management by removing users who no longer should be part of a WhatsApp group.
  • Integrating WhatsApp group management into broader workflows, such as customer support or community moderation.
  • Maintaining up-to-date group membership lists without manual intervention.

For example, you could set up a workflow that removes a user’s WhatsApp number from a group when they unsubscribe from a service or violate group rules.

Properties

Name Meaning
API Key Your API key for authenticating requests to the WhatsApp API service.
Access Token An access token used for API authentication alongside the API key.
Number The WhatsApp phone number (including country code, but without the "+" sign) to remove.
Group ID The identifier of the WhatsApp group from which the contact will be removed.

Output

The node outputs a JSON object containing the response from the API after attempting to remove the contact. This typically includes status information about the removal request, such as success confirmation or error details.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "status": "success",
  "message": "Contact removed from group",
  "group_id": "123456",
  "number": "60123456789"
}

Actual fields depend on the external API's response.

Dependencies

  • Requires an active internet connection to communicate with the external WhatsApp API service at https://api.customje.com/wb-remove-contact.php.
  • Needs valid API credentials: an API key and an access token.
  • No additional n8n-specific credentials are required beyond these input properties.
  • The node uses a helper function (appCustomApiRequest) to make HTTP POST requests to the API endpoint.

Troubleshooting

  • Invalid Credentials: If the API key or access token is incorrect or expired, the API will reject the request. Verify your credentials and update them if necessary.
  • Incorrect Number Format: The phone number must include the country code but exclude the "+" sign. Using an incorrect format may cause the API to fail removing the contact.
  • Invalid Group ID: Providing a wrong or non-existent group ID will result in failure. Ensure the group ID corresponds to an existing WhatsApp group managed by the API.
  • Network Issues: Connectivity problems can cause timeouts or failed requests. Check your network connection.
  • API Errors: The API might return errors if the contact is not part of the group or if the group has restrictions. Review the API response message for details.
  • Unhandled Operation or Resource: The node throws errors if an unsupported operation or resource is selected. Make sure to select "Remove Contact" under the "Action" resource.

If the node is configured to continue on failure, errors will be returned in the output array instead of stopping execution.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion