You are helping me build the following AI agent workflow. ## Goal PDF Invoice Generation & Delivery: Receives webhook data with customer details and line items to generate a professional PDF invoice, email it. ## Specification - What it does: Receives webhook data containing customer details and line items to automatically generate professional PDF invoices. It calculates taxes, formats the document using HTML templates, sends the invoice via email, and saves a copy to Google Drive for record keeping. - Trigger: Triggered by an event (Event ยท on webhook data) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - HTTP Request: Trigger and PDF generation API call - Code: Tax calculation and invoice data processing - Send Email: Deliver PDF invoices to customers - Google Drive: Store invoice backups ## Known pitfalls, handle each one explicitly in your implementation 1. HTML rendering engines often ignore external stylesheets so you must inline all CSS rules directly into the HTML tags. 2. Currency formatting can cause alignment issues in tables so always pad numbers with leading zeros or fixed decimal places. 3. Google Drive API quotas may be exceeded if many invoices are generated simultaneously so add a small delay between uploads. 4. Email attachments have size limits that vary by provider so compress the PDF or use a cloud link for large files. ## Reference implementation https://n8n.io/workflows/8413 (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-pdf-invoice-generation-delivery/ via usecasesforagents.com