Workchat icon

Workchat

Consume Prinrcart API

Overview

This node integrates with the Prinrcart API to interact with a work chat system. Specifically, for the "Get List" resource and the "Get List of Chat User" operation, it retrieves lists related to chat users. This can be useful in scenarios where you want to fetch all users involved in chats or get contact lists paginated by pages.

Practical examples include:

  • Fetching a list of all users currently engaged in chats to display in a dashboard.
  • Retrieving a paginated contact list for user selection or further processing.

Properties

Name Meaning
Authentication Method of authentication; currently supports only "API Token" authentication.

Note: The provided properties JSON only includes the "Authentication" property, which is an option to select the authentication method (only "API Token" available).

Output

The output is a JSON array containing the response data from the Prinrcart API endpoints related to chat user lists. The structure depends on the specific endpoint called but generally includes user or contact information as returned by the API.

No binary data output is produced by this node.

Dependencies

  • Requires an API token credential for authenticating requests to the Prinrcart API.
  • Makes HTTP requests to the following endpoints:
    • https://erp-amz.cloodo.com/v4/messages/list-user-chat (to get the list of chat users)
    • https://erp-amz.cloodo.com/v4/messages/list-contact-chat?per_page=10&page={page} (to get paginated contact lists)

Troubleshooting

  • Common issues:

    • Invalid or missing API token will cause authentication failures.
    • Network connectivity problems may prevent successful API calls.
    • Pagination parameter (page) must be a valid number when fetching contact lists.
  • Error messages:

    • Errors thrown by the API (e.g., unauthorized, not found) will be surfaced in the node's output if "Continue On Fail" is enabled.
    • If the node fails without "Continue On Fail," the workflow execution will stop with the error message from the API or request failure.

To resolve errors:

  • Ensure the API token is correctly configured and has necessary permissions.
  • Verify network access to the API endpoint.
  • Provide valid input parameters, especially the page number for paginated requests.

Links and References

Discussion