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 "Atualizar Imagem do Grupo" (Update Group Picture) operation, it allows users to update the profile picture of a WhatsApp group.

Use cases include automating group management tasks in WhatsApp environments, such as updating group images programmatically when branding or event themes change. For example, a marketing team could automatically update the group image for a campaign group based on new promotional materials.

Properties

Name Meaning
Instance Name The name of the WhatsApp instance where the group exists. This identifies which WhatsApp session to use.
Group ID The unique identifier of the WhatsApp group whose image you want to update.

Note: Although the bundled code does not explicitly show parameters for the new image data in this operation, typically an image URL or binary data would be required to update the group picture. This might be handled implicitly or via additional parameters not included in the provided snippet.

Output

The node outputs a JSON object containing the result of the API call. The output includes:

  • success: A boolean indicating if the operation was successful.
  • timestamp: The ISO string timestamp when the operation was completed.
  • Additional fields depend on the API response but generally reflect the updated group information or confirmation message.

If the API returns multiple items, they are parsed into an array under the items field with a count of items returned.

No binary data output is indicated for this operation.

Dependencies

  • Requires an authenticated connection to the Evolution API v2 using an API key credential configured in n8n.
  • The node uses HTTP requests to the Evolution API endpoints.
  • Proper configuration of the "Instance Name" is necessary to target the correct WhatsApp session.

Troubleshooting

  • Missing or incorrect Instance Name: The operation will fail if the specified instance does not exist or is not connected. Verify the instance name is correct and active.
  • Invalid Group ID: If the group ID is wrong or the bot/user does not have permission to modify the group, the API will return an error.
  • Authentication errors: Ensure the API key credential is valid and has sufficient permissions.
  • Network issues: Connectivity problems between n8n and the Evolution API endpoint can cause timeouts or failures.
  • Unexpected API responses: If the API returns a string instead of JSON, the node attempts to parse it; failure to parse may require checking the API status or logs.

To resolve errors, verify all input parameters, check API credentials, and consult the Evolution API documentation or support.

Links and References


Note: The provided bundled source code does not explicitly show the detailed implementation of the "Atualizar Imagem do Grupo" operation beyond parameter retrieval. It is assumed that the operation follows the pattern of other group operations by making an authenticated HTTP request to the appropriate Evolution API endpoint with the instance name and group ID.

Discussion