WaAPI icon

WaAPI

Interact with WaAPI API

Actions85

Overview

The "Update Instance" operation in the Instances resource allows users to modify an existing instance's details by specifying its unique identifier. This node is useful when you need to update properties such as the instance's name or webhook configuration dynamically within an automation workflow. For example, you might want to change the webhook URL or subscribed events for a messaging instance without manually updating it outside of n8n.

Properties

Name Meaning
Id The unique numeric identifier of the instance to update.
Name The new name to assign to the instance.
Webhook JSON object defining the webhook configuration, including the URL and subscribed events.
  • The Webhook property expects a JSON structure with at least:
    • url: The webhook endpoint URL.
    • events: An array of event names (e.g., "message", "qr") that the webhook should listen to.

Output

The node outputs JSON data representing the updated instance details after the operation completes. This typically includes the instance's current state reflecting the changes made, such as the updated name and webhook settings.

If the API supports binary data output, it would be related to instance-specific files or media, but based on the provided code and properties, this node primarily deals with JSON data.

Dependencies

  • Requires an API key credential for authenticating requests to the WaAPI service.
  • The base URL for API requests is https://waapi.app/api/v1.
  • The node depends on the external WaAPI service to perform instance updates.
  • Proper network connectivity and valid credentials are necessary for successful execution.

Troubleshooting

  • Invalid Instance ID: If the provided instance ID does not exist or is incorrect, the API will likely return an error indicating the instance was not found. Verify the ID before running the node.
  • Malformed Webhook JSON: Ensure the webhook JSON is correctly formatted. Invalid JSON or missing required fields (url or events) can cause request failures.
  • Authentication Errors: Missing or invalid API credentials will result in authorization errors. Confirm that the API key is set up correctly in n8n credentials.
  • Network Issues: Connectivity problems to the WaAPI endpoint will cause timeouts or connection errors. Check your network and proxy settings if applicable.

Links and References

Discussion