AutomationMart
Home/Browse/Shopify multi-module automation with GPT-4o, Langchain agents & integrations
n8n

Shopify multi-module automation with GPT-4o, Langchain agents & integrations

n8nn8n78 modulesv1.0
ShopifySlackNotionGoogle SheetsOpenAITwilio

This n8n workflow orchestrates a powerful suite of AI Agents and automations to manage and optimize various aspects of an e-commerce operation, particularly for platforms like Shopify. It leverages Langchain AI Agents powered by OpenAI, along with a variety of integrated services, to handle customer support, product recommendations, abandoned cart recovery, inventory management, post-purchase engagement, review monitoring, marketing campaigns, and operational alerts. Tools & Services Used - n8n:

At a glance

Shopify multi-module automation with GPT-4o, Langchain agents & integrations is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Shopify, Slack, Notion, Google Sheets. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Shopify, Slack, Notion, Google Sheets, OpenAI, Twilio
Modules
78
Price
Free
Version
v1.0
Shopify multi-module automation with GPT-4o, Langchain agents & integrations workflow diagram

About this workflow

This n8n workflow orchestrates a powerful suite of AI Agents and automations to manage and optimize various aspects of an e-commerce operation, particularly for platforms like Shopify. It leverages Langchain AI Agents powered by OpenAI, along with a variety of integrated services, to handle customer support, product recommendations, abandoned cart recovery, inventory management, post-purchase engagement, review monitoring, marketing campaigns, and operational alerts. Tools & Services Used - n8n: Core automation and orchestration platform. - Langchain AI Agents: For intelligent decision-making, task execution, and natural language processing across multiple modules. - OpenAI (e.g., GPT-4o Mini): Powers the AI Agents and direct LLM calls for tasks like sentiment analysis and content generation. - Shopify (Conceptual - requires specific API/Webhook setup): For triggers (abandoned cart, order delivered) and actions (fetching products/inventory, creating discounts). - Google Sheets: Used as a data store for FAQs, logging low stock, review databases, and campaign outcomes. - Slack: For internal team notifications (escalations, low stock, negative reviews). - Twilio (or similar SMS service): For sending SMS alerts (cart recovery, restock notifications). - Email (Generic SMTP/API): For sending various emails (AI responses, recovery emails, review requests, campaign emails). - Notion: For logging customer interactions. - HTTP Request Nodes: For generic API interactions (fetching customer info, product search, CRM, campaign tracking). - Webhook Nodes: For receiving external triggers (incoming messages, product inquiries, review submissions, restock signals). - Cron Nodes: For scheduled tasks (hourly inventory checks, daily campaigns). Workflow Overview This workflow is a collection of interconnected sub-workflows, each designed to automate a specific e-commerce process: 1. Customer Support & Escalation Handles incoming customer messages, attempts to answer with FAQs or order status using an AI Agent, and escalates to a human agent via Slack if necessary. Logs interactions to Notion. 2. Product Inquiry & Recommendation Processes product inquiries, searches a product catalog, filters/sorts results, uses an AI Agent for selection refinement, and can build a product carousel for user response. 3. Abandoned Cart Recovery Detects abandoned carts, fetches customer data, uses an AI Agent to strategize recovery (e.g., offer discounts), and sends follow-up communications via email/SMS. 4. Inventory Management (Low Stock Alert) Periodically checks inventory levels, identifies low-stock items, uses an AI Agent to format reports, and notifies relevant teams via Slack/email, logging to Google Sheets. 5. Post-Purchase Review Request After a set period post-delivery, an AI Agent drafts and initiates sending a personalized product review request email to the customer. 6. Review Monitoring & Flagging Listens for new product reviews, uses an AI model for sentiment analysis, alerts a support team for negative reviews via Slack, and logs all reviews. 7. Scheduled Marketing Campaigns Fetches target audiences, segments them, uses AI Agents to generate tailored email content, sends campaigns, tracks basic metrics, and employs another AI Agent to suggest campaign adjustments. 8. Manual Restock Alert & Logging Allows triggering a restock notification via webhook, sends an SMS alert, and uses an LLM to log the event. Prerequisites Ensure you have active accounts and necessary API keys/credentials for: - OpenAI - Shopify (or your e-commerce platform API) - Google Cloud (for Google Sheets API) - Slack (Bot Token) - Twilio (Account SID, Auth Token, From Number) - Your Email Sending Service (SMTP details or API key) - Notion (Integration Token) - Any other external APIs used (e.g., CRM, Product Search, Customer Info, Campaign Tracking) How to Use This Template Step 1: Import the Template - Open your n8n instance. - Go to “Workflows” > “Create Workflow”. - Click the three dots (…) > “Import from File”. - Upload the downloaded JSON file of this workflow. Step 2: Configure Critical Nodes & Credentials This is the most crucial step. Systematically go through each of the 8 sections outlined in the Sticky Notes within the workflow and configure the relevant nodes: - SECTION 1 (Customer Support): - Get FAQs Data (Google Sheets): Set sheetId to YOURSHEETIDHERE and configure Google API credentials. - Lookup Order API (HTTP Request): Set url to YOURORDERLOOKUPAPIENDPOINTHERE. - Notify Human Agent (Slack): Configure Slack API credentials and channel. - Send AI Response to Customer (HTTP Request): Set url to YOURCUSTOMERRESPONSEAPIENDPOINTHERE. - Store to Notion (Notion): Set pageId (Database ID) to YOURNOTIONDATABASEURLORIDHERE and Notion API credentials. - SECTION 2 (Product Inquiry): - Search Products API (HTTP Request): Set url to YOURPRODUCTSEARCHAPIENDPOINTHERE. - Build Product Carousel (Function): Update YOURDEFAULTPRODUCTIMAGEURLHERE and YOURFALLBACKPRODUCTURLHERE. - Respond to User with Carousel (HTTP Request): Set url for sending carousel data. - SECTION 3 (Abandoned Cart): - Detect Abandoned Cart (Shopify Trigger): Configure Shopify credentials and ensure the correct trigger event. - Fetch Customer Info (HTTP Request): Set url to YOURCUSTOMERINFOAPIENDPOINTHERE. - Create Discount (if applicable) (Shopify): Configure Shopify credentials and review discount creation parameters. - Send Recovery Email (HTTP Request/Email Send): Set email API endpoint or SMTP credentials. - Send SMS Reminder (Twilio): Configure Twilio credentials and from number (YOURTWILIOPHONENUMBERHERE). - SECTION 4 (Low Stock Alerts): - Fetch Inventory (Shopify): Configure Shopify credentials. - Notify Slack (Low Stock) (Slack): Configure Slack API credentials and channel. - Generate Email Report (Low Stock) (Email Send): Configure SMTP/email credentials and to address. - Export to Sheets (Low Stock Log) (Google Sheets): Set sheetId to YOURINVENTORYLOGSHEETIDHERE and Google API credentials. - SECTION 5 (Review Request): - Order Delivered Trigger (Shopify Trigger): Configure Shopify credentials. - Fetch Customer Data (for Review) (HTTP Request): Set url to YOURCUSTOMERINFOAPIENDPOINTHERE. - DraftReviewRequestEmail (Tool): Update YOURPRODUCTPAGEURLBASEHERE and YOURWEBSITEURLHERE. - Send Review Request Email (Email Send): Configure SMTP/email credentials. - SECTION 6 (Review Monitoring): - OpenAI node (currently Assistant Create): IMPORTANT: For sentiment analysis, change this node type to @n8n/n8n-nodes-langchain.lmChatOpenAi. Then configure its prompt for sentiment analysis (e.g., System: "Analyze sentiment. Respond with positive, negative, or neutral." User: "Review: {{ $('Listen for Review Webhook').first().json.body.reviewtext }}"). Set OpenAI credentials. - Notify Support Team (Negative Review) (Slack): Configure Slack API credentials and channel. - Add Review to Database (Google Sheets): Set sheetId to YOURREVIEWSDATABASESHEETIDHERE and Google API credentials. - SECTION 7 (Marketing Campaigns): - Fetch Target Audience API (HTTP Request): Set url to YOURCRMAPIFORAUDIENCEHERE. - GenerateCampaignEmailVariant (Tool): Update YOURCAMPAIGNLANDINGPAGEHERE. - Send Campaign Email (Email Send): Configure SMTP/email credentials. - Track Campaign Metrics API (HTTP Request): Set url for YOURCAMPAIGNTRACKINGAPIENDPOINTHERE. - Log Campaign Outcome & Adjustments (Google Sheets): Set sheetId to YOURCAMPAIGNLOGSHEETIDHERE and Google API credentials. - SECTION 8 (Manual Restock): - Send SMS Alert (Restock) (Twilio): Configure Twilio credentials, from number (YOURTWILIOPHONENUMBERHERE), and to (WAREHOUSEMANAGERPHONENUMBERHERE). - OpenAI Chat Model (for Basic LLM Chain): Configure OpenAI credentials. - Send restock Request Email1 (Email Send): Configure SMTP/email credentials and to address. Step 3: Implement Tool Logic - Go into each @n8n/n8n-nodes-langchain.toolCode node (e.g., SearchFAQs, RefineProductSelection, DetermineDiscount, etc.). - The current JavaScript is placeholder. You MUST replace this with actual JavaScript logic that performs the intended action for each tool, often by making API calls or processing data based on the agent's input. Step 4: Review AI Agent Prompts & Tool Connections - Carefully review the systemMessage for each AI Agent node to ensure it accurately reflects its role and how it should use its tools. - CRITICAL: Verify the index for tools connected to each AI Agent. Each tool connected to a single agent must have a unique, sequential index (0, 1, 2, ...). - AI Agent (ID cd71629d-... in your JSON): SearchFAQs tool should be index: 0, LookupOrderStatus tool should be index: 1. (Please double-check and correct the connection indices in your actual workflow file if they are still both pointing to index 0). - AI Agent6 (ID 4c24879b-... in your JSON): AnalyzeCampaignPerformance tool should be index: 0, SuggestCampaignAdjustments tool should be index: 1. (Please double-check and correct the connection indices in your actual workflow file if they are still both pointing to index 0). Initial Test Run - Disable most of the workflow sections initially. - Focus on one section at a time (e.g., Section 1: Customer Support). - Manually trigger the first node (e.g., simulate an incoming webhook). - Execute node by node, checking the output and debugging configurations and tool logic. - For time-based triggers (Cron, Wait nodes), temporarily shorten the durations for faster testing. - Once a section is working, move to the next. Use Cases - E-commerce Businesses (Shopify, etc.): To automate customer service, marketing, sales recovery, and operations. - Digital Marketing Agencies: To offer advanced automation services to e-commerce clients. - Freelancers & Consultants: To build and deploy sophisticated AI-driven e-commerce solutions. - n8n Developers: As a comprehensive template and learning resource for building complex multi-agent systems.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Automate your invoice data extraction with Rossum Elis and store the results in Google Sheets

List invoices uploaded to Rossum Elis, then extract the invoice fields automatically and store the result in a Google Sheets spreadsheet.

Free

Lookup IP geolocation details with IP-API.com via webhook

This n8n template enables you to instantly retrieve detailed geolocation information for any given IP address by simply sending a webhook request. Leverage the power of IP-API.com to gain insights into user locations, personalize experiences, or enhance security protocols within your automated workflows. --- 🔧 How it works - Receive IP Webhook: This node acts as the entry point, listening for incoming POST requests. It expects a JSON body containing an ip property with the IP address you wish to

Free

Automated BBB Lead Generation with BrowserAct

Automated BBB Lead Generation with BrowserAct This workflow lets you scrape BBB leads, clean data, remove duplicates, store results, and auto-send emails. 1. BrowserAct – Run Workflow Build your scraping flow in BrowserAct, connect the API to Make, and it returns scraped BBB business data. 2. JSON Parse Converts raw BrowserAct JSON into a clean array. 3. Iterator – Process Each Lead Sends each business through the workflow one at a time. 4. Google Sheets – Search for Duplicates Checks if th

Free

Publish SEO blogs to WordPress with GPT-4.1, DALL-E, Gemini, and Google Sheets

Automatically publish blog content to WordPress with AI-generated branded images, internal linking, and client reporting using Google Sheets, OpenAI, and Gemini What this workflow does This workflow receives written blog content from your content creation automation and handles the complete WordPress publishing process. It adds internal links to your content based on target keywords, generates 3 AI-powered branded images (thumbnail + 2 content images), uploads them to WordPress, inserts them int

Free

Update Google Sheets cells with new WooCommerce events

Automatically update Google Sheets cells with new WooCommerce events. Streamline data management by syncing WooCommerce updates directly to your Google Sheets.

Free

Schedule & publish all Instagram content types with Facebook Graph API

Automated Instagram posting with Facebook Graph API and content routing Who is this for? This workflow is perfect for social media managers, content creators, digital marketing agencies, and small business owners who need to automate their Instagram posting process. Whether you're managing multiple client accounts or maintaining consistent personal branding, this template streamlines your social media operations. What problem is this workflow solving? Manual Instagram

Free

Create AI-curated news digests with GPT-5.1, NewsAPI, Tavily & Telegram

Overview Staying up to date with fast-moving topics like AI, machine learning, research, or your specific industry can be tricky. To solve this for myself (for me, it is mostly AI and automation topics), I built and use this n8n workflow: it pulls fresh articles using NewsAPI based on my topics of interest, lets an AI agent pick the 5 most relevant ones, enriches them with a Tavily search engine, and sends a clean, readable newsletter straight to Telegram - in the language you specify. In this p

Free

Extract and clean YouTube video transcripts with RapidAPI

Here is your refined template description with detailed step-by-step instructions, markdown formatting, and customization guidance. --- YouTube Transcript Extraction Workflow This n8n workflow extracts and processes transcripts from YouTube videos using the YouTube Transcript API on RapidAPI. It allows users to retrieve subtitles from YouTube videos, clean them up, and return structured transcript data for further processing. Table of Contents - Problem Statement & Target Audience - Pre-con

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free