Json2Doc icon

Json2Doc

Interact with Json2Doc API for document generation

Overview

This node interacts with the Json2Doc API to upload image files, among other file, template, and job operations. Specifically, for the 'File' resource and 'Upload Image' operation, it uploads an image file from a specified binary property to the Json2Doc service, with an optional time-to-live (TTL) in hours after which the file is automatically deleted. This is useful for workflows that require temporary image hosting or processing, such as generating documents or sharing images with limited availability.

Use Case Examples

  1. Uploading a user-submitted image to a document generation service with a TTL of 24 hours.
  2. Automating image uploads for temporary use in reports or presentations, ensuring files are deleted after a set period.

Properties

Name Meaning
Binary Property Name of the binary property containing the image file to upload.
TTL Hours Time to live in hours (1-48). The uploaded file will be automatically deleted after this period.

Output

JSON

  • data - The response data from the Json2Doc API containing details about the uploaded file.

Dependencies

  • Requires an API key credential for the Json2Doc API to authenticate requests.

Troubleshooting

  • Ensure the binary property name matches the actual binary data property in the input item; otherwise, the node will fail to find the image file.
  • TTL Hours must be between 1 and 48; values outside this range may cause errors or be rejected by the API.
  • Common errors include authentication failures if the API key is invalid or missing, and file upload errors if the binary data is not properly formatted or missing.
  • If the node throws a timeout or network error, verify network connectivity and API service status.

Links

Discussion