Auto backup: 2026-02-17 18:00
This commit is contained in:
105
automations/morning-briefing/README.md
Normal file
105
automations/morning-briefing/README.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Morning Intelligence Briefing - n8n Workflow
|
||||
|
||||
## 📁 Files
|
||||
|
||||
1. **n8n-workflow.json** - Full workflow (requires credentials)
|
||||
2. **n8n-workflow-simple.json** - Simpler version (fewer dependencies)
|
||||
|
||||
## 🚀 Setup Instructions
|
||||
|
||||
### Step 1: Import to n8n
|
||||
1. Open your n8n: https://n8n.kangaroo-eel.ts.net
|
||||
2. Go to **Workflows** → **Import from File**
|
||||
3. Select `n8n-workflow.json`
|
||||
|
||||
### Step 2: Configure Credentials
|
||||
|
||||
You'll need to create these credentials in n8n:
|
||||
|
||||
#### A. FreshRSS (HTTP Basic Auth)
|
||||
- **Name**: FreshRSS Credentials
|
||||
- **Username**: Anthony
|
||||
- **Password**: RecOvery2026!
|
||||
|
||||
#### B. Perplexity (HTTP Header Auth)
|
||||
- **Name**: Perplexity API
|
||||
- **Header Name**: Authorization
|
||||
- **Header Value**: Bearer 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
|
||||
|
||||
#### C. Telegram Bot
|
||||
- **Name**: Telegram Bot
|
||||
- **Access Token**: (Your bot token - I can help get this)
|
||||
|
||||
### Step 3: Test
|
||||
1. Click **Execute Workflow**
|
||||
2. Check if you receive a Telegram message
|
||||
|
||||
### Step 4: Activate
|
||||
1. Toggle **Active** switch
|
||||
2. Workflow runs daily at 6:00 AM (Perth time)
|
||||
|
||||
## 🔧 What It Does
|
||||
|
||||
```
|
||||
6:00 AM Trigger
|
||||
↓
|
||||
Fetch FreshRSS (your RSS feeds)
|
||||
↓
|
||||
Fetch News Aggregator (HN, GitHub, Product Hunt, etc.)
|
||||
↓
|
||||
Query Perplexity AI ("Today's top news")
|
||||
↓
|
||||
Combine all sources
|
||||
↓
|
||||
AI Deduplication & Summarization
|
||||
↓
|
||||
Telegram to You (5-7 key stories)
|
||||
```
|
||||
|
||||
## 📱 Expected Output Example
|
||||
|
||||
```
|
||||
🌅 Morning Intelligence Briefing
|
||||
|
||||
1. 🔥 OpenAI announces GPT-5...
|
||||
2. 💰 Tech stocks rally...
|
||||
3. 🚀 New AI tool from...
|
||||
4. 📰 Major news from...
|
||||
5. 💡 Innovation in...
|
||||
|
||||
---
|
||||
Sources: FreshRSS, News Aggregator, Perplexity AI
|
||||
```
|
||||
|
||||
## ⚠️ Troubleshooting
|
||||
|
||||
**Issue**: FreshRSS authentication fails
|
||||
**Fix**: Check API password in FreshRSS → Settings → Profile → API Management
|
||||
|
||||
**Issue**: News Aggregator fails
|
||||
**Fix**: Ensure Python venv exists at `/skills/news-aggregator-skill/.venv`
|
||||
|
||||
**Issue**: Telegram not received
|
||||
**Fix**: Check bot token and chat ID (1793951355)
|
||||
|
||||
## 🎨 Customization
|
||||
|
||||
### Change time:
|
||||
Edit "6 AM Daily" node → Change trigger time
|
||||
|
||||
### Add more sources:
|
||||
Add HTTP Request nodes for additional APIs
|
||||
|
||||
### Change summary style:
|
||||
Edit "AI Summarize" system prompt
|
||||
|
||||
### Filter categories:
|
||||
Add Code node to filter FreshRSS by category
|
||||
|
||||
## 📞 Support
|
||||
|
||||
Need help? Ask me to:
|
||||
- Debug credential issues
|
||||
- Customize the workflow
|
||||
- Add more news sources
|
||||
- Change the schedule
|
||||
15
automations/morning-briefing/morning-briefing.sh
Normal file
15
automations/morning-briefing/morning-briefing.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Morning Briefing - Premium Version
|
||||
# Calls OpenClaw agent to generate comprehensive briefing
|
||||
|
||||
set -e
|
||||
|
||||
echo "🌅 Morning Briefing Generator" >&2
|
||||
echo "============================" >&2
|
||||
|
||||
# Get weather
|
||||
WEATHER=$(curl -s "wttr.in/Perth?format=%l:+%c+%t+%h+wind:%w" 2>/dev/null || echo "Weather unavailable")
|
||||
echo "Weather: $WEATHER" >&2
|
||||
|
||||
# Output just the weather for now - the agent will build the full briefing
|
||||
echo "WEATHER=$WEATHER"
|
||||
208
automations/morning-briefing/n8n-workflow.json
Normal file
208
automations/morning-briefing/n8n-workflow.json
Normal file
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"name": "Morning Intelligence Briefing",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "hours",
|
||||
"hoursInterval": 24,
|
||||
"triggerAtHour": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "cron-trigger",
|
||||
"name": "6 AM Daily",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [250, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "http://freshrss.kangaroo-eel.ts.net/api/greader.php/reader/api/0/stream/items/ids",
|
||||
"sendQuery": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "output",
|
||||
"value": "json"
|
||||
},
|
||||
{
|
||||
"name": "n",
|
||||
"value": "20"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "freshrss-fetch",
|
||||
"name": "Fetch FreshRSS",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.1,
|
||||
"position": [450, 200],
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "freshrss-creds",
|
||||
"name": "FreshRSS Credentials"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"command": "cd /home/openclaw/.openclaw/workspace/skills/news-aggregator-skill && .venv/bin/python scripts/fetch_news.py --source all --limit 15"
|
||||
},
|
||||
"id": "news-aggregator",
|
||||
"name": "News Aggregator",
|
||||
"type": "n8n-nodes-base.executeCommand",
|
||||
"typeVersion": 1,
|
||||
"position": [450, 400]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"model": "llama-3.1-sonar-large-128k-online",
|
||||
"messages": {
|
||||
"message": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "What are the top 5 tech, AI, and business news stories from today?"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "perplexity-search",
|
||||
"name": "Perplexity Search",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.1,
|
||||
"position": [650, 300],
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "perplexity-creds",
|
||||
"name": "Perplexity API"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "// Combine all news sources and deduplicate\nconst freshRSS = $input.first().json;\nconst newsAgg = $input.all()[1].json;\nconst perplexity = $input.all()[2].json;\n\n// Create combined list\nlet allStories = [];\n\n// Add FreshRSS items\nif (freshRSS && freshRSS.items) {\n allStories = allStories.concat(freshRSS.items.map(item => ({\n source: 'FreshRSS',\n title: item.title,\n url: item.url,\n time: item.timestamp\n })));\n}\n\n// Add News Aggregator items\nif (newsAgg && Array.isArray(newsAgg)) {\n allStories = allStories.concat(newsAgg.map(item => ({\n source: item.source || 'News Aggregator',\n title: item.title,\n url: item.url,\n heat: item.heat\n })));\n}\n\n// Add Perplexity insights\nif (perplexity && perplexity.choices) {\n allStories.push({\n source: 'Perplexity AI',\n title: 'AI-Synthesized Briefing',\n content: perplexity.choices[0].message.content\n });\n}\n\n// Return combined for AI analysis\nreturn [{\n json: {\n stories: allStories,\n count: allStories.length,\n sources: ['FreshRSS', 'News Aggregator', 'Perplexity']\n }\n}];"
|
||||
},
|
||||
"id": "combine-sources",
|
||||
"name": "Combine Sources",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [850, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"model": "gpt-4o-mini",
|
||||
"options": {},
|
||||
"messages": {
|
||||
"message": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are a news editor creating a morning intelligence briefing. Analyze the provided news stories from multiple sources, remove duplicates, identify genuinely new information, and create a concise summary of the top 5-7 most important stories. Format as markdown with emojis. Focus on tech, AI, business, and relevant world news."
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "=Create a morning briefing from these sources:\n\n{{ $json.stories }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "ai-summarize",
|
||||
"name": "AI Summarize",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"typeVersion": 1.6,
|
||||
"position": [1050, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"chatId": "1793951355",
|
||||
"text": "=🌅 **Morning Intelligence Briefing**\n\n{{ $json.output }}\n\n---\n_Sources: FreshRSS, News Aggregator, Perplexity AI_",
|
||||
"options": {}
|
||||
},
|
||||
"id": "telegram-send",
|
||||
"name": "Send Telegram",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.1,
|
||||
"position": [1250, 300],
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "telegram-bot-creds",
|
||||
"name": "Telegram Bot"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"6 AM Daily": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch FreshRSS",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "News Aggregator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch FreshRSS": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Sources",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"News Aggregator": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Sources",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine Sources": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Summarize",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Summarize": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [],
|
||||
"pinData": {},
|
||||
"description": "Daily morning briefing combining FreshRSS, News Aggregator, and Perplexity AI into a single Telegram message at 6 AM"
|
||||
}
|
||||
Reference in New Issue
Block a user