Green API icon

Green API

Send WhatsApp messages via Green API or trigger workflows on webhooks

Overview

This node integrates with the Green API service to perform WhatsApp group management actions. Specifically, for the Group - Set Group Admin operation, it allows you to assign admin rights to a participant within a specified WhatsApp group.

Common scenarios where this node is beneficial include automating group administration tasks such as promoting trusted members to admins without manual intervention, managing large groups programmatically, or integrating group role changes into broader workflows (e.g., onboarding new team members).

Practical example: Automatically set a newly added participant as a group admin after they join, ensuring they have moderation privileges immediately.


Properties

Name Meaning
Mode Select between "Action" (execute WhatsApp actions) or "Listen for Incoming Webhook" (trigger workflows on webhooks). For this operation, use "Action".
Group ID The unique identifier of the WhatsApp group where the admin rights will be assigned. Format example: 972501234567-1587570015@g.us. This is required.
Participant Chat ID The chat ID of the participant to be promoted to group admin. Format example: 972501234567@c.us. This is required.

Output

The node outputs a JSON array containing the response from the Green API for the performed action. The structure typically includes confirmation details about the admin assignment operation, such as success status or error messages returned by the API.

No binary data output is involved in 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.com is necessary.
  • No additional environment variables are required beyond the configured API credentials.

Troubleshooting

  • Common Issues:

    • Invalid or missing Group ID or Participant Chat ID parameters will cause the request to fail.
    • Incorrect API credentials will result in authentication errors.
    • Network connectivity issues can prevent successful API calls.
  • Error Messages:

    • "Failed to set group admin: <error message>": Indicates the API call failed. Check the provided Group ID and Participant Chat ID for correctness.
    • "Error processing group operation setGroupAdmin: <error message>": General error during execution; verify all input parameters and credentials.
  • Resolution Tips:

    • Ensure Group ID and Participant Chat ID are correctly formatted and correspond to existing WhatsApp entities.
    • Verify that the API credentials are valid and have sufficient permissions.
    • Confirm network connectivity to the Green API endpoint.
    • Review the detailed error message included in the node's output for specific API response insights.

Links and References

Discussion