AutomationFlowsAI & RAG › Shopify Multi-module Automation with Gpt-4o, Langchain Agents & Integrations

Shopify Multi-module Automation with Gpt-4o, Langchain Agents & Integrations

BySam Yassine @samyassine on n8n.io

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…

Webhook trigger★★★★★ complexityAI-powered86 nodesGoogle SheetsHTTP RequestSlackNotionAgentOpenAI ChatShopify TriggerShopify
AI & RAG Trigger: Webhook Nodes: 86 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #4455 — we link there as the canonical source.

This workflow follows the Agent → Chainllm recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "gL5UcKMpmSQ3K4DH",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Shopify AI Agent Suite: Full E-commerce Automation (Support, Sales, Ops)",
  "tags": [],
  "nodes": [
    {
      "id": "ff8e2d74-aac9-4429-9ba3-56b12264d349",
      "name": "Incoming Message",
      "type": "n8n-nodes-base.webhook",
      "position": [
        8960,
        4500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f2b64658-549b-43ac-b334-5c73549225d8",
      "name": "Get FAQs Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        9280,
        4340
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b30cd34f-9660-4ed2-a2c0-54912aae0fa0",
      "name": "Lookup Order API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        9180,
        4500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f9852a2d-004e-4ace-9e0a-6e2f7600594f",
      "name": "Preprocess Input for Agent",
      "type": "n8n-nodes-base.function",
      "position": [
        9400,
        4500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e2c13270-0bcc-4908-9eb3-529a7e8dd78a",
      "name": "Check if Escalation Needed",
      "type": "n8n-nodes-base.if",
      "position": [
        10420,
        4500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a29eb1d5-c1f5-4670-9a6b-8cccaaed4279",
      "name": "Notify Human Agent",
      "type": "n8n-nodes-base.slack",
      "position": [
        10640,
        4420
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "15096e6d-6b57-4c49-9ee0-f7569b1bb48b",
      "name": "Send AI Response to Customer",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        10640,
        4580
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3a0e3e2e-409d-4900-a83b-d32a64a5d18d",
      "name": "Log Interaction",
      "type": "n8n-nodes-base.function",
      "position": [
        10860,
        4500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "620786ee-c3f8-43c5-88d9-fdaf46daf6f9",
      "name": "Store to Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        11080,
        4500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3bded487-943a-4a95-961b-f5a77b1f3094",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        10040,
        4500
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "08d3b564-fb21-44df-98c1-c941552dc761",
      "name": "OpenAI Chat Model for Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        10040,
        4720
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "18adc3a9-f69c-4afa-b18b-d3fe99285276",
      "name": "Product Inquiry Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        8960,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "96690fea-b811-4bd5-ae6b-409afc0f2fb8",
      "name": "Summarize Request & Get Filters",
      "type": "n8n-nodes-base.function",
      "position": [
        9180,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f4974c8f-649a-4381-86c5-262c4d3a2ec9",
      "name": "Search Products API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        9400,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f2a002cb-2e49-4150-b531-66c9913ee6d0",
      "name": "Filter Out of Stock",
      "type": "n8n-nodes-base.if",
      "position": [
        9620,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9ad660df-d2c5-411e-bbbc-9add36aaaacd",
      "name": "Sort by Rating",
      "type": "n8n-nodes-base.function",
      "position": [
        9840,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2933ea02-b173-4cd7-992c-99a2a7c67a64",
      "name": "Filter by Price",
      "type": "n8n-nodes-base.if",
      "position": [
        10060,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "af617846-7976-4908-bd4d-4ec1c10791ee",
      "name": "AI Agent1 (Product Selection Refinement)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        10360,
        5100
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "5ec16a2d-e9bf-4c31-9527-066b137c1134",
      "name": "OpenAI Chat Model for Agent1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        10360,
        5320
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "7ce0cbcf-0510-4990-9468-b1ca23123777",
      "name": "Build Product Carousel",
      "type": "n8n-nodes-base.function",
      "position": [
        10660,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a83c3b7d-8f03-4f21-9d6b-0868e02fdcef",
      "name": "Respond to User with Carousel",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        10840,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c55ad71d-67bb-428e-8cb1-665a4cebafe3",
      "name": "Log Product Suggestion",
      "type": "n8n-nodes-base.function",
      "position": [
        11020,
        5100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b36edb8f-e2f4-4b17-809b-0c9a5fb1442a",
      "name": "Detect Abandoned Cart",
      "type": "n8n-nodes-base.shopifyTrigger",
      "position": [
        8960,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "532ca0c0-761b-4bbc-9514-1ee148d504ac",
      "name": "Wait Period",
      "type": "n8n-nodes-base.wait",
      "position": [
        9180,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ed0d64f6-d9c3-4aea-98ac-dd839d51dccc",
      "name": "Fetch Customer Info",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        9400,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b3b69227-5dec-4c25-b7ad-2fbd42183d2e",
      "name": "Analyze Cart & Customer Data",
      "type": "n8n-nodes-base.function",
      "position": [
        9620,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "eaa4ff69-8863-4333-b9ff-a98e546541a0",
      "name": "AI Agent2 (Cart Recovery)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        9980,
        5700
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "733a52de-bb4f-46a7-a1bc-5c091bb6867a",
      "name": "OpenAI Chat Model for Agent2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        9980,
        5920
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "a7fc786d-ab78-4bb6-938b-0e4edb3419bf",
      "name": "Create Discount (if applicable)",
      "type": "n8n-nodes-base.shopify",
      "position": [
        10280,
        5700
      ],
      "parameters": {},
      "executeOnce": false,
      "typeVersion": 1,
      "continueOnFail": true
    },
    {
      "id": "015ab1ef-5b99-4f63-bd05-5621f6dd0f56",
      "name": "Send Recovery Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        10420,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d1e79f22-61dd-46e1-802a-74c95c72b84e",
      "name": "Send SMS Reminder",
      "type": "n8n-nodes-base.twilio",
      "position": [
        10640,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "346bee5b-fa1a-47ff-b8d0-a5a8dcb48f8f",
      "name": "Follow-Up Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        10860,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c6b466e5-4bd8-426b-ac6b-0aafb270c326",
      "name": "Check if Still Not Recovered",
      "type": "n8n-nodes-base.if",
      "position": [
        11080,
        5700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7023faf3-8192-4923-9788-29ef4dd7dd04",
      "name": "Hourly Check",
      "type": "n8n-nodes-base.cron",
      "position": [
        8960,
        6300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bf262d1c-179c-4ce0-86a4-a3b3a9ec01a6",
      "name": "Fetch Inventory",
      "type": "n8n-nodes-base.shopify",
      "position": [
        9180,
        6300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d377cdd9-f3c7-4111-90fd-4cd799017822",
      "name": "Filter Low Stock (<10)",
      "type": "n8n-nodes-base.if",
      "position": [
        9400,
        6300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2169ea13-ddc2-49af-b064-9ca1f321f916",
      "name": "AI Agent3 (Low Stock Reporting)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        9720,
        6280
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "d10a5414-42a4-4f69-a2fc-057efd576549",
      "name": "OpenAI Chat Model for Agent3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        9720,
        6520
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ce3b62c1-363e-423d-a18c-6e2727b270f8",
      "name": "Notify Slack (Low Stock)",
      "type": "n8n-nodes-base.slack",
      "position": [
        10100,
        6280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9cb14d1d-c748-47c7-9664-98d19774fd05",
      "name": "Generate Email Report (Low Stock)",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        10320,
        6280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "43ebb71a-0206-43cc-9789-4d9aa9524c45",
      "name": "Export to Sheets (Low Stock Log)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        10540,
        6280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3b104199-de25-4300-8db9-785ce8b4d12d",
      "name": "Trigger Restock Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        8960,
        7500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "aa08b3a8-a777-48bc-82ec-afd2bc67724a",
      "name": "Send SMS Alert (Restock)",
      "type": "n8n-nodes-base.twilio",
      "position": [
        9200,
        7500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8500d608-e78c-43e8-8086-5f9f9cf5d391",
      "name": "Order Delivered Trigger",
      "type": "n8n-nodes-base.shopifyTrigger",
      "position": [
        8960,
        6900
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8678e7ce-351e-477e-8ad5-fd5fe5f16f1b",
      "name": "Wait 3 Days",
      "type": "n8n-nodes-base.wait",
      "position": [
        9180,
        6900
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c8a4bc72-5a5e-4fbc-ac5e-1ddcb5975ada",
      "name": "Fetch Customer Data (for Review)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        9400,
        6900
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e827b58b-6870-4bb2-825e-d38b45545781",
      "name": "AI Agent4 (Review Request Email)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        9760,
        6900
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "267c557a-72ca-40be-8aeb-b56d900c3540",
      "name": "OpenAI Chat Model for Agent4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        9760,
        7120
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "650d17af-14ed-47a5-b4a6-1d349ede7875",
      "name": "Send Review Request Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        10300,
        6900
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "69ada9ce-7f57-4812-9b35-5304a9de924b",
      "name": "Listen for Review Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        9040,
        8200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "aa975d9b-9ee7-42e9-80e3-6408ba6b3111",
      "name": "Flag Negative Review",
      "type": "n8n-nodes-base.if",
      "position": [
        9480,
        8200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e8f48091-273d-4a94-a4e7-eb5995ed0c62",
      "name": "Notify Support Team (Negative Review)",
      "type": "n8n-nodes-base.slack",
      "position": [
        9820,
        8060
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6ad18cef-6f23-44ab-a003-9e1c97436f39",
      "name": "Add Review to Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        10160,
        8320
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "da0b160a-eec6-4a0f-b823-7d5488d47ab2",
      "name": "Campaign Schedule (e.g., Daily at 9 AM)",
      "type": "n8n-nodes-base.cron",
      "position": [
        8700,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "19ad1e8c-0f21-40a0-a1b7-c9bbedb2d2ef",
      "name": "Fetch Target Audience API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        8900,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6f6bf3ec-771e-4422-a49c-338bc01ae381",
      "name": "Segment Audience Logic",
      "type": "n8n-nodes-base.function",
      "position": [
        9100,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "90661a61-5a2f-4e5b-937a-1d444a1e3150",
      "name": "AI Agent5 (Campaign Content Generation)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        9360,
        9000
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "e538ec70-3f9b-4068-a06b-3a48e99c8322",
      "name": "OpenAI Chat Model for Agent5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        9360,
        9220
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "b7d6523c-917a-4dff-a677-bc1d913f53d8",
      "name": "Prepare Campaign Email",
      "type": "n8n-nodes-base.function",
      "position": [
        9660,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cb515acd-c27c-47f1-b970-cbd76ce583e4",
      "name": "Send Campaign Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        9940,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1e10a96c-7a11-45e7-ad1b-e12f03bb754f",
      "name": "Track Campaign Metrics API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        10160,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a6047b8d-9ede-4f23-b1e3-8606427ec9bc",
      "name": "AI Agent6 (Campaign Adjustment)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        10360,
        9000
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "c6b70dce-acd2-4c28-a267-3da956ba4e67",
      "name": "OpenAI Chat Model for Agent6",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        10360,
        9220
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "9d6ea179-d103-47d8-bb7c-a1c44d2ed38d",
      "name": "Adjust Campaign (Implement Suggestions)",
      "type": "n8n-nodes-base.function",
      "position": [
        10820,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "503a2ff6-829e-4553-a460-6baac6895833",
      "name": "Log Campaign Outcome & Adjustments",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        11160,
        9000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3a6afb57-f136-47f3-a16c-343538e06c40",
      "name": "SearchFAQs",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        10220,
        4720
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "05380f20-0647-4f3c-81f7-e69186bb7ec6",
      "name": "LookupOrderStatus",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        10360,
        4720
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "b6578a50-95c4-45d2-ae5b-c5247c5fac57",
      "name": "RefineProductSelection",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        10520,
        5320
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "b0bdc70a-641d-4f43-a03d-690f5f1131e4",
      "name": "DetermineDiscount",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        10200,
        5940
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "6d9e388e-94b2-47cb-ba55-5132425a864d",
      "name": "FormatLowStockReport",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        9880,
        6500
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "a2a5f992-c584-413e-9076-beb8e5c2b9bd",
      "name": "DraftReviewRequestEmail",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        10040,
        7100
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "abb5bd92-3100-4561-af7c-2423b4031da2",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        9460,
        7500
      ],
      "parameters": {},
      "typeVersion": 1.6
    },
    {
      "id": "0166b3d8-1d7e-444f-9796-e2e4d0ade435",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        9540,
        7660
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "97da4b78-14d2-4a49-aaaf-fd7bcbc9e2fe",
      "name": "Send restock Request Email1",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        9920,
        7500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3941730d-0c08-4bf1-af4a-02207df84135",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        9260,
        8200
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "58488498-de86-4695-97fa-9735adbce585",
      "name": "GenerateCampaignEmailVariant",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        9580,
        9220
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "aeaf662b-2aa9-4605-97fe-dd6783e73134",
      "name": "SuggestCampaignAdjustments",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        10700,
        9220
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "642817a7-f87d-412c-81d5-db4b2216ee99",
      "name": "AnalyzeCampaignPerformance",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        10520,
        9220
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "11e9c4ad-00d6-4487-b361-be9e8d5419a9",
      "name": "Customer Support AI (FAQ + Order Help)",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        4160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9081064c-6de2-4e76-a697-3ea7e9d5aa69",
      "name": "Product Inquiry AI Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        4820
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8f8ae88d-2af3-47d5-ab5b-ce8081705b18",
      "name": "Abandoned Cart Recovery Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        5420
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "749834ae-9f10-434a-801b-1f28fb45df3b",
      "name": "Low Stock Alerts Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        6020
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0ffb964a-1688-42c1-9861-eeaedeb7caed",
      "name": "Post-Purchase Review Request Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        6620
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "77b72d58-76f2-4012-a106-0e8efc2c4d82",
      "name": "Review Monitoring Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        7880
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "adb22824-5bdb-49b9-ad28-afaea62aea78",
      "name": "Email Campaign Automation Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        8660
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "29f59451-8c3c-47fa-8d94-edaa677bfe65",
      "name": "Manual Restock Alert Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8320,
        7400
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "cd56e1f8-720e-497d-becb-a6f727e1be75",
  "connections": {
    "OpenAI": {
      "main": [
        [
          {
            "node": "Flag Negative Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Check if Escalation Needed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SearchFAQs": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait 3 Days": {
      "main": [
        [
          {
            "node": "Fetch Customer Data (for Review)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Period": {
      "main": [
        [
          {
            "node": "Fetch Customer Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hourly Check": {
      "main": [
        [
          {
            "node": "Fetch Inventory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get FAQs Data": {
      "main": [
        [
          {
            "node": "Preprocess Input for Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Follow-Up Wait": {
      "main": [
        [
          {
            "node": "Check if Still Not Recovered",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort by Rating": {
      "main": [
        [
          {
            "node": "Filter by Price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Send restock Request Email1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Inventory": {
      "main": [
        [
          {
            "node": "Filter Low Stock (<10)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by Price": {
      "main": [
        [
          {
            "node": "AI Agent1 (Product Selection Refinement)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Interaction": {
      "main": [
        [
          {
            "node": "Store to Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incoming Message": {
      "main": [
        [
          {
            "node": "Preprocess Input for Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get FAQs Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lookup Order API": {
      "main": [
        [
          {
            "node": "Preprocess Input for Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DetermineDiscount": {
      "ai_tool": [
        [
          {
            "node": "AI Agent2 (Cart Recovery)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "LookupOrderStatus": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send SMS Reminder": {
      "main": [
        [
          {
            "node": "Follow-Up Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Human Agent": {
      "main": [
        [
          {
            "node": "Log Interaction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Customer Info": {
      "main": [
        [
          {
            "node": "Analyze Cart & Customer Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Out of Stock": {
      "main": [
        [
          {
            "node": "Sort by Rating",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Products API": {
      "main": [
        [
          {
            "node": "Filter Out of Stock",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Campaign Email": {
      "main": [
        [
          {
            "node": "Track Campaign Metrics API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Recovery Email": {
      "main": [
        [
          {
            "node": "Send SMS Reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flag Negative Review": {
      "main": [
        [
          {
            "node": "Notify Support Team (Negative Review)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add Review to Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FormatLowStockReport": {
      "ai_tool": [
        [
          {
            "node": "AI Agent3 (Low Stock Reporting)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Detect Abandoned Cart": {
      "main": [
        [
          {
            "node": "Wait Period",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Product Carousel": {
      "main": [
        [
          {
            "node": "Respond to User with Carousel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Low Stock (<10)": {
      "main": [
        [
          {
            "node": "AI Agent3 (Low Stock Reporting)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Campaign Email": {
      "main": [
        [
          {
            "node": "Send Campaign Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RefineProductSelection": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1 (Product Selection Refinement)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Segment Audience Logic": {
      "main": [
        [
          {
            "node": "AI Agent5 (Campaign Content Generation)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DraftReviewRequestEmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent4 (Review Request Email)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Order Delivered Trigger": {
      "main": [
        [
          {
            "node": "Wait 3 Days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Inquiry Webhook": {
      "main": [
        [
          {
            "node": "Summarize Request & Get Filters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Restock Webhook": {
      "main": [
        [
          {
            "node": "Send SMS Alert (Restock)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Slack (Low Stock)": {
      "main": [
        [
          {
            "node": "Generate Email Report (Low Stock)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send SMS Alert (Restock)": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent2 (Cart Recovery)": {
      "main": [
        [
          {
            "node": "Create Discount (if applicable)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Target Audience API": {
      "main": [
        [
          {
            "node": "Segment Audience Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Listen for Review Webhook": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AnalyzeCampaignPerformance": {
      "ai_tool": [
        [
          {
            "node": "AI Agent6 (Campaign Adjustment)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Check if Escalation Needed": {
      "main": [
        [
          {
            "node": "Notify Human Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send AI Response to Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Preprocess Input for Agent": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SuggestCampaignAdjustments": {
      "ai_tool": [
        [
          {
            "node": "AI Agent6 (Campaign Adjustment)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Track Campaign Metrics API": {
      "main": [
        [
          {
            "node": "AI Agent6 (Campaign Adjustment)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Agent": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Cart & Customer Data": {
      "main": [
        [
          {
            "node": "AI Agent2 (Cart Recovery)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GenerateCampaignEmailVariant": {
      "ai_tool": [
        [
          {
            "node": "AI Agent5 (Campaign Content Generation)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Agent1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1 (Product Selection Refinement)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Agent2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent2 (Cart Recovery)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Agent3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent3 (Low Stock Reporting)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Agent4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent4 (Review Request Email)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Agent5": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent5 (Campaign Content Generation)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Agent6": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent6 (Campaign Adjustment)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send AI Response to Customer": {
      "main": [
        [
          {
            "node": "Log Interaction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to User with Carousel": {
      "main": [
        [
          {
            "node": "Log Product Suggestion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent3 (Low Stock Reporting)": {
      "main": [
        [
          {
            "node": "Notify Slack (Low Stock)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent6 (Campaign Adjustment)": {
      "main": [
        [
          {
            "node": "Adjust Campaign (Implement Suggestions)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Discount (if applicable)": {
      "main": [
        [
          {
            "node": "Send Recovery Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Request & Get Filters": {
      "main": [
        [
          {
            "node": "Search Products API",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI Agent1 (Product Selection Refinement)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent4 (Review Request Email)": {
      "main": [
        [
          {
            "node": "Send Review Request Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Customer Data (for Review)": {
      "main": [
        [
          {
            "node": "AI Agent4 (Review Request Email)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Email Report (Low Stock)": {
      "main": [
        [
          {
            "node": "Export to Sheets (Low Stock Log)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Support Team (Negative Review)": {
      "main": [
        [
          {
            "node": "Add Review to Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent5 (Campaign Content Generation)": {
      "main": [
        [
          {
            "node": "Prepare Campaign Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adjust Campaign (Implement Suggestions)": {
      "main": [
        [
          {
            "node": "Log Campaign Outcome & Adjustments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Campaign Schedule (e.g., Daily at 9 AM)": {
      "main": [
        [
          {
            "node": "Fetch Target Audience API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1 (Product Selection Refinement)": {
      "main": [
        [
          {
            "node": "Build Product Carousel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

This workflow handles customer enquiries for Shopify stores by combining AI agents with live order data and support tools. It receives messages, pulls FAQs from Google Sheets, checks orders via the API, and uses a Langchain agent powered by GPT-4o to generate accurate replies. When issues need human attention it routes them to Slack, otherwise it sends the response straight back to the customer.

Use it for high-volume Shopify support where quick, informed answers matter. Skip it for simple rule-based replies or when you need full manual control over every message. Common variations include adding Notion for knowledge bases or expanding the agent to handle refunds and returns.

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…

Source: https://n8n.io/workflows/4455/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Tired of grinding out YouTube content? This n8n workflow turns AI into your personal video factory—creating engaging, faceless shorts on autopilot. Perfect for creators, marketers, or side-hustlers lo

HTTP Request, Google Drive, Google Sheets +6
AI & RAG

Faceless YouTube Generator. Uses httpRequest, limit, googleDrive, googleSheets. Webhook trigger; 49 nodes.

HTTP Request, Google Drive, Google Sheets +7
AI & RAG

This workflow transforms natural language queries into research reports through a five-stage AI pipeline. When triggered via webhook (typically from Google Sheets using the companion [](https://gist.g

Redis, Agent, Output Parser Structured +7
AI & RAG

Whatsapp Lead Agent. Uses httpRequest, hunter, @tavily/n8n-nodes-tavily, @mendable/n8n-nodes-firecrawl. Webhook trigger; 35 nodes.

HTTP Request, Hunter, @Tavily/N8N Nodes Tavily +11
AI & RAG

[](https://www.youtube.com/watch?v=NAn5BSr15Ks) &gt; This workflow connects a Slack chatbot with AI agents and Google Sheets to automate candidate resume evaluation. It extracts resume details, identi

HTTP Request, Output Parser Structured, OpenAI Chat +6