# Send weekly AI assistant traffic reports with GA4, Gmail and Google Sheets

> Quick overview This workflow runs every Monday and pulls AI-assistant referral traffic from Google Analytics 4, compares it to the previous week, then emails an HTML summary via Gmail and appends weekly totals to a Google Sheets log. How it works 1. Runs every Monday at 8:00 on a schedule. 2. Loads configuration values, including the report recipient email and a regex list of AI assistant sources to track. 3. Queries Google Analytics 4 for the last 7 days of sessions, users, key events, and engaged sessions where the session source matches the AI source regex. 4. Queries Google Analytics 4 for the previous 7-day period with the same AI source filter to enable week-over-week comparison. 5. Retrieves total sessions for the last 7 days from Google Analytics 4 to calculate AI traffic share of all sessions. 6. Aggregates results by AI assistant (for example ChatGPT, Perplexity, Gemini, Copilot, and Claude), calculates changes, builds an HTML report, then sends it via Gmail and logs the week

- **Domain**: `n8n-workflow-23476.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/23476
- Page (HTML): https://agenstry.com/agents/n8n-workflow-23476.n8n.io
- Documentation: https://n8n.io/workflows/23476
