Package Information
Documentation
n8n LlamaCloud Nodes
This repository contains custom n8n nodes for integrating with LlamaCloud, providing powerful document processing and retrieval capabilities within your n8n workflows.
🚀 Features
This package includes three custom nodes:
📄 LlamaParse
- Parse PDF files and extract their content in markdown format
- Uses LlamaCloud's document parsing capabilities
- Perfect for document preprocessing workflows
🔍 LlamaExtract
- Extract structured data from files using LlamaCloud extraction agents
- Get elegant, structured information from documents
- Ideal for data extraction and analysis workflows
💬 LlamaCloud
- Retrieve context from your LlamaCloud indexes
- Chat with your indexed documents
- Great for building RAG (Retrieval-Augmented Generation) applications
📋 Prerequisites
Before using these nodes, you need:
Node.js and npm (Minimum version Node 20)
You can find instructions on how to install both using
nvm (Node Version Manager) for Linux, Mac, and WSL here. For
Windows users, refer to Microsoft's guide to Install NodeJS on Windows.n8n installed globally
npm install n8n -gLlamaCloud API Key
- Sign up at cloud.llamaindex.ai
- Get your API key from the dashboard
🛠️ Installation
Option 1: Local Development (Recommended)
Clone this repository
git clone https://github.com/run-llama/n8n-llamacloud.git cd n8n-llamacloudInstall dependencies
npm installBuild the nodes and publish locally
npm run build npm linkLink to n8n custom nodes directory
# Create custom nodes directory if it doesn't exist mkdir -p ~/.n8n/custom npm link n8n-llamacloudRestart n8n
n8n stop n8n start
Option 2: Global Installation
Install globally
npm install -g n8n-llamacloud npm linkRestart n8n
n8n stop n8n start
🔧 Setup
1. Configure LlamaCloud Credentials
- Open n8n in your browser (usually
http://localhost:5678) - Go to Settings → Credentials
- Click Add Credential
- Search for "LlamaCloud API Key"
- Enter your LlamaCloud API key
- Test the connection and save
2. Create LlamaCloud Indexes (for LlamaCloud node)
- Go to cloud.llamaindex.ai
- Create a new project
- Upload documents to create an index
- Note the index name for use in the LlamaCloud node
📚 Resources
📖 Usage Examples
Example 1: Document Processing Pipeline
graph LR
A[PDF File] --> B[LlamaParse]
B --> C[LlamaExtract]
C --> D[Structured Data]
Workflow:
- LlamaParse node: Parse a PDF file to markdown
- LlamaExtract node: Extract structured data using an extraction agent
- Use the structured data in subsequent nodes
Example 2: RAG Chat Application
graph LR
A[User Query] --> B[LlamaCloud]
B --> C[Retrieved Context]
C --> D[AI Response]
Workflow:
- HTTP Request node: Receive user query
- LlamaCloud node: Retrieve relevant context from your index
- OpenAI node: Generate response using the retrieved context
Example 3: Document Analysis
graph LR
A[Document] --> B[LlamaParse]
B --> C[LlamaExtract]
C --> D[Analysis Results]
Workflow:
- LlamaParse node: Convert document to markdown
- LlamaExtract node: Extract specific information (e.g., dates, amounts, entities)
- Code node: Process and analyze the extracted data
🔍 Node Details
LlamaParse Node
Purpose: Parse PDF files and extract content in markdown format
Parameters:
- File Path (required): Path to the PDF file to parse
- Example:
/Users/username/Documents/document.pdf
- Example:
Output: Markdown content of the parsed document
LlamaExtract Node
Purpose: Extract structured data from files using LlamaCloud extraction agents
Parameters:
- Agent ID (required): The ID of your LlamaCloud extraction agent
- File Path (required): Path to the file to extract data from
Output: Structured data based on your extraction agent's configuration
LlamaCloud Node
Purpose: Retrieve context from your LlamaCloud indexes
Parameters:
- Index Name (required): Name of your LlamaCloud index
- Chat Input (from previous node): The query to search for in your index
Output: Retrieved context from your index