n8n is a workflow automation platform that makes it easy to connect APIs, schedule tasks, and process data without writing full applications. This tutorial builds an n8n workflow that runs a daily search across Google, Reddit, and YouTube using Scavio's API, processes the results, and delivers them to Slack or email. The self-hosted version of n8n is free with unlimited executions.
Prerequisites
- n8n installed (self-hosted or cloud)
- A Scavio API key from scavio.dev
- Basic familiarity with n8n's visual workflow editor
Walkthrough
Step 1: Create a new workflow with a schedule trigger
Start a new workflow and add a Schedule Trigger node set to run daily at your preferred time.
// Schedule Trigger node settings:
// Trigger interval: Every day
// Hour: 8
// Minute: 0
// Timezone: your local timezoneStep 2: Add an HTTP Request node for Scavio search
Add an HTTP Request node that calls Scavio's search endpoint.
// HTTP Request node settings:
// Method: POST
// URL: https://api.scavio.dev/api/v1/search
// Authentication: Header Auth
// Header Name: x-api-key
// Header Value: your_scavio_api_key
// Body Content Type: JSON
// Body: {
// "platform": "google",
// "query": "your search query here"
// }Step 3: Parse and format results
Add a Code node to extract and format the search results.
// Code node (JavaScript):
const results = $input.all()[0].json.organic || [];
return results.slice(0, 5).map(r => ({
json: {
title: r.title,
url: r.link,
snippet: r.snippet,
position: r.position
}
}));Step 4: Deliver results to Slack or email
Add a Slack or Email node to send the formatted results.
// Slack node settings:
// Channel: #search-results
// Text: {{$json.title}} - {{$json.url}}
//
// Or Email node:
// To: your@email.com
// Subject: Daily Search Report
// Body: formatted HTML table of resultsPython Example
# Equivalent Python script for n8n HTTP Request:
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
def n8n_search(query, platform='google'):
resp = requests.post('https://api.scavio.dev/api/v1/search',
headers=H, json={'platform': platform, 'query': query}, timeout=10)
return [{'title': r['title'], 'url': r['link'], 'snippet': r['snippet']}
for r in resp.json().get('organic', [])[:5]]JavaScript Example
// n8n Code node example:
const results = $input.all()[0].json.organic || [];
return results.slice(0, 5).map(r => ({
json: { title: r.title, url: r.link, snippet: r.snippet }
}));Expected Output
A daily n8n workflow that searches via Scavio and delivers formatted results to Slack or email.