Skip to main content
Community site session details

Community site session details

Session Id : cyWdaGsX3G0A96FwfE/wMb
Power Automate - Building Flows
Answered

Send an email reminder to manage orders

Like (0) ShareShare
ReportReport
Posted on 18 Jul 2023 13:29:34 by

Hello,

 

I have a SP List "Orders" with the following columns:

- Order_Id

- Logistic_Email

- Delivery_Date

- Article

- Quantity

 

Exemple:

Order_idLogistic_EmailDelivery_dateArticleQuantity
1logistic1@mail.com01-08-2023Ball5
1logistic1@mail.com01-08-2023Frisbee10
2logistic2@mail.com01-08-2023Beach flag2
2logistic2@mail.com01-08-2023Umbrella3
2logistic2@mail.com01-08-2023Goodies10

 

7 days before the delivery date, I want to send per order_id an email with the list of articles of the order.

I'm very confusing in the order of steps in the loop:

- Append to array

- Set the order_id in a variable

- Test if the order_id changes

- Send the mail

- Reset the array

 

How can I know in the end of the loop, if it's the last article of the order and then, I can send the mail.

Also, I can have an order with only one article that match with 7 days before delivery so I have to test the length of the getitems action.

 

Can someone guide me?

  • raks Profile Picture
    on 18 Jul 2023 at 18:41:30
    Re: Send an email reminder to manage orders

    Thanks, it works perfectly as I want

  • Verified answer
    NickMerrick Profile Picture
    419 Super User 2024 Season 1 on 18 Jul 2023 at 17:30:55
    Re: Send an email reminder to manage orders

    Group by order ID using the method in the link below,  then look through the final array to send the grouped data in an email for each order

     

    https://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops

  • raks Profile Picture
    on 18 Jul 2023 at 17:24:39
    Re: Send an email reminder to manage orders

    Because the flow must send one mail per order, there are 2 differents orders

    First order sent to logistic1

    Second order sent to logistic2

  • NickMerrick Profile Picture
    419 Super User 2024 Season 1 on 18 Jul 2023 at 17:18:37
    Re: Send an email reminder to manage orders

    why would your order id change? Looks like an easy flow. Have a recurring flow run every morning, filter your get items by Delivery_Date eq 'formatDateTime(addDays(utcNow(),7),'MM-dd-yyyy')'

    that will only return orders that need to be delivered in 7 days. Then for each loop through the records and send an email for each order.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete