Practical case / Warehouse and store replenishment

04 · Warehouse: send a daily low-stock summary

Build a restocking alert that reads store inventory, detects low stock and emails the products that need review.

·

50–70 minutesBeginner level
What you will build
A daily flow that turns inventory into an emailed restocking report.
Tools
SharePoint · Power Automate · Microsoft 365 Outlook
On this page · 8 sections

The business request

The person opening Barrio Demo checks replenishment needs each morning. Today they inspect a sheet manually; your solution must send only items whose stock is less than or equal to the minimum.

You will build a report, not automatic purchasing. You will not change quantities or send supplier orders. This case is independent of Dataverse and labs 01–03.

1. Prepare inventory

Download this page's CSV. Its eight rows represent a small store catalog using fictitious data.

In a practice SharePoint site, open Site contents → New → List → Blank list. Name it LAB Stock Almacen. Rename the display column Title to SKU: its internal name will remain Title.

Add these columns with exact names, without spaces or accents:

Column Type Configuration
Producto Single line of text Required
Existencias Number Zero decimal places; minimum 0
Minimo Number Zero decimal places; minimum 0
Precio Number Two decimal places; minimum 0; euros in this case
Location Single line of text Shelf code

Enter the eight rows using Edit in grid view, respecting column order. You can paste from a spreadsheet; if regional settings change decimal separators, adapt the price format. You can also enter them individually. The CSV is the data reference, not an instruction to replace the list.

Check 101 units in total. Coffee has 4 units, oil 0, and milk 12.

2. Schedule the alert

In Power Automate, select Create → Scheduled cloud flow. Name: LAB Barrio Demo Reposicion. Frequency: 1 day.

In Recurrence, select the Madrid time zone and 09:00. In lists displaying Windows identifiers, this corresponds to Romance Standard Time. Verify the selected zone applies daylight saving time.

Add SharePoint → Get items. Before using expressions, rename the action to Leer_stock. Select your site and list; set Top Count = 100.

This read is sized for the case's eight rows. A large inventory needs server-side filtering, pagination, and limit review; do not copy this limit without adapting the solution.

3. Identify products to replenish

Add Data Operations → Filter array, named Filtrar_stock.

In From, use value of Leer_stock. In the filter's advanced mode enter:

@lessOrEquals(int(item()?['Existencias']), int(item()?['Minimo']))

If you use the expression editor to build a condition, enter functions without the leading @ . The preceding advanced expression includes that prefix because it represents the entire filter.

Equality is deliberate: LEC-1L, with 12 units and minimum 12, also needs review. Quantity columns must have values; correct empty cells at the source.

4. Build the email

Add a Condition: the following expression must be greater than 0:

length(body('Filtrar_stock'))

In the branch Yes:

  1. Add Select, renamed Columnas_informe. Use the body of the following as the source: Filtrar_stock.
  2. Create four fields: SKU with item()?['Title'], Producto with item()?['Producto'], Existencias with item()?['Existencias'] and Minimo with item()?['Minimo'].
  3. Add Create HTML table, renamed Tabla_stock. Source: output of Columnas_informe; automatic columns.
  4. Add Microsoft 365 Outlook → Send an email (V2) to your own test mailbox.
  5. Subject: Replenishment · Barrio Demo. Body: a short introduction and the HTML output of Tabla_stock. If the editor treats HTML as text, insert it through HTML code view.

Leave the branch No empty: without affected products, no empty report is sent. Save and run Test.

5. Demonstrate it works

Test Expected result
Original catalog One email with CAF-250, ACE-1L, LEC-1L, and GAL-200
Oil with 0 units Appears as 0; the value is not treated as an error
Change PAS-500 from 25 to 5 and run again Five products appear
Temporarily place every item above its minimum No email is sent
Check history The filter and condition match the data read

Save an email screenshot and another of the filter. If you receive eight items, review the table source: it must use the filtered result, not the complete read.

Deliverables and cleanup

Submit the eight-product list, saved flow, and evidence for three situations: four items, five items, and no notification.

Restore the original CSV if continuing with the stock agent in case 07. Disable the flow when finished to avoid daily test emails.

Official documentation

Documentation checked on October 18, 2026. Execution in a Microsoft environment: pending verification.

The conversation continues here

Questions and experiences

Stuck on a step or found another way? Share what you have tried and help those who come after you.

Read comments or sign in to participate.

Loading comments…