- Home
- Guides
- Power Automate
- How to email a weekly sales report from Excel with Power Automate
How to email a weekly sales report from Excel with Power Automate
Build a scheduled Power Automate flow that reads your Excel orders table every Monday, filters last Monday through Sunday, totals the orders and sales, and emails one clean HTML report.
Jump to a step (12)
Every Monday someone opens the orders spreadsheet, filters last week's rows, adds up the totals, pastes everything into Outlook and sends the same report again. It takes time each week, and when that person is out the report does not go.
A Recurrence trigger starts the flow every Monday morning. It reads the Excel table with the DateTime format set to ISO 8601, so dates arrive as real dates and not serial numbers. Two Filter array actions keep only the previous Monday through Sunday. A loop counts the orders and adds up sales, a Select action and Create HTML table build the order table, and one Outlook email carries it all in a styled HTML layout.
Everything runs on your existing Excel file in OneDrive with standard actions. If there were no orders last week, the email still goes out with zero totals, so the report never silently goes missing.
What you need
- Microsoft 365 Business Basic or Standard (standard Power Automate, no premium connectors)
- An Excel file in OneDrive for Business with the orders formatted as a table (named
Ordersin the video) - Table columns:
Order ID,Order Date,Customer,Product,Quantity,Order Total,Payment Status - An Outlook mailbox to send the report from
Step by step
0 of 12 done-
01
Format the orders data as an Excel table
Open your orders workbook (
Orders Login the video). Select all the columns, chooseFormat as Tableand pick any style. Note the table name shown in the ribbon. In the video it isOrders.Power Automate can only read rows from an Excel table, not a plain range.
-
02
Create the scheduled cloud flow
In Power Automate select
Create, thenScheduled cloud flow. Name itWeekly Sales Report. Set it to repeat every1WeekonMondayand selectCreate.Open the
Recurrencetrigger to set yourTime zoneand the exact time. In the video I set the hours to9and the minutes to30, so the preview reads "Runs at 9:30 on Monday every week". -
03
List the Excel rows without the date bug
Add
List rows present in a tablefrom theExcel Online (Business)connector. SetLocationtoOneDrive for Business,Document LibrarytoOneDrive, browse to theOrders Logfile and pick theOrderstable.Under
Advanced parameters, addDateTime Formatand chooseISO 8601. This matters: without it, Excel dates often arrive in Power Automate as serial numbers that you cannot filter by date. -
04
Create the start and end date expressions
Add a
Composeaction and rename itStart Date. In the input, open the expression editor and enter an expression that takes today's date and subtracts seven days. Because the flow runs on Monday, the result is the previous Monday.Add a second
Composeaction namedEnd Datewith an expression that subtracts one day, which gives the previous Sunday.The exact expressions are in the downloadable guide linked under the video. They follow this pattern:
Start Date:formatDateTime(addDays(utcNow(),-7),'yyyy-MM-dd')End Date:formatDateTime(addDays(utcNow(),-1),'yyyy-MM-dd')
-
05
Keep orders from the previous Monday onward
Add a
Filter arrayaction and rename itFilter after last Monday. InFrom, selectbody/valuefromList rows present in a table.For the condition, pick the
Order Datecolumn on the left, chooseis greater than or equal to, and select theOutputsofStart Dateon the right. This drops everything before the previous Monday. -
06
Keep orders up to the previous Sunday
A Filter array holds one condition in the basic editor, so add a second
Filter arraynamedFilter before this Monday. SetFromto theBodyof the first filter.On the left you cannot pick
Order Datefrom the Excel action any more, because this filter reads the first filter's output. Use an expression that reads the order date of the current item instead, for exampleformatDateTime(item()?['Order Date'],'yyyy-MM-dd'). Chooseis less than or equal toand select theOutputsofEnd Dateon the right.Together the two filters return only orders from the previous Monday through Sunday.
-
07
Initialize the two total variables
Add
Initialize variablenamedTotal Orders, typeInteger, value0. Add a second one namedWeekly Sales, typeFloat, value0. -
08
Count orders and add up sales in a loop
Add
Apply to eachand rename itCalculate weekly totals. Set its input to theBodyofFilter before this Monday.Inside the loop:
- Add
Increment variable, rename itCount orders, pickTotal Ordersand set the value to1. - Add another
Increment variable, rename itAdd order total, pickWeekly Sales, and for the value use an expression that reads the current row's order total, such asfloat(items('Calculate_weekly_totals')?['Order Total']).
The
float()function makes Power Automate treat the Excel value as a number before adding it. If no orders match, the loop is skipped and both variables stay at zero. - Add
-
09
Prepare the report table columns with Select
Below the loop, add a
Selectaction (Data Operation) and rename itPrepare report table. SetFromto theBodyofFilter before this Monday.In the map, add one row per column you want in the email, each with an expression as the value:
Order ID:item()?['Order ID']Customer:item()?['Customer']Product:item()?['Product']Quantity:item()?['Quantity']Total:item()?['Order Total']Payment:item()?['Payment Status']
Expressions are needed here because the data comes from the filter, not straight from the Excel action. You can rename, add or remove columns.
-
10
Turn the rows into an HTML table
Add
Create HTML table(Data Operation). SetFromto theOutputofPrepare report table. UnderAdvanced parameters, leaveColumnsset toAutomatic. -
11
Build the email
Add
Send an email (V2)from Office 365 Outlook and enter the recipient.Paste the subject from the email template in the downloadable guide and replace its two placeholders with the
OutputsofStart DateandEnd Date.For the body, switch the editor to code view and paste the HTML from the guide, replacing what is there. Then replace each placeholder with dynamic content (type
/and chooseInsert dynamic content):- Start date and end date: the two Compose outputs
- Total orders: the
Total Ordersvariable - Weekly sales: the
Weekly Salesvariable - Report table: the
OutputofCreate HTML table
The styled HTML is what makes the report look clean. The default HTML table on its own looks plain and unformatted in the inbox.
-
12
Save and test the flow
Save, select
Test, chooseManuallyand run the flow. Check the recipient's inbox. The email shows the reporting period, total orders, total sales and the full order table.The flow sends one email no matter how many rows the file has. If no orders are found, it still sends the email with zero orders, zero sales and an empty table.
Tips and common problems
- If dates show up as numbers like
45512, setDateTime FormattoISO 8601inList rows present in a table. Filters on serial numbers will not work. - In the second Filter array, use an
item()expression for the order date. Dynamic content from the Excel action points at the wrong data once you filter the output of the first filter. - Wrap the order total in
float()before adding it toWeekly Sales, so Power Automate treats it as a number. - The flow runs on Monday, which is why
-7days gives the previous Monday and-1gives Sunday. If you change the run day, adjust both expressions. - Check the time zone in the Recurrence trigger, or the report may arrive at the wrong hour.
Expressions used in this flow
The exact versions are in the free downloadable guide linked under the video. These follow the same pattern.
| Where | Expression | What it does |
|---|---|---|
| Start Date (Compose) | formatDateTime(addDays(utcNow(),-7),'yyyy-MM-dd') | The previous Monday when the flow runs on Monday |
| End Date (Compose) | formatDateTime(addDays(utcNow(),-1),'yyyy-MM-dd') | The previous Sunday |
| Filter before this Monday (left side) | formatDateTime(item()?['Order Date'],'yyyy-MM-dd') | The order date of the current filtered item |
| Add order total (Increment variable) | float(items('Calculate_weekly_totals')?['Order Total']) | The current order's total as a number |
| Prepare report table (Select) | item()?['Order ID'], item()?['Customer'], item()?['Product'], item()?['Quantity'], item()?['Order Total'], item()?['Payment Status'] | One value per email table column |
Questions
Can Power Automate send a weekly report from Excel without SharePoint?
Yes. This flow reads the Excel file straight from OneDrive for Business with the Excel Online (Business) connector and sends it with Office 365 Outlook. No SharePoint list or premium connector is involved.
Why do Excel dates show as numbers in Power Automate?
Excel stores dates as serial numbers. In List rows present in a table, open Advanced parameters and set DateTime Format to ISO 8601 so the dates come through as real dates.
What happens if there were no orders last week?
The loop is skipped, both variables stay at zero, and the email is still sent with zero orders, zero sales and an empty table. You always know the flow ran.
How do I change the day or time the report is sent?
Open the Recurrence trigger and change the day of the week, the hours, the minutes and the time zone. If you move it off Monday, update the start and end date expressions too.
