Press Ticket icon

Press Ticket

Interage com a API do Press Ticket®

Overview

This node integrates with the Press Ticket® API to manage various resources such as messages, contacts, tickets, queues, tags, WhatsApp connections, and WhatsApp sessions. Specifically for the Tag resource with the Sincronizar (Sync) operation, it synchronizes tags associated with a contact by updating the contact's tags to match the provided list.

Common scenarios where this node is beneficial include:

  • Keeping contact tag information up-to-date in an automated workflow.
  • Synchronizing tags from external systems or databases into Press Ticket® contacts.
  • Managing customer segmentation or categorization dynamically based on business logic.

For example, you can use this node to assign multiple tags to a contact at once by providing the contact ID and a comma-separated list of tag IDs, ensuring the contact’s tags are exactly those specified.

Properties

Name Meaning
ID do Contato The unique identifier of the contact whose tags will be synchronized.
IDs das Tags Comma-separated list of tag IDs (e.g., "1,2,3") to synchronize with the specified contact.

Output

The output is a JSON array containing the response from the Press Ticket® API after attempting to synchronize the tags for the given contact. The structure typically includes confirmation of the synchronization or details about the updated tags.

Example output JSON structure (simplified):

{
  "contactId": 123,
  "tags": [
    { "id": 1, "name": "VIP" },
    { "id": 2, "name": "Newsletter" }
  ],
  "success": true
}

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 node uses HTTP requests to the Press Ticket® API endpoints.

Troubleshooting

  • Invalid Contact ID or Tag IDs: If the contact ID or tag IDs are invalid or do not exist, the API may return an error. Verify that the IDs are correct and exist in the Press Ticket® system.
  • Authentication Errors: Ensure the API token credential is correctly set up and has sufficient permissions.
  • Malformed Tag IDs: The tag IDs must be a comma-separated string of numeric IDs without extra spaces or invalid characters.
  • API Response Format Issues: If the API returns unexpected data, check the API status and version compatibility.

Common error message example:

  • "error": "Contact not found" — Check if the contact ID exists.
  • "error": "Invalid tag IDs" — Verify the tag IDs format and existence.

Links and References

Discussion