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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

for each

(0) ShareShare
ReportReport
Posted on by 12

Hi i have a problem when i arrive at the for each flow anyone know what i can do 

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    on at

    Hi @Denilson ï¼Œ

    Please try replace outputs('Filtrer_un_tableau')[body/value'] with body('Filtrer_un_tableau') in Create HTML table From:

    vyetonggumsft_0-1717642190678.png

     

    body('Filtrer_un_tableau'):

     

    Best Regards,

    Sunshine Gu

  • Denilson Profile Picture
    12 on at

    Hi okey the flow work but when i get the mails i get to many mails not just one 

  • CodrutFt Profile Picture
    46 on at

    Hello,

     

    you get these e-mail because you have a for each and probably you body is an array. Try to get only the first item using .First() of the body. You need to pay attention to what variables are you using inside Send e-mail. If you use the variables from the body to have the contact list, just do body("Filter_un_Tableau").First()?['Contact'](Something like this, you need to test the expression), where 'Contact' is just a guess of mine about what you are using inside "send e-mail" action.

  • v-yetonggu-msft Profile Picture
    on at

    Hi @Denilson ,

    Please check this test.

    Please switch to classic designer.

    vyetonggumsft_1-1718350754808.png

    My SharePoint List:

    vyetonggumsft_9-1718351508891.png

    My Flow Preview:

    vyetonggumsft_0-1718350689807.png

    Flow Configuration Parameters:

    vyetonggumsft_2-1718350866096.png

    item()?['Emailaddress']
    union(body('Select'),body('Select'))

    vyetonggumsft_4-1718351136496.png

    item()?['DueDate']
    item()?['Status/Value']
    item()?['ID']
    length(body('Filter_array'))

    vyetonggumsft_5-1718351241792.png

    join(body('Select_2'),';')
    join(body('Select_3'),';')
    join(body('Select_4'),';')

    vyetonggumsft_7-1718351408462.png

    Inbox Email:

    vyetonggumsft_8-1718351459897.png

    Best Regards,

    Sunshine Gu

  • Denilson Profile Picture
    12 on at

    hi 

    the flow is working now but everyday i get a new email instade of just geting one will it is the due date but i get emails everyday and i dont want it to come everyday but just when the equipement is getting to it due date

  • Verified answer
    v-yetonggu-msft Profile Picture
    on at

    Hi @Denilson ,

    Please add the filter condition of whether the Due Date is equal to today's in Get items, and then check whether the length is greater than 0, and send the email only if it is greater than 0.

    vyetonggumsft_1-1718606406854.png

    DueDate eq '@{utcNow('yyyy-MM-dd')}'
    length(outputs('Get_items')?['body/value'])

    The Result:

    vyetonggumsft_2-1718606418012.png

    Best Regards,

    Sunshine Gu

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard