z-api by @jaimeflneto icon

z-api by @jaimeflneto

Interact with Z-API to send WhatsApp messages

Overview

This node interacts with the Z-API service to perform operations related to WhatsApp chats. Specifically, for the 'Chat' resource and 'Get Chats' operation, it retrieves chat information from the WhatsApp account linked via Z-API. This is useful for scenarios where users want to fetch and process chat data programmatically, such as monitoring conversations, analyzing chat history, or integrating chat data into other workflows.

Use Case Examples

  1. Fetching all chats from a WhatsApp account to display in a dashboard.
  2. Retrieving chat details to trigger automated responses or notifications based on chat activity.

Output

JSON

  • chatId - Unique identifier of the chat
  • name - Name of the chat or contact
  • lastMessage - Content or summary of the last message in the chat
  • timestamp - Timestamp of the last message or chat update
  • unreadCount - Number of unread messages in the chat

Dependencies

  • Requires an API key credential for Z-API to authenticate requests to the WhatsApp service.

Troubleshooting

  • Common issues include authentication failures due to invalid or expired API keys. Ensure the API key credential is correctly configured.
  • Network errors or timeouts when connecting to the Z-API service can occur; verify network connectivity and service availability.
  • Errors related to invalid parameters or unsupported operations may arise if the node configuration does not match the expected resource and operation.
  • If the node returns empty results, verify that the WhatsApp account linked to Z-API has active chats and that the API permissions allow chat retrieval.

Discussion