Hi everyone!
A few weeks ago I knew nothing about automation. Now every weekday at 17:00, this lands in my Telegram:
A full analyst-style briefing covering energy, metals, agriculture, central banks and geopolitical risk — written by AI after it reads 15 news sites. No RSS modules, no XML parsing. Just 3 modules. Here’s exactly how I built it.
The scenario:
Schedule → HTTP (Anthropic API with built-in web search) → Telegram (×2, because of Telegram’s character limit). The trick that makes it this small: instead of pulling articles with RSS modules and aggregating them, the AI’s web search tool does the reading itself — you just give it a list of allowed domains. My first version used RSS feeds for every source and kept breaking on malformed XML; this approach turned out far more stable and cut my operations from ~1,500/month to ~240.
Module 1: Schedule
Weekdays at 17:00. Nothing special.
Module 2: HTTP — the brain
- URL:
https://api.anthropic.com/v1/messages— Method: POST - Headers:
x-api-key(your Anthropic key),anthropic-version: 2023-06-01,content-type: application/json - Body type: Raw / JSON string
- Timeout: 300 seconds — the AI reading 15 sites takes 1–2 minutes, the default 40s kills the request
In the JSON body I define: the model (Claude Sonnet), max_tokens ~2800, the web_search tool with an allowed_domains list of 15 sites and max 5 searches per run, plus a system prompt telling the AI to act as a veteran commodities trader and geopolitical analyst and structure the output into sections (Energy / Metals / Ags / Central Banks / Geopolitical Risk / Trader’s Take).
Lessons that cost me hours:
- Anthropic blocks some big domains from crawling (reuters.com, bbc.com, apnews.com) — the API error tells you which ones, just remove them and use crawlable alternatives (oilprice.com, mining.com, agweb.com…)
- If max_tokens is too low, the briefing gets cut off mid-sentence. 2800 is my sweet spot.
Modules 3 + 4: Telegram
Telegram messages max out at 4,096 characters and a good briefing is longer, so:
- First Telegram module sends:
substring(join(map(2.data.content; "text"); newline); 0; 4000) - Second Telegram module, with a filter (total length > 4000), sends characters 4000–8000
The join(map(…)) part matters: the API returns the answer as multiple text blocks, so last(…) alone gives you only the final fragment — learned that the hard way too.
Costs: one run per weekday, 5 web searches, Sonnet — a few dollars of API credits last for months.
The bot also posts its daily briefing to a public Telegram channel, so you can judge the output quality live: Telegram: View @commoditiesdeskai
Happy to answer any questions about the setup — this community helped me a lot when I was fighting the RSS errors, so ask away!






