Actions50
- Account Actions
- Call Actions
- Chat Actions
- Contact Actions
- Group Actions
- Instance Actions
- Media Actions
- Message Actions
- Session Actions
- User Actions
Overview
This node integrates with the WSAPI WhatsApp API, allowing users to manage various WhatsApp-related resources programmatically within n8n workflows. Specifically, the Instance - Update Settings operation enables updating configuration settings of a WhatsApp instance. This is useful for customizing how the WhatsApp instance behaves, such as setting its display name, description, webhook endpoints for receiving events, and toggling event retrieval modes.
Practical scenarios include:
- Updating the display name or description of a WhatsApp instance to reflect its current purpose (e.g., "Customer Support WhatsApp").
- Configuring or changing the webhook URL and authentication headers to securely receive WhatsApp events and messages.
- Switching between webhook mode and pull mode for event handling depending on infrastructure capabilities or preferences.
Properties
| Name | Meaning |
|---|---|
| Settings | A collection of instance configuration settings to update. |
| Name | Display name for the WhatsApp instance (e.g., "My WhatsApp"). |
| Description | Descriptive text about the instance's purpose (e.g., "Customer support WhatsApp instance"). |
| Webhook URL | HTTPS endpoint URL where WhatsApp events and messages will be sent via webhook. |
| Webhook Auth Header | HTTP header name used for authenticating webhook requests (e.g., "Authorization"). |
| Webhook Auth Value | The value sent in the authentication header for webhook requests (e.g., "Bearer token"). |
| Pull Mode | Boolean flag to enable pull mode, which fetches events by polling instead of using webhooks. |
Output
The node outputs JSON data representing the result of the update operation on the WhatsApp instance settings. The structure typically includes confirmation of updated fields or error information if the update failed.
If binary data were involved (not indicated here), it would represent media or files related to the instance, but this operation focuses solely on JSON configuration data.
Dependencies
- Requires an API key credential for authenticating with the WSAPI WhatsApp API.
- The base URL for the API must be configured in the credentials.
- Network access to the specified webhook URL is necessary if webhooks are enabled.
- No additional external dependencies beyond the WSAPI service and proper credential setup.
Troubleshooting
Common Issues:
- Incorrect webhook URL or unreachable endpoint may cause failure in receiving events.
- Missing or incorrect webhook authentication headers can lead to rejected webhook calls.
- Insufficient permissions or invalid API credentials will prevent successful updates.
- Enabling pull mode without proper implementation on the server side might result in no events being received.
Error Messages:
"The resource "instance" is not known!"— indicates a misconfiguration of the resource parameter."The operation "updateSettings" is not implemented yet!"— suggests the operation name is incorrect or unsupported.- API errors returned from WSAPI will be passed through; check the message for details like authentication failures or validation errors.
Resolutions:
- Verify all input parameters, especially URLs and authentication values.
- Ensure the API key credential is valid and has required permissions.
- Test webhook endpoints independently to confirm accessibility.
- Consult WSAPI documentation for correct usage of pull mode.
Links and References
- WSAPI WhatsApp API Documentation (replace with actual URL)
- n8n Documentation on Creating Custom Nodes
- Webhook Security Best Practices