Evolution API icon

Evolution API

Interact with Evolution API

Overview

The "Update Members" operation of the Group resource in this node allows users to manage group membership dynamically by adding or removing members, as well as changing their roles within the group. This is particularly useful for automating group management tasks such as onboarding new participants, moderating group access, or adjusting administrative privileges without manual intervention.

Practical examples include:

  • Adding multiple phone numbers to a group chat automatically when new users join an organization.
  • Removing inactive or unauthorized members from a group.
  • Promoting trusted members to admin status to delegate moderation responsibilities.
  • Demoting admins back to regular members if needed.

Properties

Name Meaning
Instance Name The name of the instance where the group exists; identifies the specific environment or setup.
Group ID The unique identifier of the group whose members are to be updated.
Action The type of update to perform on the members. Options: Add Member, Remove Member, Promote to Admin, Demote to Member.
Members A comma-separated list of member phone numbers to apply the action to (e.g., 5511999999999,5511888888888).

Output

The node outputs a JSON array containing the result of the update operation. Each element corresponds to the response from the API after attempting to update the group's members according to the specified action. The exact structure depends on the Evolution API's response but typically includes success status and any relevant messages or data about the updated members.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the Evolution API service.
  • An API authentication token or key credential must be configured in n8n to authorize requests.
  • Network access to https://doc.evolution-api.com/api-reference or the actual Evolution API endpoint is necessary.

Troubleshooting

  • Common Issues:

    • Invalid or missing group ID can cause failures in locating the target group.
    • Incorrectly formatted member numbers (not comma-separated or invalid phone number format) may lead to errors.
    • Insufficient permissions or invalid API credentials will prevent successful updates.
    • Attempting unsupported actions or using the wrong resource-operation combination triggers an error.
  • Error Messages:

    • "Operation not supported." indicates that the selected operation does not exist for the chosen resource. Verify the resource and operation names.
    • API errors related to authorization usually mean the API key or token is missing, expired, or incorrect.
    • Validation errors from the API often point to malformed input data like group IDs or member lists.

To resolve these issues:

  • Double-check all input parameters for correctness.
  • Ensure the API credentials are valid and have appropriate permissions.
  • Confirm the group exists and the user has rights to modify it.
  • Follow the API documentation for correct formatting of member identifiers.

Links and References

Discussion