Quick overview
Monitors your AdSense account for policy and review status changes. Fetches account and site states via the official Management API, dedupes against a Data Table, interprets changes with DeepSeek, and alerts Telegram by severity.
How it works
- A schedule trigger runs every six hours. The workflow calls the official AdSense Management API v2 to list your accounts, pick the primary account, and fetch each site's review state plus any account alerts.
- Every run builds a compact state snapshot of account and site statuses. A Data Table rowNotExists gate checks whether that exact fingerprint was already recorded; unchanged states are skipped without sending anything.
- When a new state appears, the workflow records the transition, assembles the before-and-after context, and asks DeepSeek to interpret the change: which site or account moved, and whether it looks good or bad.
- A severity Switch routes the verdict: critical changes send a Telegram alert, warnings send a notice, and minor updates go into an info digest. If the LLM call fails, a rule-based fallback still classifies the change.
- Checks an n8n Data Table to see whether this snapshot hash has been recorded before, and stops quietly if nothing changed.
- When a new snapshot is detected, records it in the Data Table and sends the snapshot to DeepSeek to generate a JSON verdict (severity, headline, advice), falling back to rule-based classification if the DeepSeek call fails.
- Routes the result by severity and sends a formatted verdict, warning, or info message to a Telegram chat.
Setup
- Create an AdSense Management API OAuth2 credential in n8n and select it on the three AdSense HTTP nodes. The template ships with a placeholder OAuth2 setup, so no tokens are stored in the JSON.
- Add a DeepSeek API key credential for the interpretation node, connect a Telegram bot credential, and set your chat ID on the three message nodes.
- Create the state Data Table with the fingerprint and recorded-state columns referenced by the gate and upsert nodes, then activate the workflow. The first run records the current state silently; alerts start from the next real change.
- Add a Telegram credential, set your target
chatId in all three Telegram message steps, and ensure the bot can message that chat.
Requirements
- AdSense Management API access (OAuth2 as the account owner), a DeepSeek API key, a Telegram bot with your chat ID, and an n8n Data Table for state dedup. All site data comes from the official AdSense v2 endpoints, so no scraping is involved.