A headless Claude Code agent that searches the web across 9 AI topic areas, compiles a two-tier briefing, and publishes it to Notion and Microsoft Teams — every morning, zero intervention.
Set it up once. Get a comprehensive AI briefing in Notion every morning.
Claude searches the web across 9 AI topic areas with multiple queries per topic, targeting news from the past 24 hours only.
TL;DR with 10-15 bullet points for a 1-minute scan, plus a full 9-section deep dive with source attribution and dates.
Publishes directly to a Notion database via MCP. Each briefing is a searchable, tagged page with structured properties.
Runs on macOS (launchd) and Windows (Task Scheduler). Shared prompt, platform-native scheduling.
Reads the previous Notion briefing before searching, so it never repeats stories already covered yesterday.
Hard $2.00 cap per run. Typical cost: $0.70-1.40. Safety-first design prevents runaway API spend.
Automatically posts a styled Adaptive Card to Microsoft Teams with the full briefing, section icons, and clickable source links.
Six stages, fully automated, from scheduler trigger to Notion page and Teams channel.
flowchart TD
subgraph Schedulers
A1[macOS launchd]
A2[Windows Task Scheduler]
end
A1 -->|8:00 AM daily| B1[briefing.sh]
A2 -->|8:00 AM daily| B2[briefing.ps1]
B1 -->|Reads| C[prompt.md]
B2 -->|Reads| C
B1 -->|Invokes| D[Claude Code CLI]
B2 -->|Invokes| D
D -->|Step 0: Dedup| N0[Notion MCP - Read Previous]
N0 -->|Already covered stories| D
D -->|Step 1: Search| E[WebSearch Tool]
E -->|9 topics x multiple queries| F[Web Results]
F -->|Step 2: Compile| G[Two-Tier Briefing]
G -->|Step 3: Write| H[Notion MCP - Create Page]
H -->|Creates page| I[(Notion Database)]
B1 -->|Logs output| J[logs/YYYY-MM-DD.log]
B2 -->|Logs output| J
B1 -->|If webhook set| T1[notify-teams.sh]
B2 -->|If webhook set| T2[notify-teams.ps1]
T1 & T2 --> PY[build-teams-card.py]
PY --> TW[Teams Webhook]
TW --> TC[Teams Channel]
sequenceDiagram
participant S as Scheduler
participant E as Entry Script
participant C as Claude Code
participant NR as Notion (Read)
participant W as WebSearch
participant NW as Notion (Write)
participant TW as Teams Webhook
Note over S: 08:00 AM or manual trigger
S->>E: Execute entry script
E->>E: Setup env, create log dir
E->>E: Read prompt.md
E->>C: claude -p --model sonnet
C->>NR: Fetch previous briefing
NR-->>C: Yesterday's stories
loop For each of 9 topics
C->>W: Search query
W-->>C: Results
end
C->>C: Filter duplicates
C->>C: Compile TLDR tier
C->>C: Compile Full Briefing
C->>C: Build Key Takeaways
C->>NW: Create page with briefing
NW-->>C: Page URL
C-->>E: Done
E->>E: Log result
opt Teams webhook configured
E->>E: notify-teams.sh / .ps1
E->>E: build-teams-card.py (parse log)
E->>TW: POST Adaptive Card to webhook
TW-->>E: 202 Accepted
end
flowchart TD
A[Entry script starts] --> B{Log dir exists?}
B -->|No| C[Create it]
B -->|Yes| D[Continue]
C --> D
D --> E{CLAUDECODE env set?}
E -->|Yes| F[Clear it]
E -->|No| G[Continue]
F --> G
G --> H[Invoke Claude Code]
H --> I{Budget exceeded?}
I -->|Yes| J[Exit with error]
H --> K{Search failures?}
K -->|Partial| L[Note: No updates for topic]
K -->|Total| M[Empty briefing]
H --> N{Notion API error?}
N -->|Yes| O[Report in output]
H --> P{Success}
J --> Q[Log: FAILED]
M --> Q
O --> Q
L --> P
P --> R[Log: Complete]
Q --> S[Cleanup old logs]
R --> S
Each topic gets multiple targeted web searches for comprehensive coverage.
Releases, features, announcements, blog posts
Model updates, API changes, capabilities
Cursor, Windsurf, Copilot, Xcode AI, JetBrains
LangChain, CrewAI, AutoGen, MCP updates
Model releases, benchmarks, company news
Llama, Mistral, DeepSeek, Hugging Face
Rounds, acquisitions, notable launches
Government policy, EU AI Act, safety
Vercel, Next.js, React Native, TypeScript
# Clone git clone https://github.com/hoangsonww/AI-News-Briefing cd AI-News-Briefing # Install scheduler (auto-detects platform) make install # Or run immediately make run # Watch progress make tail
# macOS chmod +x briefing.sh cp com.ainews.briefing.plist ~/Library/LaunchAgents/ launchctl load ~/Library/LaunchAgents/com.ainews.briefing.plist # Windows (PowerShell) .\install-task.ps1
Auto-detects macOS, Windows (Git Bash), or Linux and routes to native tools.
| Command | Category | Description |
|---|---|---|
make run | Execution | Run briefing in foreground |
make run-bg | Execution | Run briefing in background |
make run-scheduled | Execution | Trigger via OS scheduler |
make tail | Logs | Tail today's log live |
make log | Logs | Print today's log |
make logs | Logs | List all log files with sizes |
make log-date D=... | Logs | Print log for a specific date |
make clean-logs | Logs | Delete logs older than 30 days |
make purge-logs | Logs | Delete all logs |
make install | Scheduler | Install platform scheduler |
make uninstall | Scheduler | Remove platform scheduler |
make status | Scheduler | Show scheduler status |
make check | Validate | Verify Claude CLI is installed |
make validate | Validate | Validate all project files |
make prompt | Info | Print the current prompt |
make info | Info | Show config summary |
make help | Info | Show all targets |
Full briefing as a styled Adaptive Card, posted automatically after each run.
flowchart LR
A[Briefing Log] --> B[build-teams-card.py]
B --> C[Adaptive Card JSON]
C --> D[Power Automate Webhook]
D --> E[Teams Channel]
# Add to ~/.zshrc or ~/.bashrc export AI_BRIEFING_TEAMS_WEBHOOK="<your-power-automate-webhook-url>" # Test it ./scripts/notify-teams.sh logs/$(date +%Y-%m-%d).log
# Set persistent environment variable [Environment]::SetEnvironmentVariable("AI_BRIEFING_TEAMS_WEBHOOK", "<your-url>", "User") # Test it .\scripts\notify-teams.ps1 logs\$(Get-Date -Format yyyy-MM-dd).log
Default configuration: Sonnet model, 9 topics, $2.00 budget cap per run.