Green API icon

Green API

Send WhatsApp messages via Green API or trigger workflows on webhooks

Overview

This node enables sending WhatsApp contact messages via the Green API service. It is part of a broader integration that allows executing various WhatsApp messaging actions or listening for incoming webhooks from Green API.

The Send Contact operation specifically sends a contact card to a specified WhatsApp chat. This is useful in scenarios where you want to share contact information directly within a chat, such as sharing a colleague's phone number, business contacts, or customer support details.

Practical examples:

  • Automatically sending a new customer's contact info to a sales team group.
  • Sharing emergency contact details in a private chat.
  • Distributing company directory contacts through WhatsApp broadcasts.

Properties

Name Meaning
Mode Select between "Action" (execute WhatsApp actions) or "Listen for Incoming Webhook" (trigger workflows on incoming webhooks). For sending contacts, use "Action".
Chat ID The target chat identifier. Use phone@c.us format for private chats or chatId@g.us for groups.
Phone Contact Phone number of the contact to send, in international format without the plus sign (+).
First Name First name of the contact (optional).
Middle Name Middle name of the contact (optional).
Last Name Last name of the contact (optional).
Company Company name associated with the contact (optional).
Quoted Message ID ID of a message to quote when sending this contact (optional).

Output

The node outputs an array of JSON objects representing the response from the Green API after attempting to send the contact message. Each output item corresponds to one input item processed.

The JSON typically contains confirmation details about the sent message, such as message IDs or status indicators returned by the Green API.

No binary data output is produced by this operation.

Dependencies

  • Requires valid credentials for the Green API service, including an instance ID and an API token.
  • The node makes HTTP POST requests to Green API endpoints to perform actions.
  • No additional external dependencies are required beyond standard n8n credential configuration for API authentication.

Troubleshooting

  • Error: "This node is configured as a trigger. Please use it as a trigger node, not an action node."
    Occurs if the node is set to "Listen for Incoming Webhook" mode but used as an action. To fix, switch the mode to "Action" when sending contacts.

  • Failed to send contact: [error message]
    Indicates an issue communicating with the Green API or invalid parameters. Check that the API credentials are correct, the chat ID is valid, and the phone contact number is properly formatted.

  • Data sent: ...
    Error messages include the data payload sent to the API for easier debugging. Verify that all required fields are correctly populated.

  • File reading errors (not applicable here but seen in other operations)
    Ensure file paths are correct and accessible if using file upload operations.

Links and References


This summary focuses exclusively on the Send Contact operation under the Message resource as requested.

Discussion