Evolution API

Interagir com a Evolution API v2

Overview

This node interacts with the Evolution API v2 to manage and operate on various resources such as instances, messages, groups, chats, events, and integrations. Specifically, for the "Deletar Instância" (Delete Instance) operation under the Instância (Instance) resource, it deletes an existing instance identified by its name.

Use cases include automating the lifecycle management of instances in your Evolution API environment, such as cleaning up unused or obsolete instances programmatically. For example, you might delete an instance after a project ends or when an instance is no longer needed to free up resources.

Properties

Name Meaning
Instance Name The name of the instance to delete. This is a required string input identifying which instance will be deleted.

Output

The output JSON contains the response from the Evolution API after attempting to delete the specified instance. It typically includes:

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

If the API returns additional data, it will be included in the output. In case of errors, an error message will be provided instead.

No binary data output is involved in this operation.

Example output JSON:

{
  "success": true,
  "message": "Operation completed successfully",
  "timestamp": "2024-06-01T12:00:00.000Z"
}

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.
  • No other external dependencies are required.

Troubleshooting

  • Common issues:

    • Providing an incorrect or non-existent instance name will likely cause the API to return an error.
    • Network connectivity problems or invalid API credentials can cause authentication failures.
  • Error messages:

    • If the instance does not exist, the API may return a 404 or a descriptive error message indicating the instance was not found.
    • Authentication errors will indicate invalid or missing credentials.
  • Resolution tips:

    • Verify the instance name is correct and exists in your Evolution API environment.
    • Ensure your API key credential is valid and has sufficient permissions.
    • Check network connectivity and endpoint accessibility.

Links and References

Discussion