Quick Overview
This scheduled workflow pulls ad performance data from a configurable platform API, normalizes key metrics, generates a client-friendly narrative with Anthropic Claude, then emails a branded HTML report via Gmail and logs the results to Google Sheets.
How it works
- Runs on a monthly schedule trigger.
- Loads white-label branding, client details, platform name, recipient email, and the reporting period label.
- Fetches raw performance metrics from the selected ad platform using an HTTP request.
- Normalizes the response into standard metrics (spend, impressions, clicks, conversions, revenue) and calculates current vs prior-period deltas.
- Sends the metrics and deltas to the Anthropic Messages API (Claude) to produce a structured JSON summary with highlights, watch items, and next steps.
- Builds a branded HTML report from the metrics and Claude summary, emails it to the client via Gmail, and appends a reporting row to a Google Sheets log.
Setup
- Update the ad platform reporting endpoint URL and configure an HTTP Header Auth credential for the platform API.
- Configure an HTTP Header Auth credential for Anthropic using header name
x-api-key and your Claude API key, and attach it to the Claude request.
- Connect your Gmail account and set the recipient and branding values (agency name, logo URL, brand color, client name, platform name) in the configuration step.
- Connect Google Sheets credentials, create a spreadsheet tab named
Client Reports, and replace the placeholder Google Sheet document ID.