You are helping me build the following AI agent workflow. ## Goal Inventory & PO Management: Daily automation checks low stock against reorder thresholds, prevents duplicate POs, calculates optimal quantities. ## Specification - What it does: You get automatic alerts when stock runs low, ensuring you never miss a reorder while avoiding duplicate purchase orders. The system calculates optimal quantities for each item, groups them by supplier, and sends you clear email summaries so you can approve orders instantly without manual checks. - Trigger: On a schedule (Scheduled ยท daily at midnight and 1:00 AM) - Autonomy: You approve along the way - Expected setup effort: about an afternoon - Tools/services involved: - Airtable: Storing product stock, supplier data, and purchase order records - Brevo: Sending automated email notifications to suppliers - Code: Calculating reorder quantities and grouping POs by supplier ## Known pitfalls, handle each one explicitly in your implementation 1. Floating point arithmetic can cause rounding issues in quantity calculations, use integer conversion or a rounding library to ensure whole units. 2. Brevo email templates may break if special characters are not escaped, sanitize all product names before injecting them into the HTML body. ## Reference implementation https://n8n.io/workflows/5815 (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/automated-inventory-po-management/ via usecasesforagents.com