Skip to main content

Recover Shopify abandoned carts with email, SMS, WhatsApp & Facebook retargeting

Workflow preview

Workflow preview
100%
Recover Shopify abandoned carts with email, SMS, WhatsApp & Facebook retargeting preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow is a complete, production ready solution for recovering abandoned carts in Shopify stores using a multi channel, multi touch approach. It automates personalized follow ups via Email, ...

Best for

  • Lead Nurturing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.wait, n8n-nodes-base.if, n8n-nodes-base.shopify, n8n-nodes-base.sendgrid

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Țugui Dragoș.

Original n8n.io source

1.1 Workflow description

Title
Recover Shopify abandoned carts with email, SMS, WhatsApp & Facebook retargeting
Workflow name
Recover Shopify abandoned carts with email, SMS, WhatsApp & Facebook retargeting

This workflow is a complete, production-ready solution for recovering abandoned carts in Shopify stores using a multi-channel, multi-touch approach. It automates personalized follow-ups via Email, SMS, and WhatsApp, tracks every customer interaction for multi-touch attribution, and enables advanced retargeting and analytics.

Key features:

  • Multi-step, timed recovery sequence (Email → SMS → Email → WhatsApp)
  • Customer segmentation (new, returning, VIP) and A/B testing
  • Dynamic discounting and personalized messaging
  • Touchpoint logging to Google Sheets for attribution analysis
  • Facebook Custom Audience retargeting for unrecovered carts
  • Slack notifications for high-value cart recoveries

What does this workflow do?

  1. Listens for abandoned cart events from Shopify (or any e-commerce platform) via webhook.
  2. Normalizes and enriches cart data by fetching full cart details and customer purchase history.
  3. Predicts the likely reason for abandonment (e.g., price sensitivity, checkout complexity, technical issues) using rule-based logic.
  4. Segments the customer (new, returning, VIP), assigns an A/B test group, and generates a personalized discount and checkout URL.
  5. Runs a timed, multi-channel recovery sequence:
    • 1 hour after abandonment: Checks if the order is completed. If not, sends a personalized Email #1 and logs the touchpoint.
    • 4 hours after abandonment: Checks again. If not recovered, sends an SMS with a discount code and logs the touchpoint.
    • 24 hours after abandonment: Checks again. If not recovered, sends Email #2 (with social proof/urgency) and logs the touchpoint.
    • 48 hours after abandonment: Final check. If not recovered, sends a WhatsApp reminder and logs the touchpoint.
  6. If the cart is still not recovered: Hashes customer identifiers and adds them to a Facebook Custom Audience for retargeting.
  7. Logs every touchpoint (email, SMS, WhatsApp) to a Google Sheet for multi-touch attribution analysis.
  8. Sends a Slack notification if a high-value cart is recovered.

Why is this workflow useful?

  • Boosts recovery rates: By using multiple channels and personalized timing, you maximize the chance of recovering lost sales.
  • Improves attribution: Every customer interaction is logged, so you can analyze which channels and messages drive conversions.
  • Enables advanced retargeting: Unrecovered carts are automatically added to a Facebook Custom Audience for paid retargeting.
  • Saves time: Fully automated, with easy configuration for your store, messaging, and analytics.
  • Scalable and extensible: Easily adapt the sequence, add more channels, or integrate with other tools.

How to install and configure

1. Prerequisites

  • n8n instance (v2.0.2+ recommended)
  • Shopify store with API access
  • Accounts and API credentials for:
    • SendGrid (email)
    • Twilio (SMS)
    • WhatsApp Business API
    • Google Sheets (service account)
    • Facebook Graph API (for Custom Audiences)
    • Slack (for notifications)

2. Setup steps

  1. Import the workflow into your n8n instance.
  2. Configure the “Workflow Configuration” node:
    • Set your Shopify domain, API URLs, Google Sheets ID, and high-value threshold.
  3. Connect all required credentials in the respective nodes:
    • Shopify, SendGrid, Twilio, WhatsApp, Google Sheets, Facebook Graph API, Slack.
  4. Create a Google Sheet named “Touchpoints” with columns: cart_id, customer_id, touchpoint_type, timestamp, channel, ab_group.
  5. Set up the webhook in your Shopify store (or e-commerce platform) to trigger the workflow on cart abandonment.
  6. Test the workflow with a sample abandoned cart event to ensure emails, SMS, WhatsApp, and logging work as expected.
  7. Enable the workflow in n8n for live operation.

Node-by-node breakdown

  • Abandoned Cart Webhook: Receives abandoned cart events.
  • Workflow Configuration: Stores global settings (API URLs, Shopify domain, Google Sheets ID, high-value threshold).
  • Normalize Cart Data: Cleans and standardizes incoming cart data.
  • Fetch Cart Details / Fetch Customer History: Enriches data with full cart and customer info.
  • Predict Abandonment Reason: Uses business logic to guess why the cart was abandoned.
  • Personalization Engine: Segments the customer, assigns A/B group, calculates discount, and builds checkout URL.
  • Customer Segment Check / Device Type Check: Applies routing logic for personalized messaging.
  • Wait / Check Order Status / Generate & Send Messages: Timed sequence for Email, SMS, and WhatsApp, with order status checks at each step.
  • Log Touchpoint (Google Sheets): Records every message sent for attribution.
  • Attribution Merge: Combines all touchpoints into a single journey for analysis.
  • Hash Customer Data for Facebook / Add to Retargeting Audience: Adds unrecovered carts to a Facebook Custom Audience.
  • Check Cart Value Threshold / Notify High-Value Recovery: Sends Slack alerts for high-value recoveries.

Customization tips

  • Adjust wait times and message content to fit your brand and audience.
  • Add or remove channels (e.g., push notifications, phone calls) as needed.
  • Expand the Google Sheet for deeper analytics (e.g., add UTM parameters, campaign IDs).
  • Integrate with your CRM or analytics platform for end-to-end tracking.

Troubleshooting

  • Make sure all API credentials are set and tested.
  • Check Google Sheets permissions for the service account.
  • Test each channel (email, SMS, WhatsApp) individually before going live.
  • Review the workflow execution logs in n8n for errors or failed steps.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Abandoned Cart Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 2 - Workflow Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Normalize Cart Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Fetch Cart Details

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 5 - Fetch Customer History

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 6 - Predict Abandonment Reason

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Personalization Engine

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Wait 1 Hour

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 9 - Check Order Completed (1h)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Check Order Status (1h)

Type / Role
n8n-nodes-base.shopify - shopify
Config choices
Version 1

Block 11 - Generate Email 1 Content

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Send Email 1

Type / Role
n8n-nodes-base.sendGrid - sendGrid
Config choices
Version 1

Block 13 - Log Email 1 Touchpoint

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 14 - Attribution - Email 1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Wait Until 4 Hours

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 16 - Check Order Status (4h)

Type / Role
n8n-nodes-base.shopify - shopify
Config choices
Version 1

Block 17 - Check Order Completed (4h)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Prepare SMS Content

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - Send SMS with Discount

Type / Role
n8n-nodes-base.twilio - twilio
Config choices
Version 1

Block 20 - Log SMS Touchpoint

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 21 - Wait Until 24 Hours

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 22 - Check Order Status (24h)

Type / Role
n8n-nodes-base.shopify - shopify
Config choices
Version 1

Block 23 - Check Order Completed (24h)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 24 - Generate Email 2 Content

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Showing the first 24 of 54 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Recover Shopify abandoned carts with email, SMS, WhatsApp & Facebook retargeting
Complexity advanced
Nodes 54
Categories Lead Nurturing, AI Summarization
Author Țugui Dragoș
Published 14 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11805/11805.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Recover Shopify abandoned carts with email, SMS, WhatsApp & Facebook retargeting do?

This workflow is a complete, production ready solution for recovering abandoned carts in Shopify stores using a multi channel, multi touch approach. It automates personalized follow ups via Email, ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, AI Summarization use case.