Press Ticket icon

Press Ticket

Interage com a API do Press Ticket®

Overview

This node integrates with the Press Ticket® API to manage various communication resources, including WhatsApp connections. Specifically for the WhatsApp - Reiniciar (Restart) operation, it allows restarting a WhatsApp connection by its ID. This can be useful in scenarios where a WhatsApp connection becomes unresponsive or needs to be refreshed without deleting and recreating it.

Practical examples:

  • Automatically restart a WhatsApp connection if it loses connectivity.
  • Use in workflows that monitor connection health and trigger restarts as remediation.
  • Restart connections after configuration changes or updates.

Properties

Name Meaning
ID do WhatsApp The unique identifier of the WhatsApp connection to restart

Output

The output is a JSON array containing the response from the Press Ticket® API after attempting to restart the WhatsApp connection. The structure typically includes success status and any relevant data or messages returned by the API.

Example output JSON structure:

{
  "success": true,
  "message": "WhatsApp connection restarted successfully",
  "whatsappId": "123"
}

If the API returns an error, the output will contain error details.

Dependencies

  • Requires an active connection to the Press Ticket® API.
  • Needs an API token credential configured in n8n for authentication.
  • The node uses HTTP requests to the Press Ticket® API endpoints.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp connection ID will cause the API call to fail.
    • Network or authentication errors if the API token is incorrect or expired.
    • API rate limits or service downtime may prevent successful restart.
  • Error messages:

    • "Failed to restart WhatsApp connection": Check if the WhatsApp ID is correct and the API token is valid.
    • "Unauthorized" or "Invalid API token": Verify the API credentials in n8n.
    • "Connection not found": Confirm the WhatsApp connection exists in the Press Ticket® system.
  • Resolution tips:

    • Ensure the WhatsApp ID is correctly provided.
    • Validate API token and permissions.
    • Check network connectivity and API service status.

Links and References

Discussion