Overview
This node integrates with the Postiz API, providing multiple operations to manage posts and files on the Postiz platform. Specifically, the Upload File operation allows users to upload a file from binary data within n8n to Postiz. This is useful when automating workflows that require sending media or other files to Postiz for use in posts or integrations.
Typical scenarios include:
- Uploading images, videos, or other media files stored in previous workflow steps to Postiz.
- Automating content publishing pipelines where files need to be uploaded before creating posts.
- Managing media assets programmatically without manual uploads.
For example, you might have a workflow that downloads an image from a URL, processes it, and then uses this node to upload the processed image to Postiz by specifying the binary property containing the image data and its file extension.
Properties
| Name | Meaning |
|---|---|
| Binary Property | Name of the binary property that contains the file data to be uploaded. |
| Extension (Png / Jpg / Mp4 / etc.) | The file extension/type of the file being uploaded (e.g., png, jpg, mp4). |
These properties are required for the Upload File operation and must be set accordingly to specify which binary data to upload and what file type it represents.
Output
The node outputs JSON data representing the response from the Postiz API after uploading the file. This typically includes metadata about the uploaded file such as its ID, URL, or status.
If the node supports binary output (not explicitly shown here), it would represent the uploaded file or related binary content, but in this case, the output is JSON describing the upload result.
Dependencies
- Requires an active connection to the Postiz API via an API key credential configured in n8n.
- Uses the
form-datalibrary internally to format the file upload request. - The node expects binary data to be available in the specified binary property of the input item.
Troubleshooting
Common issues:
- Incorrect binary property name: If the specified binary property does not exist or is empty, the upload will fail.
- Unsupported or missing file extension: The extension must correctly reflect the file type; otherwise, the server may reject the upload.
- Authentication errors: Ensure the API key credential is valid and has permissions to upload files.
- Network or API errors: Check connectivity and Postiz API status.
Error messages:
- Errors returned from the API will be included in the output JSON under an
errorfield. - Common error descriptions might include invalid file data, missing parameters, or authentication failures.
- Errors returned from the API will be included in the output JSON under an
To resolve errors, verify the binary data presence, correct property names, valid file extensions, and proper API credentials.
Links and References
- Postiz API Documentation (Assumed URL, replace with actual if known)
- n8n documentation on Working with Binary Data
- n8n documentation on Creating Custom Nodes
