Client Reporting Automation
by @reighlan
Automated client reporting for agencies and freelancers using OpenClaw. Pull data from Google Analytics, Google Search Console, social media platforms, and c...
clawhub install client-reportingπ About This Skill
name: client-reporting description: "Automated client reporting for agencies and freelancers using OpenClaw. Pull data from Google Analytics, Google Search Console, social media platforms, and custom sources to generate branded weekly/monthly reports. Auto-deliver via email or Slack. Use when: (1) generating client reports, (2) pulling analytics data for reporting, (3) automating recurring reports, (4) creating branded PDF or HTML reports, (5) scheduling report delivery, or (6) tracking client KPIs over time."
Client Reporting Automation
Pull metrics from multiple sources, generate branded reports, and auto-deliver to clients. Built for agencies and freelancers who need consistent, professional reporting without manual work.
Setup
Dependencies
pip3 install requests jinja2
API Keys (configure in config.json)
GA4_PROPERTY_ID + service account keySENDGRID_API_KEY)Workspace
client-reports/
βββ config.json # Global settings, API keys
βββ clients/ # Per-client configuration
β βββ client-name/
β βββ config.json # Client-specific settings (property IDs, branding)
β βββ reports/ # Generated reports
β βββ data/ # Cached metrics data
βββ templates/ # Report templates (Jinja2 HTML)
βββ schedules.json # Automated delivery schedule
Run scripts/init-workspace.sh to create this structure.
Core Workflows
1. Add a Client
scripts/add-client.sh --name "acme-corp" --domain "acme.com" --email "ceo@acme.com"
Creates client directory with config template. Edit clients/acme-corp/config.json to add:
2. Pull Metrics
Fetch fresh data for a client:
scripts/pull-metrics.sh --client "acme-corp" # All sources
scripts/pull-metrics.sh --client "acme-corp" --source ga4 # Google Analytics only
scripts/pull-metrics.sh --client "acme-corp" --source gsc # Search Console only
scripts/pull-metrics.sh --client "acme-corp" --source social # Social metrics
scripts/pull-metrics.sh --client "acme-corp" --period 30d # Last 30 days
Data sources and metrics:
Google Analytics 4:
Google Search Console:
Social Media:
3. Generate Reports
scripts/generate-report.sh --client "acme-corp" --type monthly
scripts/generate-report.sh --client "acme-corp" --type weekly --format html
scripts/generate-report.sh --client "acme-corp" --type custom --metrics "traffic,rankings,social"
Report types:
Output formats:
wkhtmltopdf or similar)4. Auto-Deliver Reports
scripts/deliver-report.sh --client "acme-corp" --latest # Send most recent
scripts/deliver-report.sh --client "acme-corp" --via email # Email delivery
scripts/deliver-report.sh --client "acme-corp" --via slack # Slack webhook
5. Schedule Recurring Reports
Configure in schedules.json:
{
"schedules": [
{
"client": "acme-corp",
"type": "weekly",
"day": "monday",
"time": "09:00",
"timezone": "America/Los_Angeles",
"deliver_via": "email",
"enabled": true
},
{
"client": "acme-corp",
"type": "monthly",
"day_of_month": 1,
"time": "09:00",
"timezone": "America/Los_Angeles",
"deliver_via": "email",
"enabled": true
}
]
}
Use with OpenClaw cron to automate: check schedules daily, generate and deliver due reports.
6. KPI Dashboard
Quick terminal dashboard for any client:
scripts/dashboard.sh --client "acme-corp"
Shows current period vs previous: traffic, rankings, social growth, conversions.
Report Template System
Templates use Jinja2 and live in templates/:
Monthly Report β {{ client.name }}
{{ period.start }} to {{ period.end }}
Traffic Overview
Sessions {{ ga4.sessions }} {{ ga4.sessions_change }}%
Users {{ ga4.users }} {{ ga4.users_change }}%
Search Performance
Customize templates per client by placing overrides in clients/.
Cron Integration
References
references/ga4-setup.md β Google Analytics 4 API setup and available metricsreferences/report-customization.md β How to customize templates and metricsβοΈ Configuration
Dependencies
pip3 install requests jinja2
API Keys (configure in config.json)
GA4_PROPERTY_ID + service account keySENDGRID_API_KEY)Workspace
client-reports/
βββ config.json # Global settings, API keys
βββ clients/ # Per-client configuration
β βββ client-name/
β βββ config.json # Client-specific settings (property IDs, branding)
β βββ reports/ # Generated reports
β βββ data/ # Cached metrics data
βββ templates/ # Report templates (Jinja2 HTML)
βββ schedules.json # Automated delivery schedule
Run scripts/init-workspace.sh to create this structure.