Package Information
Documentation
n8n-nodes-devana
Connect your n8n workflows to Devana AI's powerful RAG and Agentic AI capabilities. Build intelligent automation with access to your knowledge base, documents, and AI agents.
β¨ Features
- π€ Dynamic Agent Selection - Dropdown list with searchable agent picker
- π Rich Metadata Output - Separate outputs for response and metadata (tokens, sources, scores)
- π― JSON Mode Support - Get structured JSON responses automatically parsed
- π Dual Outputs - Response on first output, metadata & sources on second output
- π Multi-language Support - 10+ languages including EN, FR, ES, DE, IT, PT, ZH, AR, HI, ID
- π File Attachments - Upload and attach files to conversations
- π¬ Conversation Management - Continue existing conversations with context
- π¨ Custom Parameters - Stop sequences, custom metadata, identity override, hidden mode
π Installation
Via n8n Community Nodes (Recommended)
- Open your n8n instance
- Go to Settings β Community Nodes
- Click Install
- Enter
n8n-nodes-devana - Click Install
Via npm
npm install n8n-nodes-devana
Then restart n8n.
π Credentials Setup
- In n8n, go to Credentials β New
- Search for "Devana API"
- Fill in:
- API Key: Your Devana AI API key
- Base URL:
https://api.devana.ai(default)
Getting an API Key
- Log in to Devana AI
- Navigate to your agent settings
- Generate an API key in the "API Access" section
π Resources
Chat
Chat Completion
Send messages to your Devana AI agents and get intelligent responses powered by RAG.
Required Parameters:
- Agent ID (Model): Select from your agents list or enter manually
- Messages: At least one message (role + content)
Optional Parameters:
- Temperature (0-1): Control randomness. Higher = more creative
- Max Tokens: Maximum tokens to generate
- Top P (0-1): Nucleus sampling for diversity control
- Stream: Enable streaming responses
- Conversation ID: Continue an existing conversation
- Language: Response language (en, fr, es, de, it, pt, zh, ar, hi, id)
- Response Format:
text: Plain text response (default)json_object: Structured JSON output (auto-parsed)
- Files: Comma-separated file IDs to attach
- Frequency Penalty (-2 to 2): Reduce repetition
- Presence Penalty (-2 to 2): Encourage new topics
- Stop Sequences: Comma-separated stop sequences
- Metadata: Custom JSON metadata
- Identity: Custom identity override
- Hidden Mode: No tracking mode
Outputs:
- Response: The AI message content
- Metadata & Sources: Usage stats (tokens), sources with RAG scores, finish reason
Agent
Manage your Devana AI agents programmatically.
Operations:
- List: Get all your agents
- Get: Retrieve a specific agent by ID
- Create: Create a new agent
- Update: Update an existing agent
- Delete: Delete an agent
Conversation
Manage conversation history.
Operations:
- Get Messages: Retrieve all messages from a conversation
- Delete: Delete a conversation
File
Upload files to your Devana knowledge base.
Operations:
- Upload: Upload a file from binary data
π‘ Example Workflows
Simple Chat
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Webhook βββββββΆβ Devana βββββββΆβ Response β
β Trigger β β Chat (GPT) β β Format β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
Advanced RAG Workflow
βββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β Manual βββββββΆβ Devana βββββββΆβ Filter by βββββββΆβ Send to β
β Trigger β β (RAG Mode) β β RAG Score β β Slack β
βββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β
β (Metadata Output)
βΌ
ββββββββββββββββ
β Log Tokens β
β & Sources β
ββββββββββββββββ
JSON Mode Example
Set Response Format to "JSON Object" and prompt:
"Return a JSON object with fields: summary, sentiment (positive/negative/neutral), and key_points (array)"
The node will automatically parse the JSON response into an object you can use in subsequent nodes.
π Output Structure
Response Output (Output 1)
{
"message": "The AI response text or parsed JSON object"
}
Metadata Output (Output 2)
{
"usage": {
"prompt_tokens": 150,
"completion_tokens": 85,
"total_tokens": 235
},
"finish_reason": "stop",
"model": "agent_id",
"response_format": "text",
"sources": [
{
"content": "Source content...",
"score": 0.95,
"metadata": {...}
}
],
"score": 0.92
}
π― Use Cases
Customer Support Automation
Email β Devana AI (RAG on knowledge base) β Auto-reply or escalate to human
Content Generation
Trigger β Devana AI (JSON mode) β Parse structured data β Save to database
Document Analysis
Upload file β Devana AI (with file attachment) β Extract insights β Send report
Multi-language Support
Detect language β Devana AI (with lang parameter) β Translate & respond
π§ Advanced Features
Token Usage Tracking
Use the Metadata output to track token consumption:
// In a Code node after Devana
const tokens = $input.item.json.usage.total_tokens;
if (tokens > 1000) {
// Alert or log high usage
}
RAG Score Filtering
Filter responses based on source confidence:
// In a Filter node on Metadata output
const score = $json.score;
return score > 0.8; // Only high-confidence responses
Conversation Threading
Build multi-turn conversations:
// Store conversation_id from first response
// Pass it back in subsequent Devana nodes
π οΈ Development
Build Commands
npm run build # Compile TypeScript
npm run dev # Watch mode for development
npm run format # Format code with Prettier
npm run lint # Check code with ESLint
npm run lintfix # Auto-fix ESLint errors
Project Structure
n8n-nodes-devana/
βββ credentials/
β βββ DevanaApi.credentials.ts # API credentials configuration
βββ nodes/
β βββ Devana/
β βββ Devana.node.ts # Main node implementation
β βββ devana.svg # Node icon
βββ dist/ # Compiled JavaScript (auto-generated)
βββ package.json # Package configuration
βββ tsconfig.json # TypeScript config
βββ README.md # This file
π Resources
- π Website: devana.ai
- π Documentation: docs.devana.ai
- π¬ Support: support@devana.ai
- π Issues: GitHub Issues
- π¦ npm: n8n-nodes-devana
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π License
MIT Β© Devana AI