Overview
This node, named "Avito Upload image NEW," is designed to upload an image file to the Avito platform using a provided user token and user ID. It accepts an image encoded in Base64 format along with its filename, sends this data to Avito's API, and returns the response from the upload operation.
Common scenarios for this node include automating the process of adding images to Avito listings or integrating Avito image uploads into larger workflows where images are generated or processed dynamically.
For example, a user might use this node to automatically upload product photos to their Avito account after processing images elsewhere in their workflow.
Properties
| Name | Meaning |
|---|---|
| Token | The authentication token required to authorize the upload request on behalf of the user. |
| User Id | The identifier of the user account on Avito where the image will be uploaded. |
| file | The image file content encoded as a Base64 string. |
| fileName | The name of the image file being uploaded (e.g., "photo.jpg"). |
Output
The node outputs a JSON array containing the parsed response from the Avito API after attempting to upload the image. This response typically includes details about the uploaded image such as its URL, status, or any error messages returned by the API.
No binary data output is produced by this node; it only returns structured JSON data representing the result of the upload operation.
Dependencies
- Requires access to the Avito API via an external service call.
- Needs a valid user authentication token and user ID for authorization.
- The node depends on an internal
AvitoApi.uploadImagesmethod which handles the actual API request. - The input image must be provided as a Base64-encoded string.
Troubleshooting
- Invalid Token or User ID: If the token or user ID is incorrect or expired, the API call will fail. Ensure that valid credentials are used.
- Malformed Base64 File: If the Base64 string is not properly encoded, the upload will fail. Verify the encoding of the image before passing it to the node.
- API Errors: The node returns the raw API response parsed as JSON. Check the response for error messages indicating issues like file size limits, unsupported formats, or network problems.
- Empty or Missing Required Fields: All properties are required. Omitting any will likely cause the node to throw an error or fail silently.
Links and References
- Avito API Documentation (general reference for Avito API usage)
- n8n documentation on Creating Custom Nodes