Overview
The LlamaExtract node enables users to extract structured content from files using LlamaExtract agents. It is designed to process files by sending them to an external extraction service identified by an agent ID, which then returns elegant, structured information extracted from the file's contents.
This node is beneficial in scenarios where automated data extraction from documents such as PDFs, images, or other file types is required. For example, it can be used to extract invoice details, contracts, reports, or any document data that needs to be parsed and transformed into structured JSON for further automation workflows.
Properties
| Name | Meaning |
|---|---|
| Agent ID | The unique identifier of the extraction agent that will process the file. |
| File Path | The local path to the file from which data should be extracted (e.g., /User/user/Desktop/file.pdf). |
Output
The node outputs a JSON array where each element corresponds to the extracted data from one input item. The structure of each JSON object depends on the response returned by the external extraction service and typically contains the elegantly structured information parsed from the file.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the external LlamaExtract service.
- The node depends on an external utility function (
extractDataFromFile) that handles the actual communication with the extraction service. - Users must provide valid file paths accessible to the n8n environment.
- Proper configuration of the API key credential within n8n is necessary for successful operation.
Troubleshooting
- Common Issues:
- Invalid or missing API key credential will cause authentication failures.
- Incorrect or inaccessible file paths will result in file not found errors.
- Using an invalid or expired agent ID may lead to extraction failures or empty results.
- Error Messages:
- Authentication errors typically indicate issues with the provided API key; verify and update credentials.
- File access errors suggest checking the file path and permissions.
- Extraction errors might require verifying the agent ID and ensuring the external service is operational.
Links and References
- LlamaExtract Service Documentation (replace with actual URL if available)
- n8n Documentation on Creating Custom Nodes