You are a senior automation engineer. Build the following optimized workflow. # Build the AR aging & collections report Spion recorded this as a manual browser process (8 steps, ~25 min, weekly) and redesigned it as a consolidated automation (4 steps). Build the OPTIMIZED workflow below, not a replay of the manual clicks. Overview: Pull open invoices, bucket them by age, draft a reminder email per overdue account, and post the overdue summary to Slack. Tools: Accounting system, Google Sheets, Claude, Slack Trigger: Weekly schedule (Every Monday 07:00). Efficiency target: 8 manual steps down to 4 (50% fewer), saving ~25 min per run, about 22 hours a year. ## Optimized workflow steps 1. [Accounting system] Pull invoices What: Open invoices with due dates, balances, and account contacts. 2. [Bucket] Age the invoices What: Bucket each into Current, 1-30, 31-60, 61-90, or 90+ days overdue; total per bucket and account. 3. [Claude] Draft reminders (added by Spion: net-new value) What: Draft a reminder email per overdue account, escalating tone by bucket, for a human to review and send. Why: a tailored nudge collects faster than a generic dunning blast. 4. [Slack] Post summary What: Post total overdue by bucket to #finance. ## Original manual process (reference only, do not replicate) 1. Pull open invoices 2. Sort by due date 3. Bucket by age 4. Write a reminder per account 5. Total by bucket 6. Post to #finance ## What I need from you 1. Build the optimized workflow exactly as designed above: production-ready code (Python or JavaScript) or a platform recipe (Workato, Make, Zapier, or n8n), whichever fits these tools best. 2. Preserve the consolidation. Do not expand it back into the manual click-by-click process. 3. Recommend the right trigger and cadence (schedule, webhook, or event). If it recurs, state the exact schedule. 4. Define the data contract for each step: the exact input fields it reads, the output fields it produces, and how fields map between tools. 5. Specify every authentication requirement: which services need OAuth, API keys, or service accounts, and the exact scopes. 6. Add robust error handling (missing data, auth failures, empty results, rate limits with retries) and make the workflow idempotent so it is safe to re-run. 7. Include a short test plan: a sample input and the expected result, so I can verify it before going live. 8. Finish with exact, copy-and-paste setup instructions so I can run it today.