Evolution API

Interagir com a Evolution API v2

Overview

This node interacts with the Evolution API v2 to manage WhatsApp-related resources such as instances, messages, groups, chats, events, and integrations. Specifically, for the Grupo (Group) resource and the Sair do Grupo (Leave Group) operation, it allows a user to leave a specified WhatsApp group by providing the instance name and the group ID.

Common scenarios where this node is beneficial include automating group management tasks in WhatsApp workflows, such as programmatically leaving groups when certain conditions are met or cleaning up group memberships as part of larger automation processes.

Practical example:

  • Automatically remove a WhatsApp instance from a group after a campaign ends.
  • Leave groups that are no longer relevant based on external triggers or data changes.

Properties

Name Meaning
Instance Name The name of the WhatsApp instance to use for the operation. This identifies which connected WhatsApp session will perform the action.
Group ID The unique identifier of the WhatsApp group to leave.

Output

The output JSON contains the response from the Evolution API after attempting to leave the group. It typically includes:

  • success: A boolean indicating if the operation was successful (true).
  • message: A confirmation message like "Operation completed successfully".
  • timestamp: The ISO string timestamp when the operation was performed.

If the API returns additional data, it will be included in the output JSON. In case of errors, an error object with the error message will be returned if "Continue On Fail" is enabled.

No binary data output is expected for this operation.

Dependencies

  • Requires an authenticated connection to the Evolution API v2 via an API key credential configured in n8n.
  • The node uses HTTP requests to the Evolution API endpoints.
  • Proper configuration of the WhatsApp instance within the Evolution platform is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing Instance Name or Group ID parameters will cause the API call to fail.
    • Network connectivity problems or incorrect API credentials can lead to authentication errors.
    • Attempting to leave a group that the instance is not a member of may result in an error from the API.
  • Error messages and resolutions:

    • "Unauthorized" or similar authentication errors: Verify the API key credential and ensure it has proper permissions.
    • "Group not found" or "Not a member of the group": Confirm the Group ID is correct and that the instance is currently a member of the group.
    • Timeout or network errors: Check network connectivity and API endpoint availability.

Links and References

Discussion