GravitySocial icon

GravitySocial

Interact with GravitySocial API

Overview

This node integrates with the GravitySocial API to create social media posts within a specified workspace. It supports creating posts in various states such as drafts, scheduled posts for a future date/time, immediate publishing, or adding posts to a publishing queue. The node is useful for automating social media content management workflows where users want to programmatically prepare and publish posts across multiple accounts and platforms.

Practical examples include:

  • Scheduling marketing campaign posts to go live at specific times.
  • Creating draft posts for review before publishing.
  • Immediately publishing breaking news or announcements.
  • Adding posts to a queue for later manual or automated publishing.

Properties

Name Meaning
Workspace UUID The unique identifier (UUID) of the workspace where the post will be created.
Type How to handle the post after creation. Options:
- Draft: Save as draft without scheduling.
- Schedule: Schedule the post for a specific date and time.
- Schedule Now: Publish immediately.
- Add to Queue: Add to publishing queue.
Date & Time The exact date and time to schedule the post. Required only if Type is "Schedule".
Timezone Timezone for the scheduled post (e.g., "America/New_York"). Defaults to the user profile timezone if not set. Only used when Type is "Schedule".
Account IDs Comma-separated list of account IDs to which the post will be published.
Tag IDs Comma-separated list of tag IDs to associate with the post. Optional.
Versions Content versions for different accounts. This is a collection where each version includes:
- Account ID (number)
- Is Original (boolean)
- Content items (multiple), each with Body text, Media IDs, and URL
- Provider-specific options (key-value pairs)

Output

The node outputs an array of JSON objects representing the response from the GravitySocial API after creating the post(s). The structure typically contains details about the created post, including its identifiers, status, and metadata returned by the API.

If multiple posts are created (e.g., batch operations), the output will be an array of such objects.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the GravitySocial API.
  • The node expects the GravitySocial API base URL and access token to be configured in the credentials.
  • No additional external dependencies beyond standard HTTP requests.

Troubleshooting

  • Validation Errors (HTTP 422):
    If the input data is invalid (e.g., missing required fields, incorrect formats), the API returns validation errors. The node surfaces these with detailed messages indicating which fields failed validation.
    Resolution: Review the error details and ensure all required properties are correctly set, especially workspaceUuid, postType, accountIds, and versions.

  • Unsupported File Errors:
    Not applicable for this operation but relevant for media uploads. Ensure binary data has required attributes if uploading media.

  • API Authentication Failures:
    If the API key or token is invalid or expired, requests will fail.
    Resolution: Verify and update the API credentials in n8n.

  • Incorrect Date/Time Formatting:
    When scheduling posts, ensure the date and time are valid and the timezone is correctly specified if used.

  • Empty or Malformed Account or Tag IDs:
    Account and tag IDs must be comma-separated numeric strings. Non-numeric or empty values may cause errors.

Links and References

Discussion