Marketing Agency Report Factory
Auto-generate client reports from Google Analytics, Meta Ads, and Google Ads data. Weekly compilation with AI narrative.
AI Readiness Score
Analytics data is clean and structured
Some technical capability
Budget fits 3-agent deployment
Reporting is highly automatable
Realistic for scope
Multiple data sources but all have APIs
How This System Works
Architecture
The Catalyst Digital system is a three-tier automated marketing intelligence platform designed to streamline client reporting workflows. At its core, the system orchestrates nightly data collection from multiple advertising platforms, followed by AI-powered narrative generation and branded report distribution. The architecture follows a sequential pipeline pattern where each agent depends on the successful completion of the previous stage, ensuring data consistency and reliable report delivery. The system leverages Airtable as the central data warehouse, storing raw metrics, processed insights, and client configurations in a structured format that supports both automated processing and manual oversight. Integration points are designed with OAuth 2.0 and API key authentication to maintain secure connections with external platforms while supporting credential rotation and multi-client configurations.
Data Flow
Data begins its journey through nightly collection from Google Analytics, Meta Ads, and Google Ads platforms, where the Data Collector agent pulls performance metrics, conversion data, and campaign statistics. This raw data is normalized and stored in Airtable with timestamp markers and client identifiers to support historical analysis and multi-tenant operations. The data structure preserves platform-specific nuances while creating unified schemas for cross-platform reporting. Weekly processing transforms this accumulated data into actionable insights through the Report Narrator agent, which analyzes trends, identifies performance anomalies, and generates natural language summaries using Claude AI. The generated narratives are enriched with contextual client information and formatted for inclusion in branded reports. Finally, the Report Distributor compiles these insights into PDF deliverables and coordinates distribution through Slack notifications, creating a complete end-to-end automation loop that requires minimal manual intervention.
Implementation Phases
Establish Airtable schemas, implement Data Collector agent with basic platform integrations, and set up credential management
Deploy Report Narrator with Claude integration, create narrative templates, and implement data analysis workflows
Implement Report Distributor with PDF generation, configure Slack notifications, and add system monitoring
Performance tuning, error recovery improvements, and multi-client configuration management
Prerequisites
- -Airtable Pro account with API access
- -Google Analytics 4 properties with Reporting API enabled
- -Meta Business Manager with Ads API access
- -Google Ads Manager account with API credentials
- -Claude API subscription (Anthropic)
- -Slack workspace with bot permissions
- -Server environment with Python 3.9+ and cron scheduling
- -SSL certificates for webhook endpoints
Assumptions
- -Client data volumes stay under 50MB per collection cycle
- -API rate limits allow for sequential platform data collection within 30-minute windows
- -Report generation completes within 15 minutes to maintain schedule integrity
- -Clients require weekly reporting cadence aligned with Monday morning delivery
- -Airtable serves as sufficient data warehouse without need for dedicated database
- -PDF report generation can be handled in-memory without persistent file storage
Recommended Agents (3)
How It Works
- 1Initialize Platform Connections
Load OAuth tokens and API credentials from secure storage, validate connection health with test requests to Google Analytics, Meta Ads, and Google Ads APIs
requests library with OAuth2Session - 2Query Platform APIs
Execute parallel data collection requests for previous day's metrics including sessions, conversions, ad spend, and performance data with proper date range formatting
Google Analytics Reporting API v4, Meta Marketing API, Google Ads API - 3Normalize Data Schemas
Transform platform-specific response formats into unified data structures with standardized field names, data types, and client identifiers
pandas for data transformation - 4Store in Airtable
Batch upload normalized records to designated Airtable bases using upsert operations to handle duplicate prevention and data versioning
Airtable API with pyairtable - 5Log Collection Results
Record collection success rates, data volumes, and any API errors to monitoring dashboard with timestamp and client-specific metrics
structured logging with JSON format
Implementation
# Data Collector Implementation
## File Structure
```
data_collector/
├── main.py # Entry point and orchestration
├── collectors/
│ ├── google_analytics.py
│ ├── meta_ads.py
│ └── google_ads.py
├── utils/
│ ├── auth_manager.py # OAuth token management
│ ├── data_normalizer.py
│ └── airtable_client.py
├── config/
│ ├── credentials.json # Encrypted credential storage
│ └── client_mappings.json
└── requirements.txt
```
## Key Functions
```python
# main.py
def run_collection_cycle():
clients = load_client_configs()
for client in clients:
try:
ga_data = collect_google_analytics(client)
meta_data = collect_meta_ads(client)
gads_data = collect_google_ads(client)
normalized = normalize_data_schemas(ga_data, meta_data, gads_data)
store_in_airtable(client.base_id, normalized)
except Exception as e:
log_collection_error(client.id, str(e))
# collectors/google_analytics.py
def collect_google_analytics(client):
service = build_analytics_service(client.credentials)
request = {
'reportRequests': [{
'viewId': client.ga_view_id,
'dateRanges': [{'startDate': 'yesterday', 'endDate': 'yesterday'}],
'metrics': [{'expression': 'ga:sessions'}, {'expression': 'ga:conversions'}]
}]
}
return service.reports().batchGet(body=request).execute()
```
## Environment Variables
```
AIRTABLE_API_KEY=key_xxxxxx
GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=xxxxxx
META_APP_ID=xxxxxx
META_APP_SECRET=xxxxxx
GOOGLE_ADS_DEVELOPER_TOKEN=xxxxxx
```
## Cron Setup
```bash
# Add to crontab
0 3 * * * cd /path/to/data_collector && python main.py >> /var/log/data_collector.log 2>&1
```Data Flow
Inputs
- Google Analytics — Daily website traffic, conversion events, and user behavior metrics(JSON via Reporting API v4)
- Meta Ads — Campaign performance, ad spend, impressions, and conversion data(JSON via Marketing API)
- Google Ads — Search campaign metrics, keyword performance, and cost data(JSON via Google Ads API)
Outputs
- Airtable — Normalized daily metrics with client ID, platform source, and timestamp(Airtable records with structured fields)
Prerequisites
- -OAuth 2.0 tokens for all integrated platforms
- -Airtable base with properly configured field types
- -Network access to external APIs
- -Secure credential storage mechanism
Error Handling
Attempt token refresh using stored refresh tokens, send alert if refresh fails
Implement exponential backoff with jitter, queue requests for retry in next cycle
Cache data locally and attempt storage in next cycle, alert operations team
Log schema differences, attempt field mapping recovery, continue with available data
Integrations
| Source | Target | Data Flow | Method | Complexity |
|---|---|---|---|---|
| Google Analytics | Airtable | Traffic + conversion metrics | api | moderate |
| Airtable | Slack | Report notifications | api | trivial |
Schedule
0 3 * * *0 8 * * 10 9 * * 1Recommended Models
| Task | Recommended | Alternatives | Est. Cost | Why |
|---|---|---|---|---|
| Agent logic / orchestration | Claude Sonnet 4 | GPT-4oGemini 2.5 Pro | $0.003-0.015/call | Handles complex scheduling logic and orchestration between the three marketing agents with reliable structured outputs. |
| Data extraction / parsing | Claude Haiku | GPT-4o-miniGemini 2.0 Flash | $0.0002-0.001/call | Fast and cost-effective for parsing API responses from Google Analytics, Meta Ads, and Google Ads platforms. |
| Content generation | Claude Sonnet 4 | GPT-4oGemini 2.5 Pro | $0.003-0.015/call | Generates high-quality marketing performance narratives that require nuanced interpretation of data trends. |
| Classification / routing | Claude Haiku | GPT-4o-miniGemini 2.0 Flash | $0.0002-0.001/call | Quickly classifies report types and routes data between platforms for the nightly automation workflow. |
ROI Projection
Similar Blueprints
Campaign Performance Dashboard
An automated campaign performance management system that eliminates manual ROAS reporting by connecting Meta Ads, Google Ads, TikTok Ads, and Shopify data sources through intelligent AI agents. The system provides real-time performance monitoring, automated report generation, and proactive alerting for optimization opportunities. All data is centralized in Google Sheets with standardized formatting, enabling quick decision-making and reducing weekly reporting time from 6 hours to under 30 minutes.
Content Calendar & Publishing Pipeline
An AI-powered content management pipeline that centralizes marketing operations across 12 client accounts, automating content scheduling, quality assurance, and performance reporting. The system integrates Notion, Buffer, Slack, and Google Workspace to create a seamless workflow from content creation to publishing and analysis. Five specialized AI agents handle different aspects of the content lifecycle, reducing manual coordination and ensuring consistent quality across all client accounts. The platform provides real-time visibility into content performance and team productivity while maintaining brand consistency and publishing schedules.
What's next?
This blueprint is a starting point. Fork it, remix it, or build your own.