web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an email reminder...
Power Automate
Answered

Send an email reminder to manage orders

(0) ShareShare
ReportReport
Posted on 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?

Categories:
I have the same question (0)
  • NickMerrick Profile Picture
    419 Super User 2024 Season 1 on at

    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.

  • raks Profile Picture
    on at

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

    First order sent to logistic1

    Second order sent to logistic2

  • Verified answer
    NickMerrick Profile Picture
    419 Super User 2024 Season 1 on at

    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 at

    Thanks, it works perfectly as I want

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard