Actions37
- Message Actions
- Media Actions
- Contact Actions
- Group Actions
- Instance Actions
- Webhook Actions
Overview
The node integrates with the Uazapi WhatsApp API to manage WhatsApp contacts and perform various messaging operations. Specifically, for the Contact resource and Block Contact operation, it allows users to block a WhatsApp contact by specifying their phone number. This is useful in scenarios where you want to prevent receiving messages or interactions from certain contacts automatically within your workflows.
Practical examples include:
- Automatically blocking spam or unwanted contacts detected through other automation steps.
- Managing contact permissions dynamically based on user behavior or external triggers.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The WhatsApp phone number of the contact to block, including country code (e.g., 5511999999999). |
| Additional Fields | Optional extra parameters that can be set when blocking the contact. Includes: • Reply to Message ID (string) - ID of message to reply to • Delay (seconds) (number) - Delay before sending the block request • Disable Link Preview (boolean) - Whether to disable link previews • Mention Users (string) - Comma-separated phone numbers to mention |
Output
The node outputs a JSON object containing the response from the Uazapi service after attempting to block the contact. This typically includes status information about the block action.
Example output structure (simplified):
{
"status": "success",
"message": "Contact blocked successfully",
"data": {
"number": "5511999999999"
}
}
No binary data is produced by this operation.
Dependencies
- Requires an active Uazapi WhatsApp API account.
- Needs configuration of credentials including:
- An API key credential for authenticating requests.
- API URL endpoint.
- API token for authorization.
- Instance ID representing the WhatsApp instance.
- The node sends HTTP requests to the Uazapi API proxy endpoint with appropriate headers and body.
Troubleshooting
Common issues:
- Invalid or missing phone number format: Ensure the phone number includes the country code without spaces or special characters.
- Authentication errors: Verify that the API key, token, and instance ID are correctly configured and valid.
- Network or connectivity problems: Check internet access and Uazapi service availability.
Error messages:
"Unknown resource": Occurs if the resource parameter is incorrect; ensure "contact" is selected."Unauthorized"or"Invalid API key": Indicates credential issues; recheck API keys and tokens."Contact not found": The specified phone number may not exist on WhatsApp or is invalid.
Resolution tips:
- Double-check all input parameters for correctness.
- Confirm credentials and API access rights.
- Use the node's "Continue On Fail" option to handle errors gracefully in workflows.
Links and References
- Uazapi Official Documentation (for detailed API usage)
- WhatsApp Business API Guidelines
- n8n Community Forum and Documentation for custom node usage and troubleshooting