Overview
The ChatAds n8n node lets you add affiliate links to your automated workflows. Use it with chatbots, email automations, content generation, and any workflow that processes user messages.Installation
Option 1: npm (Recommended)
Option 2: Manual Installation
- Download the node package
- Copy to your n8n custom nodes directory (
~/.n8n/custom/) - Restart n8n
Configuration
Credentials Setup
- In n8n, go to Credentials → New
- Search for “ChatAds API”
- Enter your credentials:
| Field | Value |
|---|---|
| API Key | Your key from getchatads.com |
| Base URL | https://api.getchatads.com |
Node Parameters
Required
The user message to analyze. Must be 1-5000 characters.
Optional
IPv4/IPv6 address for country detection (max 45 characters).
Country code (e.g., ‘US’). If provided, skips IP-based country detection.
Variable for playing around with keyword quality, link accuracy, and response times. ‘fast’ = quickest, but less likely to find a working affiliate link (~150ms), ‘standard’ = strong keyword quality and decent link matching (~1.4s), ‘best’ = strong keyword and strong matching (~2.5s).
Advanced Settings
API endpoint path (for custom deployments).
Maximum parallel requests (1-50). Increase for high-throughput workflows.
HTTP request timeout in seconds (5-300).
Input Modes
The node supports two input modes:GUI Mode (Default)
Configure each parameter individually using n8n’s form interface. Good for simple workflows and visual configuration.JSON Mode
Pass a complete request payload as JSON. Enable by toggling “JSON Parameters” in the node settings:- Dynamic payloads from expressions
- Complex configurations
- Copying requests from API Explorer
Response
The node outputs the full ChatAds API response:Workflow Examples
AI Chatbot with Affiliates
Add affiliate links to AI responses:Email Product Mentions
Scan emails for product mentions:Content Generation Pipeline
Enrich generated content with affiliate links:Error Handling
Enable “Continue on Fail” to handle errors gracefully:- Click the ChatAds node
- Go to Settings
- Enable Continue on Fail
Best Practices
Use expressions for dynamic messages
Handle no-match cases
Always check
data.returned > 0 before using affiliate data. Design workflows for both matched and unmatched scenarios.Set appropriate concurrency
Increase
maxConcurrency for batch processing. Keep it low (4-8) for real-time chatbots.Monitor usage
Check
meta.usage in responses to track quota consumption.Troubleshooting
Node Not Appearing
- Ensure the package is installed:
npm list n8n-nodes-chatads - Restart n8n completely (not just refresh)
- Check n8n logs for load errors
Authentication Errors
- Verify API key starts with
cak_ - Check credentials are saved (not just entered)
- Test key with curl first
Timeout Errors
IncreasetimeoutSeconds in Advanced Settings for:
- Complex queries with
thoroughanalysis - Network latency issues
- High-traffic periods
Rate Limit Errors
- Lower
maxConcurrencyto spread requests - Add a Wait node between batches
- Upgrade plan for higher limits