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 manage WhatsApp groups and perform various WhatsApp-related actions. Specifically, the "Create Group" operation under the "Group" resource allows users to create a new WhatsApp group by specifying a group name and participants.

Common scenarios where this node is beneficial include automating group creation for team communication, customer support groups, or event coordination via WhatsApp. For example, a business could automatically create a group for a new project and add relevant team members based on workflow triggers.

Properties

Name Meaning
Mode Select between "Action" (execute WhatsApp actions) or "Listen for Incoming Webhook" (trigger workflows on incoming webhooks). For creating groups, use "Action".
Group Name The name of the WhatsApp group to be created.
Group Participants Comma-separated list of chat IDs (phone numbers with WhatsApp suffixes) to add as group members. Example: 972501234567@c.us,972501234568@c.us

Output

The node outputs a JSON array containing the response from the Green API after attempting to create the group. This typically includes details about the newly created group such as its ID and status. The exact structure depends on the Green API's response but generally confirms success or failure of the group creation request.

No binary data output is involved in this operation.

Dependencies

  • Requires an active Green API account with valid credentials: an instance ID and an API token.
  • The node makes HTTP POST requests to the Green API endpoints.
  • n8n must be configured with these credentials securely stored.
  • No additional external dependencies are required.

Troubleshooting

  • Common Issues:

    • Invalid or missing group name or participant chat IDs will cause the operation to fail.
    • Incorrectly formatted chat IDs (not ending with @c.us for private chats or @g.us for groups) may result in errors.
    • Network issues or invalid API credentials will prevent successful API calls.
  • Error Messages:

    • "Failed to create group: <error message>" indicates the API call failed. Check the error message for details such as authentication failure or invalid parameters.
    • Errors related to JSON formatting or missing required fields suggest input property misconfiguration.
  • Resolution Tips:

    • Verify that the group name is provided and not empty.
    • Ensure participant chat IDs are correctly formatted and separated by commas.
    • Confirm that the API credentials are correct and have necessary permissions.
    • Check network connectivity to the Green API endpoint.

Links and References

Discussion