Actions28
- Messages Actions
- Media Actions
- Templates Actions
- Contacts Actions
- Analytics Actions
- Webhooks Actions
Overview
The "Update Template" operation in the "Templates" resource allows users to modify an existing WhatsApp message template. This node interacts with the WhatsApp Business API via a comprehensive integration, enabling updates to template details such as the template name, language, category, and components.
This operation is beneficial when you need to maintain or improve your message templates without creating new ones from scratch. For example, if you want to update the wording of a marketing message template or add new interactive components to a utility template, this operation facilitates those changes programmatically within an n8n workflow.
Practical examples:
- Updating a customer support template to include new response options.
- Changing the language or category of a notification template to better suit your audience.
- Modifying the components of a transactional template to reflect updated business information.
Properties
| Name | Meaning |
|---|---|
| Template ID | The unique identifier of the template to update. |
| Template Name | The new or updated name of the message template. |
| Template Category | The category of the template; options are Authentication, Marketing, or Utility. |
| Language Code | The language code for the template (e.g., "en_US"). |
| Template Components | JSON-formatted array describing the components of the template, such as body text, buttons, etc. |
Output
The node outputs an array of JSON objects, each representing the result of the update operation for an input item. Each output item contains the response data from the WhatsApp API regarding the updated template.
The json field includes details about the updated template status or confirmation of the update. There is no indication that binary data is output by this operation.
Dependencies
- Requires an active subscription and valid API key credential for the external WhatsApp API service ("N8N Tools API").
- The node uses HTTP requests to communicate with the WhatsApp Business API through the N8N Tools API endpoint.
- Proper configuration of credentials in n8n is necessary, including API URL and API key.
- The node depends on the bundled WhatsApp API helper class for making API calls.
Troubleshooting
- Invalid Subscription or API Key: If the API key or subscription is invalid, the node throws an error indicating invalid credentials. Verify your API key and subscription status.
- Malformed JSON in Template Components: The
templateComponentsproperty expects valid JSON. Invalid JSON will cause parsing errors. Ensure the JSON format is correct. - Missing Required Fields: The operation requires
templateIdandtemplateName. Omitting these will cause errors. - API Errors: Any errors returned by the WhatsApp API during the update process will be surfaced. Check the error messages for details and ensure the template ID exists and is modifiable.
- Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error details in the output.
Links and References
- WhatsApp Business API - Message Templates
- n8n Documentation - Creating Custom Nodes
- JSON Schema for WhatsApp Template Components (for formatting
templateComponents)