Evolution API

Interagir com a Evolution API v2

Overview

This node integrates 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 with the Criar Grupo (Create Group) operation, it allows users to create a new WhatsApp group by specifying the group subject and participants.

Typical use cases include automating group creation workflows in WhatsApp environments, such as setting up customer support groups, team collaboration groups, or event-specific chat groups dynamically based on external triggers or data.

Example: Automatically creating a WhatsApp group named "Project Team" with selected contacts when a new project is initiated.

Properties

Name Meaning
Instance Name The name of the WhatsApp instance where the group will be created.
Group ID The identifier of the group (used in other operations but not required for creation).
Subject The name/title of the group to be created.
Participants List of participants (contacts) to be added to the group upon creation.

Note: The last two properties (subject and participants) are used internally in the code for the "createGroup" operation but were not included in the provided JSON properties snippet. They are required parameters for creating a group.

Output

The node outputs a JSON object representing the response from the Evolution API after attempting to create the group. The output includes:

  • The API response fields (e.g., group details, status).
  • A success boolean indicating if the operation was successful.
  • A timestamp field with the time of execution.

If the API returns an array or string, the node attempts to parse it into JSON. In case of failure, it wraps the raw value in a JSON object.

No binary data output is involved in this operation.

Dependencies

  • Requires an authenticated connection to the Evolution API v2 via an API key credential configured in n8n.
  • The node uses the helper method requestWithAuthentication to make HTTP requests to the API endpoints.
  • Proper configuration of the Evolution API credentials in n8n is necessary.

Troubleshooting

  • Common issues:

    • Missing or incorrect instance name can cause the API call to fail.
    • Invalid or empty group subject or participants list may result in API errors.
    • Network or authentication failures with the Evolution API.
  • Error messages:

    • Errors thrown by the API are caught and returned as error messages in the output if "Continue On Fail" is enabled.
    • Typical errors might include authorization failures, invalid parameters, or server errors.
  • Resolution tips:

    • Verify that the instance name exists and is connected.
    • Ensure the group subject is a non-empty string.
    • Provide a valid list of participant identifiers.
    • Check API credentials and network connectivity.

Links and References


If you want me to extract details about other operations or resources, please let me know!

Discussion