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 conversation data from Avito, such as monitoring customer inquiries, integrating message data into CRM systems, or triggering workflows based on new messages.
For example, you could use this node to:
- Automatically pull new messages from a user's chat to analyze customer feedback.
- Sync chat messages into a database for record-keeping or further processing.
- Trigger notifications or alerts when new messages arrive in a particular chat.
Properties
| Name | Meaning |
|---|---|
| User id | The unique identifier of the user whose messages you want to retrieve. |
| Chat id | The unique identifier of the chat/conversation from which to get messages. |
| Token | An authentication token required to authorize access to the messaging API. |
Output
The node outputs a JSON array containing an object with a messages field. This field holds the list of messages retrieved from the specified chat for the given user. The structure looks like:
[
{
"messages": [ /* array of message objects */ ]
}
]
Each message object represents an individual message from the chat. The exact structure of each message depends on the external API response but typically includes details like message content, sender info, timestamps, etc.
No binary data output is produced by this node.
Dependencies
- Requires access to an external Avito messaging API.
- Needs a valid authentication token (API key or similar) to authorize requests.
- The node uses an internal API helper (
AvitoApi.getMessages) to perform the message retrieval.
Troubleshooting
- Invalid or missing token: If the token is incorrect or expired, the API call will fail. Ensure the token is valid and has necessary permissions.
- Incorrect userId or chatId: Providing wrong identifiers may result in empty message lists or errors. Verify these IDs are correct.
- Network issues: Connectivity problems can cause request failures. Check network status and API availability.
- API rate limits: Excessive requests might be throttled by the API. Implement retry logic or respect rate limits.
Common error messages likely relate to authorization failures or resource not found errors. To resolve, confirm credentials and input parameters.
Links and References
- Avito official API documentation (if available)
- n8n documentation on creating custom nodes and handling API integrations