Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Contact → Get Contacts
AI-generatedOverview
This node integrates with the Maytapi WhatsApp Unofficial API, enabling automation and interaction with WhatsApp through various resources such as messages, contacts, chats, groups, accounts, sessions, queues, calls, and session controls. Specifically, for the Contact resource with the Get Contacts operation, it retrieves all contacts associated with a specified WhatsApp instance.
Common scenarios where this node is beneficial include:
- Synchronizing WhatsApp contacts into CRM or marketing platforms.
- Automating contact management workflows.
- Fetching contact lists for analytics or reporting purposes.
Practical example:
- A user wants to pull all WhatsApp contacts from their business phone number to update their customer database automatically.
Properties
| Name | Meaning |
|---|---|
| Phone ID Source | Select how to provide the Phone ID: either "From Credentials" (uses stored credentials) or "Custom" (enter manually). |
| Phone ID | The WhatsApp instance Phone ID to use when "Custom" is selected as Phone ID Source. This identifies the specific WhatsApp phone instance. Required if using custom source. |
Output
The output of the Get Contacts operation is a JSON object containing the list of contacts retrieved from the WhatsApp instance. The exact structure depends on the Maytapi API response but typically includes details like contact IDs, names, and possibly profile information.
No binary data is output for this operation.
Example output snippet (conceptual):
{
"contacts": [
{
"id": "905301234567@c.us",
"name": "John Doe",
"profileImage": "https://..."
},
...
]
}
Dependencies
- Requires an API key credential for the Maytapi WhatsApp API.
- The Phone ID must be provided either via credentials or manually.
- The node makes HTTP requests to
https://api.maytapi.com/api. - Proper configuration of the Maytapi API credentials in n8n is necessary.
Troubleshooting
Error: "Phone ID is required."
Occurs if no Phone ID is provided either in credentials or as a custom input. Ensure you have set the Phone ID correctly.API request failures may happen due to invalid credentials, network issues, or incorrect Phone ID. Verify your API key and Phone ID.
If the returned contact list is empty, confirm that the WhatsApp instance has contacts and that the Phone ID corresponds to the correct WhatsApp instance.
Rate limits or API restrictions from Maytapi could cause errors; check your Maytapi account status.
Links and References
- Maytapi Official Website
- Maytapi WhatsApp API Documentation
- n8n documentation on Creating Custom Nodes