Press Ticket icon

Press Ticket

Interage com a API do Press Ticket®

Overview

This node integrates with the Press Ticket® API to manage WhatsApp connections among other resources. Specifically, for the WhatsApp - Atualizar (Update) operation, it updates an existing WhatsApp connection's details such as its name, status, and whether it is the default connection.

Common scenarios where this node is beneficial include:

  • Managing multiple WhatsApp connections in a customer support or communication platform.
  • Updating the status of a WhatsApp connection programmatically (e.g., marking it as connected or disconnected).
  • Changing the display name or setting a particular WhatsApp connection as the default one used by the system.

Practical example:

  • You have several WhatsApp connections integrated into your system and want to update the status of one connection to "CONNECTED" and rename it to "Support Line 1".
  • You want to mark a specific WhatsApp connection as the default so that all outgoing messages use it unless specified otherwise.

Properties

Name Meaning
ID do WhatsApp The unique identifier of the WhatsApp connection to update.
Nome The new name for the WhatsApp connection.
Status The current status of the WhatsApp connection. Possible values: CONNECTED, DISCONNECTED, QRCODE, OPENING, PAIRING, TIMEOUT
Padrão Boolean flag indicating if this WhatsApp connection should be set as the default one.

Output

The output is a JSON array containing the updated WhatsApp connection object returned from the Press Ticket® API after the update operation. This object typically includes the updated fields such as the connection's ID, name, status, and default flag.

Example output structure (simplified):

[
  {
    "id": "123",
    "name": "Support Line 1",
    "status": "CONNECTED",
    "isDefault": true,
    ...
  }
]

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Press Ticket® API.
  • Needs an API token credential configured in n8n to authenticate requests.
  • The node uses the base API URL and token from these credentials to perform HTTP requests.

Troubleshooting

  • Invalid or missing WhatsApp ID: Ensure the "ID do WhatsApp" property is correctly set and corresponds to an existing WhatsApp connection.
  • Authentication errors: Verify that the API token credential is valid and has sufficient permissions.
  • API response errors: If the API returns an error, check the message for details (e.g., invalid status value). Adjust input properties accordingly.
  • Network issues: Confirm network connectivity to the Press Ticket® API endpoint.

If the node is set to continue on fail, errors will be included in the output JSON under an error field instead of stopping execution.

Links and References

  • Press Ticket® API Documentation (example placeholder, replace with actual link if available)
  • n8n Documentation on HTTP Request Node (for understanding underlying request mechanism)
  • General WhatsApp Business API concepts for managing connections and statuses.

Discussion