Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Error "'foreach' expression '@items('Apply_to_each')' is of type 'Object'" in due day reminder flow on Sharepoint List

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I set up a due day reminder flow in a sharepoint list. It's scheduled to run on 08:00 everyday to see any items are 2 days before target date. Then, the flow will send a reminder e-mail with the title of that item to the assignee. I found that the flow has error in sending e-mail step. The error is "The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')' is of type 'Object'. The result must be a valid array.". The flow was working at the time assignee field allowing single input only. My colleague updated the settings of assignee field to allow multiple input and the flow got error. Then, I changed back to allow single input only but the problem persists. May I know is this the root cause of this error?

 

Below are the errors I got.

The error I gotThe error I got

Click on "Apply to each" for the details.

The error message I gotThe error message I got

This is the flow I set.

My flowMy flow

The condition to get the items.

The condition to get the itemsThe condition to get the items

The details of the e-mail.

The emailThe email

Mouse on 'Assignee email'.

Description of assignee e-mailDescription of assignee e-mail

 

Thank you very much!

 

 

  • Community Power Platform Member Profile Picture
    on at
    Re: Error "'foreach' expression '@items('Apply_to_each')' is of type 'Object'" in due day reminder flow on Sharepoint List

    Hello @Mira_Ghaly ,

     

    Thanks for your help and the problem has been fixed. Thanks again!

     

    Regards,

    Francesca

  • Verified answer
    Mira Ghaly Profile Picture
    11,409 Super User 2025 Season 1 on at
    Re: Error "'foreach' expression '@items('Apply_to_each')' is of type 'Object'" in due day reminder flow on Sharepoint List

    @Anonymous 

    Either way it should work so I guess your issue right now is that you have 2 Apply_to_each inside each other you should get rid of the second one and move the send email step to the first loop

    Mira_Ghaly_0-1648696886956.png

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Error "'foreach' expression '@items('Apply_to_each')' is of type 'Object'" in due day reminder flow on Sharepoint List

    Hello @Mira_Ghaly ,

     

    We can keep it as single choice. Will this be easier to the flow? Thanks!

     

    Regards,

    Francesca

  • Mira Ghaly Profile Picture
    11,409 Super User 2025 Season 1 on at
    Re: Error "'foreach' expression '@items('Apply_to_each')' is of type 'Object'" in due day reminder flow on Sharepoint List

    @Anonymous 

    So do you want the column to be Multichoice and send to each one on the list?

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow