WhatMaster icon

WhatMaster

Integração com a API WhatMaster para envio de mensagens

Overview

This node integrates with the WhatMaster API to manage WhatsApp messaging and ticketing workflows. Specifically, for the Ticket resource and the Definir Fila (Set Queue) operation, it allows users to assign or update the queue name of a support or service ticket within the WhatMaster system.

Typical use cases include:

  • Automatically routing tickets to specific support queues based on business logic.
  • Organizing customer requests into different teams or departments by setting the appropriate queue.
  • Integrating WhatsApp-based customer interactions with internal ticket management systems.

For example, when a new message arrives from a customer, this node can be used to set the ticket's queue to "Sales" or "Technical Support" depending on the message content or other criteria.

Properties

Name Meaning
Número do WhatsApp The WhatsApp number in international format (e.g., 5511999999999).
External Key Optional external key to associate with the request for tracking or correlation.
ID do Ticket The unique identifier of the ticket to be updated.
Fila The name of the queue to assign to the ticket (e.g., "Support", "Billing").

Output

The node outputs an array of JSON objects, each representing the response from the WhatMaster API after attempting to set the queue for the specified ticket. The exact structure depends on the API response but generally includes confirmation of the update or error details.

No binary data output is produced by this operation.

Example output JSON snippet (conceptual):

{
  "success": true,
  "ticketId": "12345",
  "queue": "Support",
  "message": "Queue updated successfully"
}

If an error occurs, the output JSON will contain an error field with the error message.

Dependencies

  • Requires configuration of WhatMaster API credentials including:
    • A Bearer token for authorization.
    • An external code identifier used in the API URL path.
  • The node uses the WhatMaster REST API endpoint:
    https://back.whatmaster.com.br/v1/api/external/{externalCode}
  • No additional environment variables are required beyond the API credentials.
  • The node depends on standard Node.js modules such as fs and form-data for other operations, but these are not relevant for the "Definir Fila" operation.

Troubleshooting

  • Missing Credentials:
    Error messages like "No credentials found" or "Bearer Token is required" indicate that the WhatMaster API credentials are not properly configured. Ensure the API key and external code are set up in n8n credentials.

  • Invalid or Missing Parameters:
    If required parameters such as "Número do WhatsApp", "ID do Ticket", or "Fila" are missing or empty, the node will throw errors. Double-check that all mandatory fields are filled correctly.

  • Unsupported Operation:
    If the operation is not recognized or implemented, an error will be thrown. For the Ticket resource, only supported operations should be selected.

  • API Errors:
    If the WhatMaster API returns an error (e.g., invalid ticket ID, unauthorized access), the node will output the error message in the JSON response. Review the API documentation or contact WhatMaster support for further assistance.

Links and References


Note: This summary focuses exclusively on the "Ticket" resource and the "Definir Fila" operation as requested.

Discussion