CustomJE icon

CustomJE

Custom operations

Overview

This node provides an operation to extract meaningful content from files using AI/ML capabilities. Specifically, the Extract Content operation allows users to send a file (such as an image or PDF) along with a text prompt describing what information to extract. The node then calls an external API to analyze the file and return extracted content based on the prompt.

Common scenarios where this node is beneficial include:

  • Extracting textual descriptions or metadata from images.
  • Analyzing documents or PDFs to retrieve specific data points.
  • Using custom prompts to guide the extraction process for tailored results.

For example, you might upload a photo of a product label and use the prompt "Explain this image" to get a summary of the label contents, or submit a scanned invoice PDF with a prompt like "Extract invoice number and total amount."

Properties

Name Meaning
API Key Your CustomJE API key used to authenticate requests to the content extraction service.
Gemini API Key Your Google Gemini API key required for enhanced content extraction capabilities.
Text Prompt A descriptive prompt that tells the AI what to extract from the provided file content.
File Data The actual file content to analyze, provided as a base64 encoded string (for images) or raw content.
MIME Type The MIME type of the file being analyzed, e.g., image/jpeg, image/png, application/pdf.

Output

The output is a JSON array containing the response from the external content extraction API. This typically includes the extracted content or analysis results based on the input file and prompt.

If the API returns binary data (not explicitly shown in the code), it would represent processed file content or media related to the extraction, but this node primarily handles JSON responses.

Dependencies

  • Requires access to the CustomJE API endpoints for content extraction.
  • Needs two API keys: one for the CustomJE service and another for Google Gemini API.
  • Network connectivity to https://api.customje.com/extract-content.php is necessary.
  • Proper configuration of these API keys within the node parameters is mandatory.

Troubleshooting

  • Missing or invalid API keys: Ensure both the CustomJE API key and Gemini API key are correctly entered and active. Invalid keys will cause authentication failures.
  • Incorrect file encoding: The file data must be base64 encoded if it is an image; otherwise, the API may reject the input or return errors.
  • Unsupported MIME types: Verify that the MIME type matches the actual file format. Mismatches can lead to processing errors.
  • API request failures: Network issues or API downtime can cause errors. Check connectivity and API status.
  • Error messages: If the node throws an error like "The operation 'extract-content' is not implemented yet!", verify that the resource and operation names are correct and supported.

Links and References


Note: This summary is based solely on static analysis of the provided source code and property definitions without runtime execution.

Discussion