Postiz icon

Postiz

Consume Postiz API

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 the workflow to Postiz. This is useful when you want to programmatically add media or other files to your Postiz account as part of an automated content publishing or management process.

Typical use cases include:

  • Uploading images, videos, or other media files to Postiz before attaching them to scheduled posts.
  • Automating file uploads triggered by external events or other nodes in an n8n workflow.
  • Managing media assets centrally via Postiz through automation.

For example, you might have a workflow that receives images from a webhook, processes them, and then uploads them to Postiz using this node.

Properties

Name Meaning
Binary Property The name of the binary property in the input data that contains the file's raw data.
Extension (Png / Jpg / Mp4 / etc.) The file extension/type of the file being uploaded (e.g., png, jpg, mp4). This helps define the filename and MIME type implicitly.

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 confirmation.

The output does not include binary data; it only returns JSON describing the uploaded file.

Dependencies

  • Requires an active connection to the Postiz API via an API key credential configured in n8n.
  • Uses the form-data library internally to format the file upload request.
  • The binary data must be available in the specified binary property of the incoming 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 be provided correctly to form the filename.
    • API authentication errors: Ensure the API key credential is valid and has permissions to upload files.
    • Network or API downtime can cause request failures.
  • Error messages:

    • Errors returned from the Postiz API will be included in the output under an error field.
    • Typical error messages may relate to invalid file data, missing parameters, or authorization failures.
  • Resolutions:

    • Verify the binary property name matches exactly the property containing the file data.
    • Confirm the file extension is correct and supported.
    • Check API credentials and permissions.
    • Inspect the error message for specific API feedback.

Links and References

Discussion