Multi-Stage E-Commerce Abandoned Cart Recovery Sequence - n8n Workflow

Automate abandoned cart recovery using a multi-stage discount sequence with n8n. This powerful n8n workflow integrates a webhook n8n trigger, Gmail, and Google Sheets for robust tracking and dynamic email delivery.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • E-commerce store owners and marketing managers looking to maximize conversion rates.

  • Automation specialists needing high-value n8n templates for transactional email marketing.

  • Users who need complex, time-delayed sequences managed reliably by an n8n workflow.

  • Developers integrating third-party e-commerce platforms using webhooks.

Overview

Recovering revenue from abandoned carts is crucial for any online business. This comprehensive n8n workflow automates a strategic, three-stage email sequence, escalating the discount offer over 72 hours to maximize recovery chances.

The automation starts with a dedicated webhook n8n trigger, filters carts based on value and customer data, dynamically generates unique discount codes and schedules, and tracks the sequence initiation in Google Sheets. By using conditional logic and precisely timed delays via the wait n8n node, this n8n workflow ensures customers receive personalized, timely incentives, transforming lost sales into recovered revenue. This provides a scalable alternative to costly proprietary cart recovery platforms.

How it Works

The n8n workflow operates through the following steps:


  1. Trigger: The Cart Abandoned Webhook n8n trigger listens for a POST request from your e-commerce platform (e.g., when a cart session expires). The webhook receives cart details, customer email, and cart value.

  2. Configuration: The Recovery Settings n8n node defines critical variables like baseUrl, fromEmail, and the discount tiers (10%, 15%, 20%).

  3. Qualification: The Qualify Cart n8n node uses an If statement to ensure the workflow only proceeds if the cartvalue exceeds $50 and a valid customeremail is present.

  4. Data Generation: The Generate Recovery Data n8n code node dynamically creates unique discount codes for each stage (based on the cart ID) and calculates the ISO time stamps for the 1, 24, and 72-hour delays.

  5. Tracking: The Track Recovery Start n8n node immediately logs the unique recovery ID, customer email, and cart value to Google Sheets for performance analytics.

  6. Sequence 1 (1 Hour): The workflow waits 1 hour (Wait 1 Hour) before the Send First Recovery Email Gmail n8n node sends the initial 10% discount offer.

  7. Sequence 2 (24 Hours Total): After an additional 23-hour wait (Wait 23 Hours More), the second Gmail n8n node sends a 15% discount email, emphasizing urgency.

  8. Sequence 3 (72 Hours Total): Following a final 48-hour wait (Wait 48 Hours More), the last Gmail n8n node sends the final, exclusive 20% discount offer, completing the recovery sequence.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON and paste it into a new workflow within your n8n instance.

  2. Set Up Credentials: You must configure credentials for the following services:

Gmail: Authenticate the Gmail n8n node to allow the workflow to send emails from your designated email address.
Google Sheets: Authenticate the Google Sheets n8n node. Create a new tracking sheet and paste its Document ID into the Track Recovery Start node.

  1. Configure Webhook: Activate the Cart Abandoned Webhook n8n trigger and copy the generated test and production URLs. Configure your e-commerce platform (or a middleware system) to send a POST request with the cart data (including cartid, customeremail, cart_value, and items) to this URL when a cart is abandoned.

  2. Customize Settings: Open the Recovery Settings n8n node and update the baseUrl and discount percentages to match your store's policies. You should also customize the HTML content within the three Gmail n8n templates.

Node Details

Cart Abandoned Webhook (n8n trigger): The entry point for the entire n8n workflow. It is configured to listen for a POST request on the path /cart-abandoned and expects data containing customer and cart details.
Recovery Settings (Set n8n node): Used as a centralized configuration hub to define fixed parameters (base URL, discount values) used downstream in the n8n workflow. This simplifies adjustments.
Qualify Cart (If n8n node): Implements business logic by filtering input data. Only carts with a value greater than 50 and a known email address proceed, optimizing resource use.
Generate Recovery Data (Code n8n node): A critical custom-code n8n node that generates unique, trackable discount codes and calculates the precise future timestamps (using JavaScript Date functions) for the staggered email sequence.
Gmail (n8n node): Used three times (Send First/Second/Final Recovery Email) to deliver the recovery emails. Each template uses dynamic expressions (Handlebars and n8n expressions) to inject the customer name, cart items, and the dynamically generated discount codes and recovery links.
Wait (n8n node): Used three times to create the specific time delays (1 hour, 23 hours, 48 hours) required for the multi-day recovery sequence. This ensures precise timing within the n8n workflow.


  • Track Recovery Start (Google Sheets n8n node): Appends a new row to a specified Google Sheet, recording key metrics and the recoveryId as soon as the qualification criteria are met. This provides instant analytics for the n8n template.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by
Rodrigue
Rodrigue

Featured*