You are helping me build the following AI agent workflow. ## Goal Tax Compliance Validation: Weekly agent fetches revenue data, uses OpenAI to detect anomalies and categorize entries, then emails compliance reports to tax agents. ## Specification - What it does: You get weekly email reports from your tax agent containing categorized revenue data and flagged anomalies detected by OpenAI. This automated process ensures suspicious patterns are identified early while syncing clean data with your accounting software. - Trigger: On a schedule (Scheduled ยท weekly) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - OpenAI Chat Model: Categorization and anomaly detection - HTTP Request: Fetching revenue data source - Gmail: Sending compliance reports to tax agents - Code: Processing logic and data transformation ## Known pitfalls, handle each one explicitly in your implementation 1. PII exposure is a major risk so ensure you mask customer names and addresses before sending data to the OpenAI API. 2. Gmail authentication tokens expire quickly so implement a refresh mechanism or use an app-specific password stored securely in environment variables. ## Reference implementation https://n8n.io/workflows/11901 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/automate-tax-compliance-validation/ via usecasesforagents.com