Actions48
- Instance Actions
- Message Actions
- Group Actions
- Contact Actions
- Media Actions
- Webhook Actions
- Profile Actions
Overview
This node integrates with the Evolution API to manage WhatsApp contacts and perform various contact-related operations. Specifically, the Block Contact operation allows users to block a specified phone number on WhatsApp via the API. This is useful in scenarios where you want to automate the management of unwanted or spam contacts by programmatically blocking them.
Practical examples include:
- Automatically blocking numbers that send spam messages.
- Managing contact lists by blocking certain users based on business rules.
- Integrating with customer support workflows to block abusive users.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number of the contact to block, including country code but without the "+" sign. |
| Additional Fields | Optional extra parameters: - Delay (milliseconds before sending) - Link Preview (enable/disable link preview) - Quoted Message ID (ID of message to quote/reply to) - Mentions (comma-separated list of numbers to mention) |
Output
The node outputs a JSON object containing the response from the Evolution API after attempting to block the contact. This typically includes confirmation of the block action or any error messages returned by the API.
Example output structure:
{
"json": {
"status": "success",
"message": "Contact blocked successfully"
}
}
If an error occurs and the node is set to continue on failure, the output will contain an error message instead.
Dependencies
- Requires an active connection to the Evolution API service.
- Needs valid credentials including an API key and instance name configured in n8n.
- Optionally uses another API ("N8N Tools API") for subscription validation before making requests.
- The node sends HTTP requests to the Evolution API endpoints.
Troubleshooting
- Invalid Credentials: If the API key or instance name is incorrect, the node will fail with authentication errors. Verify your API key and instance configuration.
- Subscription Validation Failed: The node validates subscription status via an external API. Errors like 401 or 403 indicate invalid subscription or API key.
- Unknown Operation or Resource: If the operation or resource is not recognized, the node throws an error. Ensure you select supported operations and resources.
- Network Issues: Connectivity problems to the Evolution API endpoint can cause request failures.
- Delay Parameter Misuse: Setting an excessively high delay may cause unexpected behavior or timeouts.
To resolve errors, check credentials, ensure correct property values, and verify network connectivity.
Links and References
- Evolution API Documentation (replace with actual URL)
- WhatsApp Business API Overview
- n8n Documentation on Creating Custom Nodes