You are helping me build the following AI agent workflow. ## Goal Stripe Payment Recovery: Detects failed Stripe payments, logs them to a queue, and sends up to two polite recovery emails via Brevo. ## Specification - What it does: You recover failed Stripe payments by automatically logging customer details into a Google Sheet and sending up to two polite reminder emails via Brevo. This daily process tracks your recovery queue and stops after two attempts to avoid spamming customers while ensuring you capture every potential sale. - Trigger: Triggered by an event (Event · on failed payment; Scheduled · daily 10:00) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Stripe: Detecting failed payments via trigger - Google Sheets: Logging failures and tracking email counts - Brevo: Sending follow-up reminder emails ## Known pitfalls, handle each one explicitly in your implementation 1. Stripe webhooks may arrive out of order so ensure your logic checks the latest event status before processing. 2. Google Sheets has row limits and rate caps, use batch updates instead of individual appends for large recovery queues. 3. Customers might update their payment method between attempts so verify the card status before sending the final reminder. ## Reference implementation https://n8n.io/workflows/5702 (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-stripe-payment-recovery/ via usecasesforagents.com