Actions12
- File Actions
- Template Actions
- Job Actions
Overview
This node interacts with the Json2Doc API to validate job configurations for document generation. It supports validating different types of jobs, such as 'document' or 'template', by sending the job configuration JSON to the API and receiving validation results. This is useful for ensuring that job configurations are correct before processing, preventing errors in document generation workflows.
Use Case Examples
- Validate a document job configuration JSON to check if it meets the API requirements before submitting it for processing.
- Validate a template job configuration to ensure all required fields and formats are correct, avoiding runtime errors.
Properties
| Name | Meaning |
|---|---|
| Job Type | Specifies the type of job to validate, either 'document' or 'template'. |
| Configuration | The JSON configuration of the job to be validated, provided as a JSON string or object. |
| Fail on Error | Determines whether the node should throw an error if the validation fails (isValid is false). If false, the validation response is returned normally without throwing an error. |
Output
JSON
isValid- Indicates if the job configuration is valid.errors- Details of validation errors if the configuration is invalid.
Dependencies
- Requires an API key credential for Json2Doc API authentication.
Troubleshooting
- If the validation fails and 'Fail on Error' is enabled, the node throws an error with details of the validation issues. To handle this, either disable 'Fail on Error' or correct the configuration JSON.
- Ensure the configuration JSON is correctly formatted and matches the expected schema for the selected job type to avoid validation errors.
- API authentication errors may occur if the API key credential is missing or invalid; verify the credential setup in the node configuration.