n8n-nodes-devana
v1.5.0
Published
n8n node for Devana AI API
Maintainers
Readme
n8n-nodes-devana
Powerful AI workflows with Devana AI in n8n
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-devanaThen 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 humanContent Generation
Trigger → Devana AI (JSON mode) → Parse structured data → Save to databaseDocument Analysis
Upload file → Devana AI (with file attachment) → Extract insights → Send reportMulti-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 responsesConversation 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 errorsProject 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: [email protected]
- 🐛 Issues: GitHub Issues
- 📦 npm: n8n-nodes-devana
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
MIT © Devana AI
