Socket
Book a DemoInstallSign in
Socket

n8n-nodes-puter-ai

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n8n-nodes-puter-ai

Advanced n8n node for Puter.js AI with RAG agentic capabilities, document processing, audio transcription, Supabase integration, and cost-optimized model priorities

2.0.4
latest
Source
npmnpm
Version published
Weekly downloads
16
-11.11%
Maintainers
1
Weekly downloads
 
Created
Source

n8n-nodes-puter-ai v2.0.0 🚀

An advanced n8n community node for Puter.js AI with RAG agentic capabilities, document processing, Supabase integration, and cost-optimized model selection.

🌟 New in v2.0.0

🤖 Agentic RAG: Intelligent document-based reasoning and synthesis 📄 Document Processing: Auto-detect and process files from Telegram/other sources 🗄️ Supabase Integration: Vector storage with pgvector for semantic search 💰 Cost Optimization: Starting from $0.10 with google/gemma-2-27b-it 🔍 Vector Search: Semantic document search with similarity scoring 📱 Auto-Detection: Automatically process documents from input data

🚀 Features

🤖 AI Operations

  • Chat Completion: Standard AI chat with cost-optimized models
  • RAG Chat: Enhanced responses with document context
  • Agentic RAG: Intelligent document-based reasoning
  • Vector Search: Semantic document search

📄 Document Processing

  • Multi-Format Support: PDF, DOCX, TXT, MD files
  • Auto-Detection: Process files from Telegram/other sources
  • Text Extraction: Advanced content parsing
  • Vector Embeddings: Generate embeddings for semantic search

🗄️ Database Integration

  • Supabase Integration: Vector storage with pgvector
  • Document Storage: Organized with metadata and tags
  • Similarity Search: Fast vector-based retrieval
  • Auto-Indexing: Automatic embedding generation

💰 Cost Optimization

  • google/gemma-2-27b-it: $0.10 (most cost-effective)
  • gemini-1.5-flash: $0.225
  • gemini-2.0-flash: $0.30
  • gpt-4o-mini: $0.375
  • Smart Fallback: Automatic model switching

🔐 Account Management

  • Multiple Account Fallback: Primary + 2 fallback accounts
  • Smart Strategies: Sequential or random selection
  • Enhanced Tracking: Monitor costs and usage across accounts
  • Robust Error Handling: Comprehensive retry logic

Installation

  • Go to Settings > Community Nodes in your n8n instance
  • Select Install a community node
  • Enter n8n-nodes-puter-ai
  • Click Install

Manual Installation

# In your n8n root folder
npm install n8n-nodes-puter-ai@2.0.0

🎯 Operations

1. Document Processing

Process and store documents for RAG functionality:

  • File Upload: Process files from Telegram or other sources
  • Text Content: Process raw text content
  • URL/Link: Download and process documents from URLs
  • Auto-Storage: Automatically store in Supabase with embeddings

Search documents by semantic similarity:

  • Natural Language Queries: Search using plain English
  • Similarity Scoring: Get relevance scores for results
  • Configurable Results: Control number of documents returned
  • Fast Retrieval: Optimized vector search with HNSW indexing

3. Agentic RAG

Intelligent document-based reasoning:

  • Context Building: Automatically retrieve relevant documents
  • Multi-Source Synthesis: Combine information from multiple documents
  • Citation Support: Track which documents were used
  • Intelligent Responses: AI reasoning over document context

4. Chat Completion

Standard AI chat with cost optimization:

  • Cost-Optimized Models: Automatic selection of cheapest effective model
  • Model Fallback: Try alternative models if primary fails
  • Account Fallback: Switch accounts automatically
  • Usage Tracking: Monitor costs and token consumption

5. RAG Chat

Enhanced chat with document context:

  • Context Integration: Include relevant documents in responses
  • Smart Retrieval: Automatically find related content
  • Enhanced Accuracy: More accurate responses with document backing
  • Flexible Context: Control how much context to include

Configuration

1. Supabase Setup (Required for RAG)

  • Create Supabase Project: Go to supabase.com and create a new project
  • Enable Vector Extension: Run the provided supabase-setup.sql script in your SQL editor
  • Configure Supabase Credentials in n8n:
    • Supabase URL: https://your-project.supabase.co
    • Anon Key: Your public anon key
    • Service Role Key: Your service role key (for admin operations)
    • Enable Vector Storage: ✅ True
    • Documents Table: documents
    • Embeddings Table: document_embeddings
    • Vector Dimension: 1536
    • Similarity Threshold: 0.7
    • Max Documents Retrieved: 5

2. Puter AI Credentials

  • Go to Credentials in your n8n instance
  • Click Add Credential
  • Search for Puter AI API
  • Configure with cost-optimized model priorities:
    • Primary Account: Your main Puter.js username/password
    • Primary Models: google/gemma-2-27b-it, gemini-1.5-flash, gemini-2.0-flash, gpt-4o-mini
    • Fallback Account 1: Backup username/password
    • Fallback 1 Models: gemini-1.5-flash, gpt-4o-mini, gemini-2.0-flash
    • Fallback Account 2: Second backup username/password
    • Fallback 2 Models: google/gemma-2-27b-it, gemini-1.5-flash
    • Enable Auto Fallback: ✅ True
    • Fallback Strategy: Sequential (recommended)

2. Add the Node

  • In your workflow, click Add Node
  • Search for Puter AI
  • Configure the node parameters

Node Parameters

Operation

  • Chat Completion: Standard AI chat with cost optimization
  • RAG Chat: Chat with document context for enhanced responses
  • Document Processing: Process and store documents for RAG
  • Vector Search: Search documents by semantic similarity
  • Agentic RAG: Intelligent document-based reasoning

Model Strategy

  • Use Credential Priority (Recommended): Uses cost-optimized model order from credentials
  • Override with Specific Model: Choose a specific model
  • Auto (Smart Selection): Automatically select best model

Cost-Optimized Models (by price)

  • google/gemma-2-27b-it ($0.10): Most cost-effective
  • gemini-1.5-flash ($0.225): Good balance of cost/performance
  • gemini-2.0-flash ($0.30): Latest Gemini model
  • gpt-5-nano ($0.35): Ultra-low-cost tier
  • gpt-4o-mini ($0.375): OpenAI's efficient model
  • o4-mini (~$0.40): Balanced performance
  • gpt-4.1-nano (~$0.45): Advanced reasoning at low cost
  • meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo ($0.88): Open-source option
  • Auto (Smart Selection): Automatically selects the best available model

Response Format

  • Simple Text: Just the AI response
  • Formatted with Metadata: Includes model, usage, and timing info
  • Telegram Ready: Pre-formatted for Telegram bots with emojis and styling
  • Raw Response: Complete API response

Usage Examples

Basic Chat

{
  "operation": "chatCompletion",
  "model": "gpt-4o",
  "message": "Hello, how are you?",
  "responseFormat": "simple"
}

RAG-Enhanced Chat

{
  "operation": "ragChat",
  "model": "claude-3-5-sonnet",
  "message": "What are the legal requirements?",
  "ragContext": "Legal document content here...",
  "responseFormat": "formatted"
}

Telegram Bot Integration

{
  "operation": "chatCompletion",
  "model": "auto",
  "message": "{{$json.message.text}}",
  "responseFormat": "telegram"
}

Error Handling

The node automatically handles:

  • Authentication failures: Retries with fresh tokens
  • Rate limits: Switches to fallback account
  • Model unavailability: Tries alternative models
  • Usage limits: Seamlessly switches accounts

Fallback Logic

  • Primary Account: Attempts request with main account
  • Account Fallback: On 400 errors, switches to fallback account
  • Model Fallback: If model fails, tries alternatives in priority order:
    • o3 → o1-pro → gpt-4o → claude-3-5-sonnet → o1 → gpt-4o-mini → gemini-2.0-flash

License

MIT

Support

For issues and feature requests, please visit: GitHub Repository

Keywords

n8n-community-node-package

FAQs

Package last updated on 11 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.