Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Overview
This node integrates with the Green API service to interact with WhatsApp messaging features. Specifically, for the Contact resource and Get Contacts operation, it retrieves a list of contacts or groups from the connected WhatsApp account.
This operation is useful when you want to programmatically access your WhatsApp contacts or groups for further processing, such as filtering, messaging, or analytics. For example, you might use this node to fetch all contacts to send broadcast messages or to synchronize contact lists with another system.
Properties
| Name | Meaning |
|---|---|
| Group Only | Boolean flag indicating whether to return only groups instead of individual contacts. |
| Count | Number specifying how many contacts to return. Use 0 to return all available contacts. |
Output
The node outputs a JSON array containing the retrieved contacts or groups. The exact structure depends on the Green API response but generally includes details about each contact or group such as identifiers, names, and possibly other metadata.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Green API service via an API authentication token and instance ID.
- The node expects these credentials to be configured in n8n prior to execution.
- Network access to
https://api.green-api.comis required to perform API requests.
Troubleshooting
- Failed to get contacts: This error may occur if the API credentials are invalid, expired, or lack necessary permissions. Verify that the API key and instance ID are correctly set up.
- Network errors: Ensure that the n8n server has internet access and can reach the Green API endpoint.
- Invalid parameter values: Passing incorrect types (e.g., non-boolean for "Group Only" or negative numbers for "Count") may cause unexpected behavior or errors.
- If the returned contact list is empty, check if the WhatsApp account actually has contacts or groups matching the filter criteria.
Links and References
- Green API Documentation — Official API docs for detailed information on endpoints and parameters.
- WhatsApp Business API — Background on WhatsApp messaging APIs which Green API wraps around.