CloudConvert icon

CloudConvert

Use CloudConvert to convert files, create thumbnails, merge files, add watermarks and more!

Overview

The node integrates with CloudConvert, a cloud-based file conversion and processing service. Specifically, the Create Thumbnail operation generates a thumbnail image from an input file. This is useful for scenarios where you need to create smaller preview images of larger files such as photos, PDFs, or videos.

Typical use cases include:

  • Automatically generating thumbnails for uploaded images or documents in a workflow.
  • Creating preview images for video files.
  • Resizing images to fit specific dimensions while optionally cropping or scaling.

For example, you might use this node to generate a 200x200 pixel thumbnail of a user-uploaded photo to display on a website without loading the full-size image.

Properties

Name Meaning
Authentication Method of authenticating with CloudConvert: either OAuth2 (recommended) or API Key.
Output Format The desired output format of the thumbnail image (e.g., jpg, png). This list is dynamically loaded based on the operation.
Binary Input Data Whether the input file should be taken from a binary field in the incoming data. If false, the file content must be provided as text.
Input File Content The textual content of the input file to upload, required if not using binary input data.
Input Filename The filename (including extension) of the input file, required if not using binary input data.
Binary Property The name of the binary property containing the file data when using binary input data. Defaults to "data".
Width The width in pixels of the generated thumbnail. Optional; if omitted, sizing behavior depends on other parameters.
Height The height in pixels of the generated thumbnail. Optional; if omitted, sizing behavior depends on other parameters.
Fit Mode of resizing the image:
- Max: Resize to fit within width and height without enlarging smaller images.
- Crop: Resize to fill width and height, cropping excess.
- Scale: Force exact width and height by scaling.
Additional Options JSON dictionary of extra options to customize the conversion task. Can be used to specify advanced CloudConvert job parameters.

Output

The node outputs JSON data representing the result of the thumbnail creation process. Typically, this includes metadata about the converted file and a binary property containing the thumbnail image data.

  • The json output contains details such as file URLs, status, and metadata returned by CloudConvert.
  • The binary output contains the actual thumbnail image file data under a specified binary property.

If the input was binary, the output will also be binary data representing the thumbnail image.

Dependencies

  • Requires a valid CloudConvert account and API access.
  • Supports two authentication methods: OAuth2 or API Key.
  • Needs proper credentials configured in n8n for authentication.
  • Internet access to communicate with the CloudConvert API endpoints.

Troubleshooting

  • Invalid Operation Error: If an unsupported operation is selected, the node throws an error indicating the invalid operation. Ensure "Create Thumbnail" is selected.
  • Authentication Failures: Errors related to authentication usually mean the API key or OAuth2 token is missing, expired, or incorrect. Verify credentials are properly set up.
  • Missing Input Data: If neither binary data nor file content is provided, the node cannot process the file. Provide one of these inputs.
  • Unsupported Output Format: Selecting an output format not supported for thumbnails may cause errors. Use the dynamically loaded list of formats.
  • Incorrect Dimensions: Providing zero or negative values for width/height may cause unexpected results or errors. Use positive integers.
  • JSON Parsing Errors: When specifying additional options, ensure the JSON is valid and correctly formatted.

Links and References

Discussion