Actions13
- Agent Actions
- Datastore Actions
- Query Actions
- Reranker Actions
- LMUnit Actions
- Parser Actions
Overview
The node "Contextual AI" provides access to various Contextual AI tools, including parsing capabilities. Specifically, the "Parser" resource with the "Parse Result" operation allows users to retrieve the results of a previously submitted parse job by its Job ID. This is useful in scenarios where you have sent documents or data for parsing and want to fetch the processed output in different formats.
Practical examples include:
- Retrieving parsed document content as a markdown document for easy viewing or further processing.
- Getting parsed content split per page either as markdown or as blocks, which can be useful for page-wise analysis or display.
- Integrating with automated workflows that require extracting structured information from documents asynchronously.
Properties
| Name | Meaning |
|---|---|
| Job ID | The unique identifier of the parse job whose results you want to retrieve. |
| Output Types | Comma-separated list specifying the desired output format(s). Options: |
| - markdown-document | |
| - markdown-per-page | |
| - blocks-per-page | |
| Authentication | Method of authentication to use. Currently supports: |
| - API Key |
Output
The node outputs JSON data representing the parsed results of the specified job. Depending on the selected output types, this may include:
- A full markdown document representing the parsed content.
- Markdown content segmented per page.
- Blocks of parsed content per page, potentially structured for more granular processing.
If binary data is returned (not explicitly shown in the code), it would typically represent file contents such as documents or images related to the parsing result.
Dependencies
- Requires an API key credential for authenticating requests to the Contextual AI service.
- The node depends on internal routing logic (
resourceRouter) to handle different resources and operations. - No additional external dependencies are indicated in the provided source.
Troubleshooting
Common issues:
- Invalid or missing Job ID will likely cause errors or empty results.
- Incorrect output type strings may lead to unexpected output or errors.
- Authentication failures if the API key is invalid or missing.
Error messages:
- Errors related to job retrieval usually indicate the job does not exist or has expired.
- Authentication errors suggest checking the API key configuration.
Resolutions:
- Verify the Job ID is correct and corresponds to an existing parse job.
- Ensure output types are correctly formatted and supported.
- Confirm the API key credential is properly set up and valid.
Links and References
- Contextual AI official documentation (hypothetical link)
- n8n documentation on creating custom nodes
- Markdown formatting references for output handling