Automation library · E-commerce

Shopify multi-module automation with Langchain

Started by another system calling it, and works across Email, Google Sheets, Notion, Shopify and two others. It hands the judgement calls to OpenAI. 78 steps, 6 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

78 stepsLarge: read it before trusting it with anything live
6Branches: places the flow splits
3Loops or waits
6Services it connects to

The flow

Starts it 8Model 26Logic 12Service 14

The steps in the order they run, from what starts it. The first 60 of 78.

  1. 1Incoming MessageWebhookStarts it
  2. 2Lookup Order APIHttp RequestService
  3. 3OpenAI Chat Model for AgentLm Chat Open AiModel
  4. 4Product Inquiry WebhookWebhookStarts it
  5. 5OpenAI Chat Model for Agent1Lm Chat Open AiModel
  6. 6Detect Abandoned CartShopify triggerStarts it
  7. 7OpenAI Chat Model for Agent2Lm Chat Open AiModel
  8. 8Hourly CheckCronStarts it
  9. 9OpenAI Chat Model for Agent3Lm Chat Open AiModel
  10. 10Trigger Restock WebhookWebhookStarts it
  11. 11Order Delivered TriggerShopify triggerStarts it
  12. 12OpenAI Chat Model for Agent4Lm Chat Open AiModel
  13. 13Listen for Review WebhookWebhookStarts it
  14. 14Campaign Schedule (e.g., Daily at 9 AM)CronStarts it
  15. 15OpenAI Chat Model for Agent5Lm Chat Open AiModel
  16. 16OpenAI Chat Model for Agent6Lm Chat Open AiModel
  17. 17SearchFAQsTool CodeModel
  18. 18LookupOrderStatusTool CodeModel
  19. 19RefineProductSelectionTool CodeModel
  20. 20DetermineDiscountTool CodeModel
  21. 21FormatLowStockReportTool CodeModel
  22. 22DraftReviewRequestEmailTool CodeModel
  23. 23OpenAI Chat ModelLm Chat Open AiModel
  24. 24GenerateCampaignEmailVariantTool CodeModel
  25. 25SuggestCampaignAdjustmentsTool CodeModel
  26. 26AnalyzeCampaignPerformanceTool CodeModel
  27. 27Preprocess Input for AgentFunctionLogic
  28. 28Get FAQs DataGoogle SheetsService
  29. 29AI AgentAgentModel
  30. 30Summarize Request & Get FiltersFunctionLogic
  31. 31AI Agent1 (Product Selection Refinement)AgentModel
  32. 32Wait PeriodWaitLogic
  33. 33AI Agent2 (Cart Recovery)AgentModel
  34. 34Fetch InventoryShopifyService
  35. 35AI Agent3 (Low Stock Reporting)AgentModel
  36. 36Send SMS Alert (Restock)TwilioService
  37. 37Wait 3 DaysWaitLogic
  38. 38AI Agent4 (Review Request Email)AgentModel
  39. 39OpenAIOpen AiModel
  40. 40Fetch Target Audience APIHttp RequestService
  41. 41AI Agent5 (Campaign Content Generation)AgentModel
  42. 42AI Agent6 (Campaign Adjustment)AgentModel
  43. 43Basic LLM ChainChain LlmModel
  44. 44Check if Escalation NeededIfLogic
  45. 45Search Products APIHttp RequestService
  46. 46Build Product CarouselFunctionLogic
  47. 47Fetch Customer InfoHttp RequestService
  48. 48Create Discount (if applicable)ShopifyService
  49. 49Filter Low Stock (<10)IfLogic
  50. 50Notify Slack (Low Stock)SlackService
  51. 51Fetch Customer Data (for Review)Http RequestService
  52. 52Send Review Request EmailEmail SendService
  53. 53Flag Negative ReviewIfLogic
  54. 54Segment Audience LogicFunctionLogic
  55. 55Prepare Campaign EmailFunctionLogic
  56. 56Adjust Campaign (Implement Suggestions)FunctionLogic
  57. 57Send restock Request Email1Email SendService
  58. 58Notify Human AgentSlackService
  59. 59Send AI Response to CustomerHttp RequestService
  60. 60Filter Out of StockIfLogic

How it's built

Starts on
Another system calling it
Steps
78, with 6 branches, 3 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Email, Google Sheets, Notion, Shopify, Slack, Twilio
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Email, Google Sheets, Notion, Shopify, Slack and Twilio accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 78 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 78 steps before you point it at anything that matters.