Actions21
Overview
This node integrates with the GravitySocial API to manage media files within a specified workspace. Specifically, the Media Upload operation allows users to upload new media files (such as images or videos) to their GravitySocial workspace. This is useful in scenarios where you want to programmatically add media content to your social media management platform for later use in posts or campaigns.
Practical examples include:
- Automatically uploading images from an external source to GravitySocial for scheduled social media posts.
- Integrating file uploads into a workflow that processes and publishes content across multiple social accounts.
- Bulk uploading media assets as part of a content pipeline.
Properties
| Name | Meaning |
|---|---|
| Workspace UUID | The unique identifier (UUID) of the workspace where the media will be uploaded. |
| File | The binary file data to upload. This must be a binary property containing the file's data, MIME type, and filename. |
Output
The node outputs JSON data representing the response from the GravitySocial API after the upload request. Typically, this includes details about the newly uploaded media file such as its ID, URL, metadata, and any other relevant attributes returned by the API.
If the upload is successful, the output JSON will contain the media object(s). If there is an error, the output may contain an error message describing what went wrong.
The node does not output binary data itself; it only sends binary data as input for the upload.
Dependencies
- Requires an active connection to the GravitySocial API via an API key credential (an API authentication token).
- The node expects the GravitySocial API base URL and access token to be configured in the credentials.
- The
fileinput must be provided as a binary property in n8n, containing the file data, MIME type, and filename. - Uses standard HTTP methods and multipart form-data encoding for file upload.
Troubleshooting
Unsupported file error:
If the binary input does not contain required attributes (data,mimeType, orfileName), the node throws an error indicating the file is unsupported. Ensure the binary property is correctly set with all necessary fields.HTTP errors (e.g., 401 Unauthorized, 403 Forbidden):
These indicate issues with API authentication. Verify that the API key credential is valid and has appropriate permissions.Validation errors (HTTP 422):
The node surfaces detailed validation errors if the API rejects the upload due to invalid data. Check the error messages for missing or incorrect parameters.Network or connectivity issues:
Ensure that the n8n instance can reach the GravitySocial API endpoint and that no firewall or proxy is blocking requests.Large file uploads:
Very large files might cause timeouts or memory issues. Consider splitting large files or increasing timeout settings if applicable.
Links and References
- GravitySocial API Documentation (hypothetical link, replace with actual if available)
- n8n Binary Data Handling
- FormData MDN Reference
This summary focuses on the Media resource's Upload operation as requested, based on static analysis of the provided source code and properties.