Zappfy API icon

Zappfy API

Interact with Zappfy API

Overview

This node, named "Zappfy API," allows interaction with the Zappfy service through its API. Specifically for the Chat resource and the Procurar Chats (Find Chats) operation, it enables users to search for chat messages within a specified instance and contact by message ID. This is useful in scenarios where you need to retrieve specific chat conversations or messages programmatically, such as auditing communications, integrating chat data into other systems, or automating responses based on chat content.

Practical examples include:

  • Fetching chat history for a particular contact in a given instance.
  • Searching for a specific message by its ID to verify delivery or content.
  • Paginating through chat records to process or analyze conversations in batches.

Properties

Name Meaning
Nome Da Instância The name of the Zappfy instance where the chat is located.
Contato The contact's phone number or identifier whose chats are being searched.
ID Da Mensagem The unique identifier of the message to find within the chat.
Página The page number for paginated results, indicating which subset of chats to retrieve.
Quantidade Por Página The number of chat entries to return per page, controlling the size of each result batch.

Output

The node outputs an array of JSON objects representing the found chat messages matching the search criteria. Each object corresponds to a chat record retrieved from the Zappfy API. The exact structure depends on the API response but typically includes message details such as sender, timestamp, content, and message ID.

If the node supports binary data output (not explicitly shown in the provided code), it would represent media or attachments related to chat messages; however, this is not indicated here.

Dependencies

  • Requires an active connection to the Zappfy API service.
  • Needs an API authentication token or key configured in n8n credentials (referred generically as "an API key credential").
  • Network access to https://docs.zappfy.io/api-reference as the base URL for API requests.

Troubleshooting

  • Operation Not Supported Error: If you select an unsupported operation or resource combination, the node throws an error stating the operation is not supported. Ensure that the Resource is set to "chat-api" and Operation to "find-chats" for this functionality.
  • Missing Required Parameters: The properties Nome Da Instância, Contato, and ID Da Mensagem are required. Omitting any will likely cause errors or empty results.
  • API Authentication Issues: If the API key or credentials are invalid or missing, the node will fail to authenticate with the Zappfy API. Verify credentials setup in n8n.
  • Pagination Limits: Setting very high values for Quantidade Por Página might lead to performance issues or API rate limits. Use reasonable pagination settings.

Links and References

Discussion