Postiz icon

Postiz

Consume Postiz API

Overview

This node integrates with the Postiz API to manage social media posts and related content. It allows users to create, schedule, delete, and retrieve posts, as well as upload files to the Postiz platform. The "Create Post" operation specifically enables scheduling or immediate posting of content across multiple integrations/channels with rich metadata such as tags, groups, and provider-specific settings.

Common scenarios where this node is beneficial include:

  • Automating social media publishing workflows by scheduling posts in advance.
  • Managing multi-channel campaigns by posting simultaneously to different integrations.
  • Organizing posts with tags and groups for better categorization and filtering.
  • Uploading media files to be used within posts.

Practical example: A marketing team can use this node to schedule a promotional post with images and tags to multiple social media channels at a specific date and time, ensuring consistent messaging across platforms.

Properties

Name Meaning
Type Type of post to create. Options: Draft (save without publishing), Schedule (post at a future date/time), Now (post immediately).
Short Link Boolean flag indicating whether to use short links in the post content.
Date Date and time for the post. Required for scheduling or immediate posting; ignored for drafts.
Tags Array of tags for the post. Each tag has a Value (the tag's identifier) and a Label (human-readable name).
Posts Array of posts to publish. Each post includes:
- Integration ID: Identifier of the channel/integration to post to.
- Group: Optional grouping label.
- Settings: Provider-specific key-value pairs.
- Content Items: Array of content pieces, each with:
  • Content text
  • Optional content ID
  • Images array, each image having an ID and path/URL.

Output

The node outputs JSON data representing the response from the Postiz API for the executed operation:

  • For Create Post, the output contains details about the created post(s), including IDs, status, and metadata returned by the API.
  • For other operations like Get Posts, Get Integrations, Upload File, and Delete Post, the output reflects the respective API responses.
  • In case of errors, the output includes an error object with a descriptive message.

Binary data is not output by the "Create Post" operation, but the node supports uploading files via a separate operation that accepts binary input.

Dependencies

  • Requires an active connection to the Postiz API using an API authentication token configured in n8n credentials.
  • Uses the form-data library internally for file uploads.
  • No additional environment variables are explicitly required beyond the API credential setup.

Troubleshooting

  • Common issues:

    • Missing or invalid API credentials will cause authentication failures.
    • Providing incomplete or incorrectly formatted post data (e.g., missing required fields like Integration ID or content) may result in API validation errors.
    • Scheduling posts with invalid dates or past timestamps might be rejected by the API.
    • Uploading files with unsupported extensions or corrupted binary data can fail.
  • Error messages:

    • Errors returned from the Postiz API are passed through and included in the node output under an error field.
    • Typical messages include authentication errors ("Invalid API key"), validation errors ("Missing required field"), or server errors.
  • Resolution tips:

    • Verify API credentials and permissions.
    • Ensure all required properties are set correctly according to the property definitions.
    • Use valid ISO date-time formats for scheduling.
    • Confirm binary data integrity and correct file extension when uploading.

Links and References

Discussion