Seven out of ten people who add something to their online shopping cart leave without paying. Some hit an unexpected shipping cost, some get asked to create an account, and plenty simply get distracted and never come back. The Baymard Institute analysed 50 separate studies and found the average cart abandonment rate sits at 70.22%. That number has barely moved in a decade.

Most stores already know this. They send a generic email with a 10% discount code. Klaviyo's 2026 abandoned cart benchmarks, drawn from more than 110,000 of its customers and updated on 2 October 2026, put the average click rate on those emails at 6%, and 11.3% for the top 10% of senders. Most people who open a reminder still do nothing with it. A first-time browser who added a 20 dollar item needs a different message than a repeat buyer who abandoned a 400 dollar cart. The tools to build this kind of personalised recovery have been expensive or required developers. That changed in 2026.

We at Supernodes build systems that close this gap for mid-market and enterprise teams. The pipeline we are walking through here uses three tools anyone can access: Claude via the Anthropic API for generating personalised recovery emails based on actual cart contents, n8n for the workflow automation that connects everything, and your existing ecommerce platform for the trigger data. Once set up, it sends a personalised recovery email for every abandoned cart without anyone writing it by hand. Klaviyo's report shows the size of the gap between average and good: the average abandoned cart email returns $6.77 per recipient, and the top 10% of senders return $13.70. The software side costs less than lunch for two each month.

If you have worked with Claude and n8n for lead qualification before, the pattern will feel familiar. Claude does the reasoning, n8n handles the plumbing.

Why most cart recovery emails fail

Stores are not short of recovery emails. According to Klaviyo's abandoned cart benchmarks, abandoned cart flows earn the highest average revenue per recipient of any automated flow, for both email and SMS. The gap is in what those emails contain: most of them are generic.

Look at the reasons people abandon carts. Once the shoppers who were only browsing are set aside, Baymard's research puts extra costs such as shipping, tax and fees at 40 percent of abandoners, forced account creation at 18 percent, a long or complicated checkout at 17 percent, and slow delivery at 20 percent. A blanket 10 percent discount addresses none of these.

A recovery email that reads like someone looked at the cart can name the product and answer the likely objection, such as the shipping cost or delivery time. Klaviyo's report does not say why its top 10% of senders earn twice the average per recipient, so treat personalisation as the thing to test here, and measure it against your current flow. Claude can write that message for every cart for well under a cent per email.

Four accounts: Anthropic, n8n, your store and an email service

You need four things. An Anthropic API key from the Claude Console. Anthropic's pricing lists Claude Sonnet 5.5 at USD 2 per million input tokens and USD 10 per million output tokens. A prompt with a cart in it runs to roughly 400 tokens and the email back to about 250, so each email costs around a third of a US cent. An n8n instance, free if you self-host the Community edition, or EUR 20 a month billed annually for the Starter cloud plan, which includes 2,500 workflow executions. An ecommerce platform that supports webhooks like Shopify with native n8n integration, WooCommerce, Magento, or BigCommerce. And an email sending service with an n8n node, such as Gmail for low volumes, or SendGrid or Mailgun for higher ones. n8n has no Klaviyo node, so sending through Klaviyo means calling its API with the HTTP Request node.

For a store with 1,000 abandoned checkouts a month and three emails each, that works out to EUR 20 for n8n cloud plus about USD 10 of Claude calls, before whatever your email service charges. Each checkout is one workflow execution, because the Wait nodes in Step 4 keep it inside the same run.

Step 1

Connect your ecommerce platform to n8n for cart abandonment webhooks

Create a new n8n workflow and add a Webhook node as the trigger. Set the HTTP method to POST. Point your ecommerce platform at the URL n8n generates.

For Shopify: go to Settings, Notifications, Webhooks, and create a webhook for the Checkout update event (checkouts/update), using JSON format. Shopify has no webhook for abandonment itself, as its webhook reference lists only checkout create and update, so this event fires every time a checkout changes. Steps 3 and 4 deal with that by waiting and checking before anything is sent. n8n has a pre-built Shopify cart recovery template you can import. For WooCommerce: use the built-in webhook system under Settings, Advanced, Webhooks.

n8n's pre-built Smart Shopify agent template for AI-powered abandoned cart recovery

n8n's Smart Shopify Agent template in its template library, August 2026.

Verify it works with a test POST shaped like Shopify's checkout payload. Click Listen for Test Event in the Webhook node first, and use the test URL it shows, which has webhook-test in the path:

curl -X POST "https://your-n8n-instance/webhook-test/cart-abandoned" \
  -H "Content-Type: application/json" \
  -d '{"email":"test@example.com","buyer_accepts_marketing":true,"line_items":[{"title":"Sample","price":"29.99","quantity":1}],"total_price":"29.99"}'

n8n puts the posted data under body, as its Webhook node docs explain, so later steps read $json.body.email, not $json.email.

Step 2

Build the Claude prompt for personalised cart recovery emails

Add an HTTP Request node after the checks in Step 3. This calls the Claude Messages API:

Method: POST
URL: https://api.anthropic.com/v1/messages
Headers:
  x-api-key: {{ $env.ANTHROPIC_API_KEY }}
  anthropic-version: 2023-06-01
  Content-Type: application/json

Set the body content type to JSON, choose to specify the body using JSON, and paste the expression below. Building the body with JSON.stringify matters, because product names with quote marks in them would otherwise break a hand-written JSON body and the call would fail. Here is a starting template:

{{ JSON.stringify({
  model: "claude-sonnet-5-5",
  max_tokens: 500,
  messages: [{
    role: "user",
    content: "You are a cart recovery email writer. Write a single recovery email. " +
      "Rules: (1) Mention at least one specific product by name. " +
      "(2) Keep it under 120 words. (3) If the cart is under 30, offer 5% off. " +
      "If 30 to 100, offer 10%. If over 100, no discount. " +
      "(4) Return ONLY JSON with subject and body fields, no code fences.\n\n" +
      "Cart: " + JSON.stringify($('Webhook').first().json.body.line_items) +
      "\nTotal: " + $('Webhook').first().json.body.total_price
  }]
}) }}

We use Claude Sonnet 5.5 here because Anthropic's models page gives Claude Haiku 4.5, the cheaper option, a retirement date of no sooner than 15 October 2026. Haiku would halve the cost per email, but it could stop working soon after you build this. The thresholds are in your store's currency.

This is the core of the system. The prompt gives Claude discount logic tied to cart value. A 400 dollar cart gets a value pitch, not a margin-eating discount. A 20 dollar cart gets a gentle nudge. The same rules split the two cleanly: above 100 dollars the prompt forbids a discount, so the 400 dollar cart email carries no code at all and instead names the product, links back to the cart and gives a reason to finish, like stock level or a review. Below 30 dollars the prompt offers 5 percent, and that email leads with the code, because price is the whole objection at that level. The prompt is doing the segmentation a human copywriter would do per cart, at fractions of a cent per send.

Step 3

Set up the full n8n pipeline from webhook to email

Connect everything into a single pipeline:

  1. Webhook trigger receives the checkout update from your ecommerce platform.
  2. IF node drops checkouts with no email address yet, and checkouts where buyer_accepts_marketing is false, because a recovery email is marketing and the shopper has not agreed to it.
  3. Wait node holds the run for the first delay in Step 4. Then a Shopify node looks up recent orders, and a second IF node stops the run if this shopper has since paid.
  4. HTTP Request to Claude sends the cart to the Claude API and receives a personalised email.
  5. Code node parses Claude's JSON reply into a subject and body. n8n replaced the old Function node with the Code node in version 0.198.0, per its Code node docs.
  6. Send Email node (SMTP), or the Gmail, SendGrid or Mailgun node, sends the email.
  7. Google Sheets node (optional) logs every send for tracking.

Because Shopify sends an update every time a checkout changes, one shopper can start several runs. Log the checkout ID in the Google Sheet and skip any checkout already there, or the shopper gets duplicate emails.

The Code node to parse Claude's reply, in the default Run Once for All Items mode:

const reply = JSON.parse($input.first().json.content[0].text);
return [{
  json: {
    subject: reply.subject,
    body: reply.body,
    to: $('Webhook').first().json.body.email
  }
}];

The email address comes from the Webhook node by name, because by this point $input holds Claude's reply, which has no email address in it.

Step 4

Add timing rules and smart discount logic

Two sources suggest slightly different timings. Digital Applied's May 2026 cart recovery playbook, from an agency that builds these sequences, recommends three emails and estimates how the revenue splits between them. Klaviyo's benchmark report describes a common three-message sequence that starts later, with a reminder after 2 to 4 hours.

Email Digital Applied's timing and content Its estimated share of sequence revenue
First After 1 hour, a reminder with no offer About 60%
Second After 24 hours, with social proof such as reviews About 25%
Third After 72 hours, an incentive sent only to shoppers likely to need one About 15%

Add a Wait node before each email, and repeat the paid-order check after every wait so nobody who has already bought gets the next email. Each email uses the same Claude prompt with a different instruction for that stage. Digital Applied's point about the third email is worth copying: send the discount only where price looks like the objection, which is what the cart-value rules in the Step 2 prompt approximate.

Step 5

Measure recovery rate and iterate

Track three numbers:

  1. Recovery rate: recovered purchases divided by abandoned checkouts emailed. Digital Applied claims 15 to 30% for AI-tuned three-email sequences against 5 to 8% for basic ones. That is an agency's estimate, so use your own flow's current rate as the baseline to beat.
  2. Revenue per recovery: average value of recovered carts by touch number.
  3. Discount cost: total discounts divided by recovered revenue. Keep this under 10%.

After a month of data, iterate on the Claude prompt. If the recovery rate has not moved past your old flow's, give Claude more to work with, such as whether the shopper has bought before. If discount cost is above 10%, tighten the rules. If email 3 has near-zero recovery, drop it.

This same measurement loop is what makes AI email nurture workflows with HubSpot compound over time. Month six outperforms month one because the prompt evolves based on real recovery data.

The sum to run on your own store: take the number of abandoned cart emails you send a month and multiply it by $6.77, Klaviyo's 2026 average revenue per recipient, then by $13.70, its top 10%. At 3,000 emails a month that is about $20,000 against $41,000. The difference between the two is what a better flow is worth to you, and the setup here costs EUR 20 a month plus cents per email.

FAQ

What is the average cart abandonment rate in 2026?

The global average cart abandonment rate is 70.22%, according to the Baymard Institute. Mobile abandonment is higher again at 84%, compared to 72% on desktop, per Marketing LTB's roundup of cart statistics, which does not name the study behind that split.

How much revenue can AI-powered cart recovery recover?

Klaviyo's 2026 benchmarks across more than 110,000 customers put abandoned cart emails at $6.77 of revenue per recipient on average and $13.70 for the top 10% of senders. Klaviyo does not break down why the top group earns more, so test personalised emails against your current flow before you count on the higher figure.

Which ecommerce platforms work with this setup?

Any platform with webhooks: Shopify, WooCommerce, Magento, and BigCommerce. Shopify has the most mature n8n integration with pre-built cart recovery templates. For a Shopify and Klaviyo-specific setup, see our AI cart recovery with Shopify and Klaviyo guide.

How much does it cost to run?

n8n's Starter cloud plan is EUR 20 a month billed annually, and self-hosting the Community edition is free. Claude Sonnet 5.5 calls cost around a third of a US cent per email at Anthropic's published rates. Your email sending service is extra.

Do I need to write code?

Very little. The pipeline is built in n8n's visual editor. The two pieces of code in this guide, the request body in Step 2 and the parsing step in Step 3, can be pasted as they are.

Can I use ChatGPT instead of Claude?

Yes. Point the HTTP Request node at the OpenAI API instead. Its request and response formats differ from Claude's, so the request body and the line that reads the reply in the Code node both change. The webhook, checks, waits and email delivery stay the same.