Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Overview
This node enables sending WhatsApp contact messages via the Green API service. Specifically, the "Send Contact" operation allows users to send a contact card to a specified chat (either private or group) on WhatsApp. This is useful in scenarios where you want to share contact details programmatically within automated workflows, such as customer support bots sharing agent contacts, marketing campaigns distributing sales contacts, or internal tools sharing team member info.
For example, you can automate sending a contact card with phone number, name, and company information to a user or group after a certain trigger event occurs, like a form submission or CRM update.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The target chat identifier. For private chats use the format phone@c.us, for groups use chatId@g.us. Example: 972501234567@c.us or 972501234567-1581234048@g.us. |
| Phone Contact | The phone number of the contact being sent, in international format without the plus sign. Example: 79001234567. |
| First Name | (Optional) First name of the contact to send. Example: John. |
| Middle Name | (Optional) Middle name of the contact. Example: M. |
| Last Name | (Optional) Last name of the contact. Example: Doe. |
| Company | (Optional) Company name associated with the contact. Example: ABC Corp. |
| Quoted Message ID | (Optional) ID of an existing message to quote in the chat when sending this contact message. |
Output
The node outputs a JSON array containing the response from the Green API for each executed item. The response typically includes details about the sent contact message, such as message IDs or status confirmations returned by the API.
No binary data output is produced by this operation.
Dependencies
- Requires an active Green API account with valid credentials (instance ID and API token).
- The node uses these credentials to authenticate requests to the Green API endpoints.
- Network access to
https://api.green-api.comis required. - No additional environment variables are needed beyond the configured credentials.
Troubleshooting
Common issues:
- Invalid or missing chat ID format may cause message sending failures.
- Incorrect phone number format for the contact (must be international format without '+').
- Missing required parameters like
chatIdorphoneContact. - Network connectivity issues or invalid API credentials will result in authentication errors.
Error messages:
"Failed to send contact: <error message>"indicates an issue during the API request. Check the error message for details.- Errors include the data sent to the API for easier debugging.
- File reading errors do not apply here since no file upload is involved in sending contacts.
Resolution tips:
- Verify all required fields are correctly filled.
- Ensure the chat ID corresponds to an existing WhatsApp chat.
- Confirm that the API credentials are valid and have necessary permissions.
- Review the quoted message ID if used; it must reference a valid message in the chat.
Links and References
- Green API Documentation – Official API docs for message sending and contact operations.
- WhatsApp Contact Message Format – General WhatsApp contact message structure reference.