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 Platform Community / Forums / Power Automate / Power Automate- Apply ...
Power Automate
Answered

Power Automate- Apply to each

(1) ShareShare
ReportReport
Posted on by 33

Hi all,

 

I am trying to send an email when an item or file is modified in my SharePoint list. I have it set up where

 

  1. Item or file is modified in SharePoint list

  2. Get changes for an item or file (properties only)

  3. Condition (or)

    1. yes-> sends an email

    2. no-> terminates or sends another email....

 

The issue I am having is that one of my columns in my list is a category that you can choose multiple options. for example colors. People can choose multiple colors. I want the email to show which colors the person shows but an APPLY TO EACH box keeps popping up and then sends multiple emails for each color. I want it to send one email with the multiple colors in the email display. I have tried to create variables, but it is not working... HELP!

 

6d8ca5e0-0540-4a04-9d9b-024b67318cab.png

Categories:
I have the same question (0)
  • takolota1 Profile Picture
    4,974 Moderator on at

    @vez 

     

    Can you show what you’re putting in the email action?

    You’re probably putting items from the Country array in there you will either need to put the full array in there or use expressions on the array to select each individual array value.

  • vez Profile Picture
    33 on at

    Hi, Sorry I am quite new at this, do you wish to see the email message?

     

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    Try to overwrite the setting on your apply for each, and see if you can't make some settings that allow you to have control on what you want to achieve, remember that For each loops execute sequentially by default. Override the default setting to customize the degree of parallelism.

     

     

  • takolota1 Profile Picture
    4,974 Moderator on at

    @Anonymous @vez 

     

    Vez is not asking about parallelism or making the loop run faster.

    Vez wants something like all the chosen options showing in a single email, but vez is doing something that makes the Apply to Each loop pop up.

    And we can’t really tell what that is until he shows us a picture of the expanded Send an email (V2) action so we can see what vez is trying to send in this email.

  • vez Profile Picture
    33 on at

    vez_1-1652466974435.png

     

    Here is what the email will look like. I wish it could list the country names... and not send an email to each country. 

  • takolota1 Profile Picture
    4,974 Moderator on at

    @vez 

     

    You should be able to replace Current item with dynamic content for the full array of Country(s) inside a string( ) expression and take it out of the loop.

    You may just have to use some replace expressions to get rid of things like brackets in the array [ ].

  • vez Profile Picture
    33 on at

    Hi, thanks for your comment. How would I make a string expression?

     

  • takolota1 Profile Picture
    4,974 Moderator on at

    When you normally go to insert dynamic content, like from the SP list, there is an additional tab in the pop-up menu for expressions. You can click that tab…

    type in string(

    then go back to the dynamic content tab and select the dynamic content/SP list value you want to convert to a string

    then close the parentheses and click update.

  • vez Profile Picture
    33 on at

    Thank you takolota, I don't believe this worked... I received multiple emails once more and the email message looked like this. 

     

    Thank you for your patience. 

     

    vez_0-1652733215131.png

     

  • Verified answer
    takolota1 Profile Picture
    4,974 Moderator on at

    @vez 

     

    Did you take the email action out of the Apply to each loop?

     

    And as for formatting that array, you should be able to put that dynamic content for Country in the From field of a Select action, select the button on the top/mid right side of the action to switch out of the table view, then in the now unformatted box, you can put the expression

    item()?[‘Value’]

    to get an array of just the Value piece with the country & country code.

    Then you can use the 

    String(body('Select'))

    expression to get just the array of Values from the Select action into the email. If you want to format it further, you can add replace expressions around that string expression.

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