WAHA API icon

WAHA API

Complete WhatsApp automation with WAHA API - Multi-engine support

Overview

This node integrates with the WAHA API to automate WhatsApp group management tasks. Specifically, the "Set Group Subject" operation allows users to change the subject (name) of an existing WhatsApp group. This is useful for keeping group names relevant and up-to-date as the group's purpose evolves.

Practical scenarios include:

  • Automatically renaming project groups based on current milestones.
  • Updating event group names dynamically as event details change.
  • Standardizing group names across multiple teams or departments.

Properties

Name Meaning
Session Name The name of the WhatsApp session to use for the operation.
Chat ID The unique identifier of the WhatsApp group chat whose subject will be changed.
Group Name The new subject (name) to set for the WhatsApp group.
Additional Fields A collection of optional fields (not used in this operation but available generally).

Output

The node outputs a JSON object containing the response from the WAHA API after attempting to set the group subject. This typically includes confirmation of the update or error details if the operation failed.

Example output structure:

{
  "success": true,
  "message": "Group subject updated successfully",
  "groupId": "123456789@g.us",
  "newSubject": "New Group Name"
}

If the operation fails, the output will contain an error message describing the issue.

Dependencies

  • Requires a valid WAHA API key credential configured in n8n.
  • Requires a valid WhatsApp session name that corresponds to an active WhatsApp session.
  • The node also validates subscription and API keys against an external validation API before performing operations.

Troubleshooting

  • Invalid Session Name: If the session name does not correspond to an active WhatsApp session, the operation will fail. Ensure the session is started and active.
  • Invalid Chat ID: The chat ID must be a valid WhatsApp group ID (usually ending with @g.us). Using an incorrect ID will cause errors.
  • API Key Issues: Errors related to authentication usually indicate invalid or expired API keys. Verify credentials are correct and have proper permissions.
  • Permission Errors: The WhatsApp account associated with the session must have admin rights in the group to change its subject.
  • Network Issues: Connectivity problems can cause request failures. Check network access to the WAHA API endpoint.

Common error messages:

  • "Unknown group operation: setGroupSubject": Indicates a misconfiguration or unsupported operation; verify the operation name.
  • "N8N Tools API: Invalid subscription or API key.": Check API key validity and subscription status.
  • HTTP 4xx or 5xx errors: Review API usage limits, session status, and input parameters.

Links and References

Discussion