Workchat icon

Workchat

Consume Prinrcart API

Overview

This node integrates with the Prinrcart API to interact with a workchat system. Specifically, for the "Get List" resource and the "Get List of Contact" operation, it retrieves a paginated list of contact chats from the service. This is useful in scenarios where you want to fetch and process contact chat information programmatically, such as displaying recent contacts, syncing chat lists, or automating workflows based on contact interactions.

For example, you might use this node to:

  • Retrieve the first page of contact chats to display in a dashboard.
  • Automate follow-up messages by iterating over contacts retrieved from the list.
  • Integrate contact chat data into CRM or support systems.

Properties

Name Meaning
Authentication Method of authentication; currently supports only "API Token" authentication.
Page The page number of the contact list to retrieve (pagination). Defaults to 1.

Output

The node outputs an array of JSON objects representing the contact chat list retrieved from the API. Each object corresponds to a contact chat entry as returned by the Prinrcart API endpoint:

GET https://erp-amz.cloodo.com/v4/messages/list-contact-chat?per_page=10&page={page}

The output JSON structure depends on the API response but generally includes details about each contact chat such as contact identifiers, names, last message info, timestamps, etc.

No binary data output is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Prinrcart API.
  • The node makes HTTP GET requests to the Prinrcart API endpoint https://erp-amz.cloodo.com/v4/messages/list-contact-chat.
  • n8n must be configured with the appropriate API token credential to authorize these requests.

Troubleshooting

  • Common issues:

    • Invalid or missing API token will cause authentication failures.
    • Requesting a page number beyond available pages may return empty results.
    • Network connectivity issues can prevent successful API calls.
  • Error messages:

    • Authentication errors typically indicate invalid or expired API tokens. Verify and update the token credential.
    • HTTP errors (e.g., 4xx or 5xx) suggest issues with the request or server. Check the API status and parameters.
    • If the node throws errors related to JSON parsing, ensure the API response format has not changed.
  • Resolution tips:

    • Confirm the API token is valid and has necessary permissions.
    • Use valid page numbers starting from 1.
    • Check network access and proxy settings if applicable.

Links and References

  • Prinrcart API documentation (if publicly available) for the /messages/list-contact-chat endpoint.
  • n8n documentation on creating and using API token credentials.
  • General REST API pagination best practices.

Discussion