Automation library · E-commerce

Monitor Shopify low-stock items with OpenAI and Google Sheets

Started by a clock, and works across Gmail, Google Sheets, Shopify and Slack. It hands the judgement calls to OpenAI. 18 steps, 3 branches, 1 loop or waits: a working afternoon to understand properly.

MediumCalls a model: OpenAI

18 stepsMedium: a working afternoon
3Branches: places the flow splits
1Loop or waits
4Services it connects to

The flow

Starts it 1Model 2Logic 9Service 6

The steps in the order they run, from what starts it.

  1. 1Trigger in Schedule timeSchedule triggerStarts it
  2. 2AI text genratorLm Chat Open AiModel
  3. 3Fetch ProductsShopifyService
  4. 4Genrate Alert MessageChain LlmModel
  5. 5Prepare Product dataSetLogic
  6. 6Formate Alert MessageCodeLogic
  7. 7Process each productSplit In BatchesLogic
  8. 8Check existing recordsGoogle SheetsService
  9. 9Set stock prioritySwitchLogic
  10. 10Check low stockIfLogic
  11. 11New or existing records??IfLogic
  12. 12High Priority AlertSetLogic
  13. 13Medium Priority AlertSetLogic
  14. 14Low Priority AlertSetLogic
  15. 15Add product alert to sheetGoogle SheetsService
  16. 16Update existing alert in sheetGoogle SheetsService
  17. 17Send slack alertSlackService
  18. 18Notify teamGmailService

How it's built

Starts on
A clock
Steps
18, with 3 branches, 1 loop or waits
Size
Medium: a working afternoon
Connects to
Gmail, Google Sheets, Shopify, Slack
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on a clock.

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?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

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 18 steps before you point it at anything that matters.