Overview
This node, named "Avito Get Messages," is designed to retrieve messages from a messaging service associated with Avito. It fetches messages for a specific user and chat by using an authentication token. This node is useful in scenarios where you want to automate the retrieval of chat messages for processing, analysis, or integration with other workflows. For example, it can be used to monitor conversations, extract message data for reporting, or trigger actions based on incoming messages.
Properties
| Name | Meaning |
|---|---|
| User id | The identifier of the user whose messages you want to retrieve. |
| Chat id | The identifier of the chat conversation from which to get messages. |
| Token | The authentication token required to access the messaging API securely. |
Output
The node outputs a JSON array containing a single object with a messages field. This field holds the list of messages retrieved from the specified chat for the given user. Each message's structure depends on the external API but is encapsulated within the messages array.
Example output structure:
[
{
"messages": [
/* Array of message objects */
]
}
]
No binary data output is produced by this node.
Dependencies
- Requires access to an external messaging API (referred to as AvitoApi) that provides the
getMessagesmethod. - The node needs a valid authentication token to interact with the API.
- No additional n8n-specific credentials are referenced; users must supply the token as an input property.
Troubleshooting
- Invalid or expired token: If the provided token is invalid or expired, the API call will fail. Ensure the token is current and has the necessary permissions.
- Incorrect userId or chatId: Providing wrong identifiers may result in empty message arrays or errors. Verify these IDs correspond to existing users and chats.
- API connectivity issues: Network problems or API downtime can cause failures. Check network connectivity and API status.
- Empty messages array: This might indicate no messages exist for the specified chat or user.
Links and References
- Refer to the official Avito API documentation for details on authentication and message retrieval endpoints.
- n8n documentation on creating custom nodes and handling API integrations.