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 / Hi! Building a flow to...
Power Automate
Answered

Hi! Building a flow to send emails using excel

(0) ShareShare
ReportReport
Posted on by 23

Every time I try to run my flow I get the following error message: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@variables('varEmailAddresses')' is of type 'String'. The result must be a valid array.  

 

Please may someone help me solve this issue?Capture2608.PNGCapture26082.PNG

Categories:
  • Fredrik_A Profile Picture
    3,644 Super User 2026 Season 2 on at

    Hello,

     

    It is complaining because your variable is a string of email adresses, and it cant loop that, it needs to loop an array, try making the string into an array with the follwing:

     

    split(stringvariable, ';')
  • khanya Profile Picture
    23 on at

    Thank you so much for your response! Do you know where/how I can make that change?Capture26083.PNG

  • Verified answer
    v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @khanya ,

     

    I agree with what @StretchFredrik said, you could use the Split() function to return an array from a string containing multiple email addresses. 

    I'm not sure how you set your string variable, so I have made a simple test for your reference. 

    split(variables('varEmailAddresses'),';') 
    items('Apply_to_each') 

    vyujincuimsft_2-1661845355280.png

    Result Screenshot: 

    vyujincuimsft_3-1661845415047.png

     

     

    Best Regards, 
    Charlie Choi 

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 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard