Recover failed WooCommerce orders with personalized email drafts

Every 4 hours, find WooCommerce orders stuck in failed or pending payment, draft personalized recovery emails in Gmail, and post a Slack rollup for the revenue team.

Agentic Task
WooCommerceGmailSlackSalesMarketingEmail AutomationNotifications & AlertsDaily Digests

Build me an agent workflow that recovers lost revenue from WooCommerce orders that got stuck in failed or pending payment. It should run on a cron schedule every 4 hours.

On each run, the agent should call WooCommerce List Orders filtered to status of failed or pending, and to orders created between 2 hours ago and 48 hours ago. The 2 hour floor avoids hassling people who are still actively checking out. The 48 hour ceiling avoids cold outreach where the buyer has moved on.

For each matching order, the agent should pull the customer's billing first name, billing email, the line items (product name, quantity, total), the order total, and the order currency. If the order already has notes or meta indicating a recovery email has been sent, or the status changed to refunded or cancelled in the meantime, skip it. Group orders by billing email so one customer with two stuck carts gets a single email, not two.

For every remaining buyer, write a friendly, specific recovery email. The email should reference the actual products in their cart by name (not a generic 'your order'), acknowledge that payment did not go through without blaming them, and include a fresh checkout link back to their WooCommerce order. Keep it short, warm, and human. No 'Dear Customer'. Use the billing first name when available.

Stage each email by calling Gmail Create a Draft, with the buyer's billing email in the To field and a clear subject like 'Finish your {{product}} order' or 'Looks like checkout didn't go through'. Drafts let a human review before sending. Do not auto-send.

After all drafts are staged, call Slack Send a Message once with a rollup of everything created in this run. The rollup should list each customer's first name, the order total with currency, and the products in the cart, plus a one-line total for the run (for example 'Drafted 7 recovery emails covering $1,240 in stuck orders'). Post it to the revenue team's channel. If zero drafts were created on a run, post a single quiet line saying so rather than a big empty rollup.

Make the cron schedule, the order age window (2 to 48 hours), the Slack channel, the email tone, and the 'skip if already recovered' check easy to adjust at the top of the workflow so the operator can tune them without rewriting the logic.

Additional information

What does this prompt do?
  • Scans your WooCommerce store every 4 hours for orders stuck in failed or pending payment between 2 and 48 hours old, so you reach buyers while their intent is still fresh.
  • Writes a friendly, specific recovery email for each buyer that names the actual products in their cart and includes a fresh checkout link, instead of a generic 'complete your order' template.
  • Stages every email as a Gmail draft so a human can review and send, or auto-sends if you decide to flip that switch later.
  • Posts one tidy Slack rollup per run with each customer name, order total, and the products they almost bought, so the revenue team sees exactly what is being recovered.
  • Skips orders that have already been recovered or refunded so the same buyer never gets hit twice.
What do I need to use this?
  • A WooCommerce store you can connect with an API key from WooCommerce Settings, Advanced, REST API.
  • A Gmail account the recovery emails will be drafted from.
  • A Slack workspace and the channel where you want the rollup posted, for example #revenue or #ecommerce.
How can I customize it?
  • Change the schedule. Every 4 hours is the default, but you can run it hourly during peak season or once a day for a calmer store.
  • Adjust the order window. The default looks at orders 2 to 48 hours old. Widen it to catch slower decision makers or tighten it to focus on hot intent.
  • Tune the tone. Tell the agent if the emails should sound warm and casual, premium and concise, or include a discount code for high-value carts.
  • Pick the Slack channel and decide who the rollup mentions, for example the revenue lead or a shared on-call handle.
  • Switch from drafts to auto-send once you trust the output, or keep human review on for higher-value orders only.

Frequently asked questions

Will this send emails automatically without me looking at them?
No. By default every recovery email is saved as a Gmail draft so a person can review and hit send. You can switch to auto-send later once you trust the output.
How does it avoid emailing the same customer twice?
Before drafting, the agent checks each order's status and notes. Orders that have already been recovered, paid, refunded, or cancelled are skipped so the same buyer is never contacted twice for the same cart.
What if a customer has multiple stuck orders?
The agent groups by customer email so a single buyer with two stuck carts gets one consolidated recovery email rather than two competing ones.
Can I change which Slack channel the rollup goes to?
Yes. Pick any channel your Slack account can post to. You can also choose to only post when at least one draft was created, so the channel stays quiet on slow runs.
Do I need a separate AI subscription for the personalized emails?
No. Personalization happens inside the workflow using your General Input plan. You only need to connect WooCommerce, Gmail, and Slack.

Stop letting failed payments quietly walk away.

Connect WooCommerce, Gmail, and Slack once, and Geni runs this recovery sweep every four hours.