Quick overview
This workflow runs every Friday at 9:00 AM, pulls active client status data from Google Sheets, uses Anthropic Claude to generate a narrative weekly report with structured HTML and plain text output, and sends the finished report to each client via Gmail.
How it works
- Runs every Friday at 9:00 AM on a schedule trigger.
- Reads all client rows from a specified Google Sheets document.
- Filters out paused/inactive or incomplete rows, extracts any “Metric:” columns, and builds a reporting week label for each client.
- Sends each client’s normalized data to Anthropic Claude to write a 3–4 paragraph narrative report and return JSON containing an email subject plus HTML and plain-text bodies.
- Emails the generated HTML report to each client’s email address using Gmail.
Setup
- Create a Google Sheet with the required columns (at minimum “Client Name” and “Client Email”) and optional “Status” plus any “Metric:” columns you want included.
- Add Google Sheets OAuth2 credentials in n8n and replace the placeholder Sheet ID in the Google Sheets read step.
- Add an Anthropic credential for the Claude chat model used to generate the structured report.
- Add Gmail OAuth2 credentials and confirm the “send to” field maps to your sheet’s “Client Email” values (and optionally adjust the prompt tone/system message).