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 / Powerautomating a flow...
Power Automate
Answered

Powerautomating a flow to send email reminders - Apply to each failing

(0) ShareShare
ReportReport
Posted on by 16

Hi, 

 

I was hoping i could get some support in running into an issue. I keep testing the flow and recieve this message:

 

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@variables('varDate7DaysOut')' is of type 'String'. The result must be a valid array.

 

I have no idea what to do. I have tried to search around.

 

Many thanks in advance

Screenshot (56).png
Categories:
  • Andrew_J Profile Picture
    1,962 Moderator on at

    @Akash23

     

    This seems to me like a adddays function, you need to look at UTC and then adddays but use a -7, If that helps then great.  But if you need anything more then I will look at later on today.

     

    Regards

     

    Andrew

  • Akash23 Profile Picture
    16 on at

    Hi Andrew,

     

    Thank you. I tried a couple of other methods and seem to be getting issues every time. I have attached the steps i have taken and can't seem to see where i am making the mistake.

     

    Thanks,

     

    Akash

    Screenshot (57).png
    Screenshot (58).png
  • Andrew_J Profile Picture
    1,962 Moderator on at

    I am confused at the trigger for the flow and as I am on my mobile it is not easy to see the original image. 

  • Akash23 Profile Picture
    16 on at

    The triggers are so i can 7 days prior to project task due date send a reminder to the assigned person that there task is due for completion in 7 days.

     

    I have set up the furst couple of lines to feed back the date and milestones that fall within the parameters. I have checked those actions and all tick off except when i try and automate the email part of the flow.

     

    Does that make sense? 

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @Akash23 

     

    I have been looking at this, whilst there is always many ways to doing things in flow, you may need need to look at this differently.  The apply to each is looking for a variable so try something like the below which does the same.  This is flow I created to pull a list of items every month and then issue the tasks to a group of people:

     

    Andrew_J_0-1675380243390.png

     

    Let me know if the above helps, I am a learner myself so I can only apologise for not knowing it all.

     

    Regards,

     

    Andrew

     

  • Akash23 Profile Picture
    16 on at

    Hi Andrew,

     

    Thank you for all the support. I have managed to figure it out in a random way but it works.

     

    When i apply to each to give me the 'value' and then apply to each again with 'Assigned to' as the output it seems to work and send everyone assigned to the task a email 7 days out. 

     

    I landed on it randomly and it works to what i require it to at the moment

     

    Again, thank you so much for your help and support

  • Verified answer
    Akash23 Profile Picture
    16 on at

    Hi Andrew,

     

    Thank you for all the support. I have managed to figure it out in a random way but it works.

     

    When i apply to each to give me the 'value' and then apply to each again with 'Assigned to' as the output it seems to work and send everyone assigned to the task a email 7 days out. 

     

    I landed on it randomly and it works to what i require it to at the moment

     

    Again, thank you so much for your help and support

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 330

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 123

Last 30 days Overall leaderboard