Green API icon

Green API

Send WhatsApp messages via Green API or trigger workflows on webhooks

Overview

This node integrates with Green API to manage WhatsApp groups and perform various group-related actions. Specifically, the "Add Group Participant" operation allows you to add a new participant to an existing WhatsApp group by specifying the group ID and the participant's chat ID.

Common scenarios where this node is beneficial include automating group management tasks such as onboarding new members into WhatsApp groups for customer support, community engagement, or team collaboration. For example, when a new user signs up on your platform, you can automatically add them to a relevant WhatsApp group using this node.

Properties

Name Meaning
Mode Selects the node mode:
- Action: Execute WhatsApp actions via Green API
- Listen for Incoming Webhook: Trigger workflows on incoming webhooks from Green API (not applicable here)
Group ID The unique identifier of the WhatsApp group where the participant will be added. Format example: 972501234567-1587570015@g.us
Participant Chat ID The chat ID of the participant to add to the group. Format example: 972501234567@c.us (individual user)

Output

The node outputs a JSON array containing the response from the Green API after attempting to add the participant. The structure typically includes confirmation details or error messages returned by the API. The exact fields depend on the Green API response but generally confirm whether the participant was successfully added.

No binary data output is involved in this operation.

Example output snippet (conceptual):

[
  {
    "success": true,
    "message": "Participant added successfully",
    "groupId": "972501234567-1587570015@g.us",
    "participantChatId": "972501234567@c.us"
  }
]

Dependencies

  • Requires an active Green API account with valid credentials including:
    • An instance ID
    • An API token for authentication
  • The node uses HTTP POST requests to Green API endpoints.
  • Requires proper configuration of these credentials within n8n.
  • Node depends on network connectivity to Green API services.

Troubleshooting

  • Common Issues:

    • Invalid or missing Group ID or Participant Chat ID parameters.
    • Incorrectly formatted chat IDs (must follow WhatsApp format).
    • Network issues preventing connection to Green API.
    • Insufficient permissions or invalid API credentials.
  • Error Messages:

    • "Failed to add group participant: <error message>": Indicates the API call failed. Check the error message for details such as invalid IDs or permission issues.
    • "Error processing group operation addGroupParticipant: <error message>": General error during execution; verify input parameters and credentials.
  • Resolutions:

    • Ensure Group ID and Participant Chat ID are correctly formatted and correspond to existing WhatsApp entities.
    • Verify that the API credentials are correct and have necessary permissions.
    • Confirm network access to Green API endpoints.
    • Review Green API documentation for any rate limits or restrictions.

Links and References

Discussion