My openclaw setup for generating weekly newsletters

I wanted a way to share a curated weekly AI newsletter with colleagues. The idea: throughout the week, I come across interesting AI news (model releases, funding rounds, policy changes, papers) and I wanted to collect them casually and publish a polished newsletter every Monday.

I didn’t want to spend Sunday evenings formatting HTML. I wanted something I could feed news to from my phone, and have it generate a ready-to-publish newsletter on demand.

OpenClawnews:openai.com/index/openai...Saved. 4 items collected.publish newsletterNewsletter generated.AWS LIGHTSAILCOLLECTExtract metadata from shared linksPREVIEWInteractive WhatsApp summariesPUBLISHWeb search + Hugo markdownGitHubPR & ReviewNetlifyLIVE DEPLOY

The flow is conversational:

  1. During the week: I spot interesting AI news and drop links into a WhatsApp self-chat
  2. Friday: A cron job scans RSS feeds and Reddit, stages candidate stories, and sends me a summary
  3. Saturday: I say “publish” and the agent merges my picks with RSS candidates and fresh web search results, generates the newsletter, and pushes it to GitHub
  4. Monday morning: I review the PR, merge, and Netlify auto-deploys

No YAML files to edit. No scripts to run. Just WhatsApp messages.

Why OpenClaw?

I initially sketched out a custom Python pipeline: web search collectors, a Claude-powered curation layer, Jinja2 templates. Maybe 500 lines across a dozen files.

Then I looked at OpenClaw. It’s an open-source, self-hosted AI agent that connects to messaging apps and can run tools, remember context, and execute tasks. The key realization: OpenClaw could replace that entire pipeline with a single “skill”, a markdown file that teaches the agent what to do.

The tradeoff is maturity. OpenClaw is very new, and I hit plenty of rough edges. But for a personal project where I control the environment, the WhatsApp-native interaction model was worth it.

Setting Up AWS Lightsail

Why Not My Laptop?

OpenClaw runs with broad system permissions: file access, command execution, app interaction. Security researchers found over 30,000 exposed instances in a two-week scan, and there was a “ClawJacked” vulnerability where a malicious website could hijack a locally running agent. A cloud VM isolates all of that from my personal data.

Plus, the agent needs to be always-on to accept news items whenever I find them.

The Setup

AWS launched an OpenClaw blueprint for Lightsail in early March 2026, making this nearly one-click:

  1. Create instance: Lightsail console → Create instance → Linux/Unix → OpenClaw blueprint → 4 GB RAM plan (~$16/month)
  2. Pick a region: I chose eu-west-1 (Ireland), closest to Belgium
  3. Enable Bedrock: Run the setup script from the Getting Started tab in AWS CloudShell. This creates the IAM role for Bedrock access
  4. Anthropic form: Bedrock requires a one-time use case submission for Anthropic models. Submit and wait ~15 minutes

One thing to watch: if you just created your AWS account, Lightsail might not be available immediately.

Security Choices

During SSH setup, OpenClaw asks about security. What I chose:

  • File & folder protection: Enabled (default). Config and tokens only readable by my user
  • Browser remote control: Disabled. No need for browser automation
  • Exec host policy: Host (not sandbox). The agent runs commands directly on the VM, which gives it access to git credentials and the push script. This is a deliberate tradeoff — the VM itself is the isolation boundary
  • Shell command approval: Allow, since the VM isolates everything from my personal machine

I initially ran with Docker sandbox mode, but switched to host execution after hitting too much friction with git credentials and file access. Since the Lightsail VM is a throwaway instance with nothing personal on it, running directly on the host is the pragmatic choice. The skill itself has strict rules — it never touches git except through the push script, never creates files outside its own folder, and never installs packages without asking.

Connecting WhatsApp

The setup itself is simple:

openclaw plugins enable whatsapp
openclaw gateway restart
openclaw channels login

Scan the QR code with WhatsApp → Settings → Linked Devices → Link a Device. Done.

The Self-Chat Safety

Here’s something I learned the hard way: by default, OpenClaw responds to messages in all your WhatsApp chats. It started replying on my behalf in conversations with friends and colleagues. Not great.

To fix this:

openclaw config set channels.whatsapp.selfChatMode true
openclaw config set channels.whatsapp.dmPolicy allowlist
openclaw config set channels.whatsapp.allowFrom '[]'
openclaw gateway restart

Now it only responds in the “Message yourself” chat. The docs actually recommend a separate phone number (WhatsApp Business on the same device works), which is probably the right long-term move.

Enable selfChatMode before anything else.

The Newsletter Skill

An OpenClaw skill is a folder with a SKILL.md file: YAML frontmatter plus markdown instructions. No SDK, no compilation. You’re writing a detailed playbook that teaches the agent how to do a job.

~/.openclaw/workspace/skills/ai-newsletter/
├── SKILL.md
├── collected_items.jsonl
├── candidates.jsonl
├── output/
│   └── 2026-03-14.md
└── templates/
    └── newsletter_template.html

Four Modes

01. Collect
Casual Sharing

Drop links into WhatsApp anytime. The agent parses metadata, determines the publish date (from URL meta tags or web search), and appends to collected_items.jsonl. These manual items always get priority in the final newsletter.

02. Preview
Instant Summary

Text "generate newsletter" for an immediate text-based grouping of collected items. No web search, no git, no file generation — just a quick pulse check of what's been saved so far.

03. Friday Staging Scan
Automated RSS Scan

A cron job triggers on Friday. The agent pulls RSS feeds from TechCrunch, Wired, VentureBeat, arXiv, and top Reddit AI subs. It deduplicates against manual items, saves candidates to candidates.jsonl, and sends a WhatsApp summary of what it found.

04. Publish
The Full Pipeline

Merges manual items, RSS candidates, a fresh RSS pass, and targeted web searches. Deduplicates, caps at 15 items, generates Hugo markdown with exactly 3 bullet points per story, runs the push script, and sends a PR link via WhatsApp.

Hugo Integration

My site runs on Hugo with Netlify deploys. I added a /newsletter/ section with a list page showing all weeks (latest first) and individual pages with categorized news cards in a dark theme matching the rest of the site.

Each newsletter is a markdown file with structured frontmatter:

---
title: "AI Weekly: OpenAI Acquires Promptfoo & Yann LeCun Raises $1B"
date: 2026-03-14
week_start: "2026-03-08"
week_end: "2026-03-14"
draft: false
highlights:
  - "OpenAI snaps up AI security testing firm Promptfoo"
  - "Yann LeCun's startup raises $1B for world-model AI"
news:
  - category: "Models & Releases"
    color: "#3b82f6"
    items:
      - title: "BitNet: 100B-Param Model Runs on Laptop CPUs"
        summary:
          - "Microsoft's 1-bit quantization enables 100B-param inference on consumer CPUs"
          - "Open-sourced on GitHub with 330+ upvotes on Hacker News"
        url: "https://github.com/microsoft/BitNet"
---

I have a custom Hugo template that renders this into styled newsletter pages automatically.

The Push Script

Since the agent runs directly on the host (no sandbox), it can execute a shell script that handles the git workflow. The skill calls ~/push-newsletter.sh at the end of the publish pipeline:

~/push-newsletter.sh 2026-03-14 ~/.openclaw/workspace/skills/ai-newsletter/output/2026-03-14.md

The script copies the markdown into the Hugo content directory, creates a branch, commits, and pushes. The agent then sends me the PR link via WhatsApp. This was originally a manual step when I was running in sandbox mode, but switching to host execution made it fully automatic.

The RSS Staging Pipeline

The Friday staging scan was the biggest quality improvement. Before adding it, I was relying entirely on manual sharing plus a single web search pass at publish time. Running it on Friday gives the agent most of the week’s stories while still leaving Saturday for the final publish pass to catch anything last-minute. The problem: web search results for “AI news this week” are noisy and often miss niche stories from Reddit or arXiv.

Now the agent pulls from 8 RSS feeds on Friday:

  • News: TechCrunch AI, Wired AI, VentureBeat
  • Research: arXiv cs.LG
  • Community: r/LocalLLaMA, r/MachineLearning, r/artificial, r/singularity (top posts, extracting the linked article URL, not the Reddit discussion URL)

These candidates get saved to candidates.jsonl and merged with manual items at publish time. Manual items always take priority — if I shared something, it’s in the newsletter regardless of what RSS found.

Things I Learned

Instructions, Not Code

Writing a playbook for an agent is different from programming. You need to be explicit, add constraints, and include "Rules" for what not to do.

Host vs Sandbox

I started with Docker sandbox mode but switched to host execution. The sandbox blocked git credentials, file watchers, and push scripts. For a dedicated cloud VM with nothing personal on it, host mode is the pragmatic choice — just add strict rules to the skill itself.

Agent Timeouts

Complex pipelines hit the 5-minute limit. Keep steps focused—dropping extra sources (Reddit/ArXiv) in favor of deep web search fixed it.

Context Limits

WhatsApp chats fill context windows quickly. Compaction helps, but using disk storage (JSONL) for raw data is more reliable than chat memory.

Start Simple

The most effective version is the simplest: share in, web search gap-fill, and markdown out. Complexity can wait for future iterations.

What’s Next

  • RSS feed integration: Done. Friday staging scan pulls from 8 feeds automatically
  • Full automation: Done. Switching from sandbox to host execution resolved the git push friction
  • Automated publish scheduling: use OpenClaw’s cron to trigger the full publish pipeline every Saturday evening, so I just review the PR on Monday
  • Separate WhatsApp number: cleaner separation from personal chats
  • Newsletter-specific RSS: subscribe to curated newsletters (The Batch, Import AI, etc.) and auto-extract stories

The flow is now mostly automated. About 2 minutes during the week dropping items into WhatsApp, a Friday staging summary I glance at, and 5 minutes on Saturday reviewing and saying “publish.” Good trade for a polished weekly newsletter.

You can see the result at deepakbaby.in/newsletter.

Discussion