Overview
n8n is a popular open-source automation platform, and connecting it to Scavio's MCP server unlocks search-powered workflows without writing custom code. This workflow shows how to set up an n8n cron trigger that calls Scavio MCP search daily, processes the results with n8n's built-in nodes, and routes data to Google Sheets, Slack, or any other n8n-supported destination. The code examples show the HTTP Request node configuration for both the search API and the MCP endpoint.
Trigger
n8n cron trigger (configurable schedule)
Schedule
Daily (configurable in n8n)
Workflow Steps
Configure n8n Cron Trigger
Set up the n8n cron node to fire at your desired schedule (default: daily at 8 AM).
Set Up HTTP Request to Scavio
Configure the n8n HTTP Request node to call Scavio search API or MCP endpoint with your API key.
Parse Search Results
Use n8n's Set or Function node to extract titles, URLs, snippets, and prices from the response.
Filter and Transform Data
Apply n8n IF or Switch nodes to filter results by relevance, price range, or other criteria.
Route to Destination
Send processed data to Google Sheets, Slack, Airtable, or any n8n-supported output node.
Python Implementation
import requests, os, json
# This Python script replicates what the n8n workflow does,
# useful for testing the API call before configuring n8n nodes.
API_KEY = os.environ["SCAVIO_API_KEY"]
# Option 1: Direct search API (simpler)
def search_direct(query: str, platform: str = "google") -> dict:
resp = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
json={"query": query, "platform": platform},
timeout=15,
)
resp.raise_for_status()
return resp.json()
# Option 2: MCP endpoint (for MCP-compatible tools)
def search_mcp(query: str) -> dict:
resp = requests.post(
"https://mcp.scavio.dev/mcp",
headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
json={
"jsonrpc": "2.0", "id": 1,
"method": "tools/call",
"params": {"name": "search", "arguments": {"query": query, "country_code": "us"}},
},
timeout=15,
)
return resp.json().get("result", {})
# n8n HTTP Request node configuration (for reference):
# Method: POST
# URL: https://api.scavio.dev/api/v1/search
# Headers: x-api-key = {{$env.SCAVIO_API_KEY}}
# Body (JSON): {"query": "{{$json.search_term}}", "platform": "google"}
queries = ["best project management tools 2026", "remote work software trends"]
for q in queries:
data = search_direct(q)
results = data.get("organic", [])[:5]
print(f"Query: {q}")
for r in results:
print(f" {r.get('title', '')} - {r.get('url', '')}")JavaScript Implementation
const API_KEY = process.env.SCAVIO_API_KEY;
// Option 1: Direct search API
async function searchDirect(query, platform='google') {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method:'POST',
headers:{'x-api-key':API_KEY, 'Content-Type':'application/json'},
body:JSON.stringify({query, platform}),
});
return r.json();
}
// Option 2: MCP endpoint
async function searchMcp(query) {
const r = await fetch('https://mcp.scavio.dev/mcp', {
method:'POST',
headers:{'Authorization':'Bearer '+API_KEY, 'Content-Type':'application/json'},
body:JSON.stringify({jsonrpc:'2.0', id:1, method:'tools/call', params:{name:'search', arguments:{query, country_code:'us'}}}),
});
return (await r.json()).result || {};
}
// n8n Function node example: transform Scavio results for Google Sheets
function transformForSheets(results) {
return results.map((r,i) => ({position:i+1, title:r.title||'', url:r.url||'', snippet:r.snippet||''}));
}
const queries = ['best project management tools 2026', 'remote work software trends'];
for (const q of queries) {
const data = await searchDirect(q);
const rows = transformForSheets((data.organic || []).slice(0,5));
console.log('Query: '+q);
rows.forEach(r => console.log(' '+r.position+'. '+r.title+' - '+r.url));
}Platforms Used
Web search with knowledge graph, PAA, and AI overviews