Package Information
Downloads: 0 weeklyĀ /Ā 23 monthly
Latest Version: 0.1.8
Author: Keywords AI
Available Nodes
Documentation
Keywords AI Node for n8n
A custom n8n node for integrating Keywords AI's LLM Gateway and Prompt Management features into your n8n workflows.
Features
- š Gateway (Standard): Make direct LLM calls with custom messages
- š Gateway with Prompt: Use managed prompts from Keywords AI
- š Auto-populated Variables: Automatically fetch variable names from your prompts
- š Dynamic Version Selection: Choose from live, draft, or specific prompt versions
- š Secure Authentication: API key-based authentication
- šÆ AI-Ready: Works as an AI tool in n8n workflows
Installation
Prerequisites
- Node.js v18 or higher
- npm or yarn
- Keywords AI API Key (Get one here)
Fresh Installation
Clone the repository:
git clone <your-repo-url> cd n8n-keywordsaiInstall dependencies:
npm installBuild the node:
npm run buildLink to n8n:
# Link the package globally npm link # Create n8n custom directory if it doesn't exist mkdir -p ~/.n8n/custom cd ~/.n8n/custom # Initialize if package.json doesn't exist npm init -y # Link the Keywords AI node npm link n8n-nodes-keywordsaiStart n8n:
npx n8n startAccess n8n:
Open http://localhost:5678 in your browser
Usage
Setup Credentials
- In n8n, go to Settings ā Credentials
- Click + Add Credential
- Search for "Keywords AI"
- Enter your API Key
- Click Test to verify
- Click Save
Gateway (Standard)
Direct LLM calls without using saved prompts:
- Add Keywords AI node to your workflow
- Select "Gateway (Standard)"
- Configure:
- Model:
gpt-4o-mini(or any supported model) - System Message: Your system prompt
- Messages: Add user/assistant messages
- Model:
- Execute the node
Gateway with Prompt
Use your managed prompts from Keywords AI:
- Add Keywords AI node to your workflow
- Select "Gateway with Prompt"
- Configure:
- Prompt Name or ID: Select from dropdown (auto-populated)
- Version: Choose version (auto-populated)
- Variables: Fill in values (names auto-populated from prompt)
- Execute the node
Observability & Tracking
Track and monitor your LLM calls with built-in observability parameters:
- Metadata: Custom key-value pairs for reference
- Custom Identifier: Fast, indexed tags for log filtering
- Customer Identifier: Track per-user usage and costs
- Customer Params: Detailed user info with budget tracking
- Request Breakdown: Get metrics (tokens, cost, latency) in response
See OBSERVABILITY_GUIDE.md for detailed documentation.
Example Workflow
Manual Trigger ā Keywords AI ā Send Email
Development
Project Structure
n8n-keywordsai/
āāā nodes/
ā āāā KeywordsAi/
ā āāā KeywordsAi.node.ts # Main node logic
ā āāā KeywordsAi.node.json # Node metadata
āāā credentials/
ā āāā KeywordsAIApi.credentials.ts # Credentials definition
āāā icons/
ā āāā keywordsai.svg # Light theme icon
ā āāā keywordsai.dark.svg # Dark theme icon
āāā dist/ # Compiled output (gitignored)
āāā package.json
āāā README.md
Build Commands
# Build the node
npm run build
# Lint the code
npm run lint
# Auto-fix linting issues
npm run lint:fix
# Watch mode (development)
npm run watch
Making Changes
- Make your changes to the TypeScript files
- Build:
npm run build - Restart n8n to see changes
Clean Reinstall
If you need to start fresh:
# In the project directory
cd /path/to/n8n-keywordsai
# Remove build artifacts and dependencies
rm -rf dist node_modules package-lock.json
# Clear npm cache
npm cache clean --force
# Reinstall
npm install
# Rebuild
npm run build
# Relink
npm link
cd ~/.n8n/custom
npm link n8n-nodes-keywordsai
# Restart n8n
npx n8n start
API Reference
This node uses the following Keywords AI API endpoints:
GET /api/prompts/- List all promptsGET /api/prompts/<prompt_id>/versions/- List prompt versionsGET /api/prompts/<prompt_id>/versions/<version>/- Get specific versionPOST /api/chat/completions- Make LLM calls
Troubleshooting
Node not showing in n8n
- Ensure the node is built:
npm run build - Check the link:
cd ~/.n8n/custom && npm list n8n-nodes-keywordsai - Clear n8n cache:
rm -rf ~/.n8n/cache - Restart n8n
Variables not loading
Make sure you select:
- A Prompt first
- Then a Version
Variables load after version selection.
Build errors
# Clean everything and rebuild
rm -rf dist node_modules
npm install
npm run build
npm cache issues
npm cache clean --force
rm -rf ~/.npm/_npx
Documentation
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
[Your License Here]
Support
For issues and questions:
- Keywords AI: support@keywordsai.co
- GitHub Issues: Create an issue
Credits
Built with ā¤ļø for the n8n and Keywords AI communities.