Evolution API icon

Evolution API

Interact with Evolution API

Overview

This node, named "Evolution API," allows users to interact with the Evolution API service. Specifically, for the Chat resource and the Bloquear Contato (Block Contact) operation, it enables blocking or unblocking a contact by specifying the contact's number and the desired action. This is useful in scenarios where you want to programmatically manage your chat contacts' communication permissions, such as automatically blocking spam numbers or unblocking previously blocked contacts.

Practical examples:

  • Automatically block a phone number that sends unwanted messages.
  • Unblock a contact after verifying their identity or resolving an issue.

Properties

Name Meaning
Nome Da Instância The name of the instance to connect to within the Evolution API environment.
Contato The phone number of the contact to be blocked or unblocked.
Ação The action to perform on the contact: either "Bloquear" (block) or "Desbloquear" (unblock).

Output

The node outputs a JSON array containing the result of the block/unblock operation. Each item in the output array corresponds to the response from the Evolution API for the requested action on the specified contact. The exact structure depends on the API response but generally confirms success or failure of the operation.

No binary data output is indicated.

Dependencies

  • Requires an API key credential for authenticating with the Evolution API.
  • The node expects the user to configure this credential in n8n before use.
  • No other external dependencies are indicated.

Troubleshooting

  • Operation not supported error: If the node throws an error stating the operation is not supported, verify that the Resource is set to "Chat" and Operation to "Bloquear Contato" exactly as expected.
  • Missing required parameters: Ensure that "Nome Da Instância," "Contato," and "Ação" are all provided; missing any will likely cause errors.
  • API authentication issues: Confirm that the API key credential is correctly configured and has the necessary permissions.
  • Invalid contact number format: The contact number should be in the format expected by the Evolution API; otherwise, the API may reject the request.

Links and References

  • Evolution API official documentation (not provided here; consult your API provider)
  • n8n documentation on creating and using API credentials
  • General best practices for managing contact blocking in chat applications

Discussion