n8n Integration
n8n is an open-source workflow automation tool that you can self-host or use in the cloud. Perfect for developers who want full control over their automation workflows.Why n8n?
Self-Hosted
Deploy on your own infrastructure for complete control
Open Source
Inspect, modify, and extend the platform
Developer-Friendly
Code nodes, JavaScript expressions, and custom nodes
Fair Pricing
Free self-hosted or affordable cloud plans
Installation
n8n Cloud
Fastest way to get started:- Sign up at n8n.cloud
- Create your first workflow
- No setup required
Self-Hosted (Docker)
Self-Hosted (npm)
For production deployments, see the n8n deployment guide.
Quick Start: FLTR Search Workflow
Step 1: Create New Workflow
- Open n8n interface
- Click New workflow
- Name it “FLTR Knowledge Search”
Step 2: Add HTTP Request Node
- Click + to add node
- Search for HTTP Request
- Configure:
POST
URL: https://api.fltr.com/v1/mcp/query
Authentication: Generic Credential Type → Header Auth
- Name:
Authorization - Value:
Bearer YOUR_API_KEY
Step 3: Test the Node
- Click Execute Node
- View results in the output panel
- Inspect the JSON response
Step 4: Process Results
Add a Code node to transform results:Common Workflows
1. Email to Knowledge Base Search
Nodes:- Email Trigger (IMAP) - Watch inbox
- HTTP Request - FLTR Query
- Code - Format results
- Send Email - Reply with results
2. Slack Q&A Bot
Nodes:- Slack Trigger - New message in channel
- IF - Check if question
- HTTP Request - FLTR Query
- Slack - Post reply
3. Document Indexer Pipeline
Nodes:- Webhook - Receive document
- Code - Extract metadata
- HTTP Request - Upload to FLTR
- Slack - Send notification
4. Customer Support Automation
Nodes:- Webhook Trigger - New support ticket
- HTTP Request - FLTR Query
- Switch - Route by confidence
- Multiple endpoints - Different actions per route
{{ $json.results[0].score >= 0.8 }}
→ Auto-respond with answer
Route 2: {{ $json.results[0].score >= 0.5 && $json.results[0].score < 0.8 }}
→ Create ticket with suggestions
Route 3: {{ $json.results[0].score < 0.5 }}
→ Escalate to human
Advanced Techniques
Using Code Nodes
n8n’s Code node supports full JavaScript: Example: Filter and rank resultsLoop Over Results
Use Split in Batches to process each result:- Add Split in Batches after FLTR query
- Set batch size to 1
- Connect to action node
- Each result processed individually
Error Handling
Add error workflows:- On any node, click Settings (gear icon)
- Enable Continue On Fail
- Add IF node to check for errors
- Route failures to error handler
Scheduling Workflows
Add Schedule Trigger for recurring tasks: Example: Daily document sync- Trigger: Cron -
0 2 * * *(2 AM daily) - Action: Fetch new documents from source
- Upload to FLTR
- Send summary email
Using Credentials
Store API keys securely:- Go to Credentials → New
- Select Header Auth
- Name:
FLTR API Key - Header name:
Authorization - Header value:
Bearer YOUR_API_KEY
- Authentication:
FLTR API Key
All FLTR Endpoints
Query Dataset
Node: HTTP RequestBatch Query
Upload Document
Create Dataset
List Datasets
Expressions and Functions
Accessing Data
String Operations
Array Operations
Math Functions
Rate Limiting
Handle FLTR’s rate limits in n8n:Method 1: Wait Node
Add Wait node between iterations:Method 2: Code Node Delay
Method 3: Error Handling
Webhook Workflows
Create Webhook Endpoint
- Add Webhook node
- Set HTTP Method:
POST - Copy webhook URL
- Configure response
Secure Webhooks
Validate incoming requests:- Add IF node after webhook
- Check secret header:
- Route invalid requests to error response
Production Best Practices
1. Use Environments
Set environment variables:2. Enable Execution Data
Keep execution history: Settings → Workflow Settings:- Save execution progress: Yes
- Save manual executions: Yes
- Save error executions: Yes
3. Add Monitoring
Create monitoring workflow:- Trigger: Schedule (every 5 minutes)
- Check: Last execution status
- Alert: Send notification if failed
4. Optimize Performance
- Use Merge nodes to combine data
- Enable Continue On Fail for non-critical nodes
- Use Split in Batches for large datasets
- Cache results with Set node
Complete Example: Support Ticket System
Here’s a production-ready workflow: Node 1: Webhook{{ $json.results[0].score >= 0.8 }}
Route 2: {{ $json.results[0].score >= 0.5 }}
Route 3: {{ $json.results[0].score < 0.5 }}
Node 5a: Auto-Response Email
Resources
n8n Documentation
Official n8n docs
FLTR API Reference
Complete API documentation
n8n Community
Get help from the community
Deployment Guide
Self-host n8n in production
Next Steps
- Set up webhooks for real-time events
- Compare with Zapier or Make
- Explore API authentication options