Actions83
- Instances Actions
- Client Actions
- Message Actions
- Chat Actions
- Contact Actions
- Number Actions
- Group Actions
- Channel Actions
- Label Actions
- Story Actions
Overview
This node allows updating an existing "Instance" in the WaAPI system via its API. It is useful when you need to modify details of a specific instance, such as changing its name or updating webhook configurations that listen for events like messages or QR code scans. For example, you might use this node to rename an instance from "My first instance" to something more descriptive or to update the webhook URL and event subscriptions to integrate with your own backend services.
Properties
| Name | Meaning |
|---|---|
| Id | The unique identifier of the instance to update (required). |
| 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 similar to:
{
"url": "https://my.url.com/webhook/handler",
"events": [
"message",
"qr"
]
}
This configures where and for which events the instance should send webhook callbacks.
Output
The node outputs JSON data representing the updated instance information returned by the WaAPI service. This typically includes the instance's current state after the update operation. If the API supports binary data, it would be handled accordingly, but based on the provided code and properties, the output is JSON only.
Dependencies
- Requires an API key credential for authenticating with the WaAPI service.
- The node uses the base URL
https://waapi.app/api/v1to send requests. - Proper network access to the WaAPI endpoint is necessary.
- The webhook URL must be accessible and able to receive POST requests if webhooks are configured.
Troubleshooting
- Invalid Instance ID: If the provided
Iddoes not correspond to an existing instance, the API will likely return an error. Verify the instance ID before running the node. - Malformed Webhook JSON: The
Webhookproperty must be valid JSON. Errors parsing this field will cause the request to fail. Use proper JSON formatting. - Authentication Errors: Ensure the API key credential is correctly set up and has sufficient permissions.
- Network Issues: Timeouts or connection errors may occur if the API endpoint is unreachable.
- Webhook Delivery Failures: If the webhook URL is incorrect or the server is down, webhook events will not be delivered.
Links and References
- WaAPI Official Documentation (for detailed API usage and webhook setup)
- n8n Documentation (for general guidance on using credentials and HTTP request nodes)