Press Ticket icon

Press Ticket

Interage com a API do Press Ticket®

Overview

This node integrates with the Press Ticket® API to manage WhatsApp sessions among other resources. Specifically, for the "Sessão WhatsApp" resource and the "Criar" operation, it creates a new WhatsApp session linked to an existing WhatsApp connection.

Typical use cases include automating the creation of WhatsApp sessions in customer support or communication workflows where multiple WhatsApp connections are managed. For example, when onboarding a new WhatsApp connection, you can programmatically create a session to start handling messages without manual intervention.

Properties

Name Meaning
ID do WhatsApp The identifier of the WhatsApp connection for which the session will be created

Output

The output is a JSON array containing the response from the Press Ticket® API after creating the WhatsApp session. This typically includes details about the newly created session such as its ID and associated WhatsApp connection ID.

Example output structure (simplified):

[
  {
    "id": 123,
    "whatsappId": 456,
    "status": "active",
    "createdAt": "2024-01-01T12:00:00Z",
    ...
  }
]

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Press Ticket® API.
  • Needs an API token credential configured in n8n to authenticate requests.
  • The API URL and token must be set up in the node credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp connection ID (whatsappId) will cause the API request to fail.
    • Network or authentication errors if the API token is incorrect or expired.
    • API endpoint unavailability or changes may cause unexpected errors.
  • Error messages:

    • Errors returned from the API will be propagated. For example, "Invalid WhatsApp ID" means the provided ID does not exist.
    • If the node throws an error about missing parameters, ensure the whatsappId property is correctly set.
    • If the node fails due to authentication, verify that the API token credential is valid and has necessary permissions.
  • Resolution tips:

    • Double-check the WhatsApp connection ID input.
    • Confirm API credentials and network connectivity.
    • Enable "Continue on Fail" in the node settings to handle errors gracefully during batch executions.

Links and References

Discussion