Overview
This node integrates with the Gyazo API to manage image collections. Specifically, the Collection - Create operation allows users to create a new collection on Gyazo by specifying a name and optionally associating existing images with it via their IDs.
Common scenarios where this node is useful include:
- Organizing multiple images into named collections for easier management.
- Automating the creation of collections as part of an image upload or processing workflow.
- Grouping related images programmatically without manual intervention.
For example, after uploading several images to Gyazo, you can use this node to create a collection named "Project Screenshots" and add those images to it by providing their IDs.
Properties
| Name | Meaning |
|---|---|
| Name | The name of the collection to be created. Note: Requires the application to have the "collection" scope permission. |
| Options | Additional fields for the collection creation: |
| Image IDs | An array of image IDs (strings) to add to the newly created collection. Each ID corresponds to an existing image in Gyazo. |
Output
The output JSON contains the response from the Gyazo API after creating the collection. It typically includes details such as:
- The unique identifier of the created collection.
- The name of the collection.
- The list of image IDs associated with the collection.
- Metadata about the collection (e.g., creation date).
No binary data is output by this operation.
Example output structure (simplified):
{
"id": "abcdef1234567890abcdef1234567890",
"name": "My Collection",
"image_ids": [
"imageid1",
"imageid2"
],
"created_at": "2024-01-01T12:00:00Z"
}
Dependencies
- Requires an API key credential with access to the Gyazo API, including the "collection" scope permission.
- The node uses the Gyazo REST API endpoint
https://api.gyazo.com/api/v2/collectionsfor creating collections. - Ensure that the API token used has been regenerated if the "collection" scope was added recently.
Troubleshooting
- Missing or insufficient permissions: If the API token does not have the "collection" scope, the request will fail. Make sure to add the "collection" scope to your application's permissions and regenerate the access token.
- Invalid image IDs: Providing invalid or non-existent image IDs in the
image_idsarray may cause the API to reject the request or ignore those IDs. - Empty collection name: While the API might accept an empty string, it is recommended to provide a meaningful name to avoid confusion.
- API errors: Network issues or rate limiting by Gyazo can cause errors. Check the error message returned in the node's output for details.