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

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Flow to Send One Email instead of Multiple Emails

(0) ShareShare
ReportReport
Posted on by

My flow is this:  Get Items from SharePoint List, Create HTML table, Condition inside For Each Loop that when evaluated to Yes, It inserts rows into excel table on SharePoint.  I then have an  Get File Metadata using path, and Get File Content Using Path.  I then send email with excel attachment using Attachment Name, and Attachment Content.  It is sending an email for each item where condition evaluates to Yes(for each row inserted into table).  Makes sense since this is inside For Each loop, but I moved the Email section out of For Each loop and still get multiple emails.  How would I modify to just get one email?   Couldn't paste image of flow. 

I have the same question (0)
  • v-duann-msft Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    Hi @theBrianL 

     

    Thank you for posting.

     

    According to your description, you would like to copy items to an Excel file and send it as attachment via email. Normally, it will send several emails due to loop, but you want to combine them to one email sending to several recipients. If any misunderstanding, please feel free to let me know.

     

    We can use variable to grab the email address for each user chosen in the people picker and then put that string of multiple email addresses into the TO: field for the email.

     

    Thus, I tried to simply your flow without condition part and it won’t affect the major steps. Here you are:

     

    My SPO list:

    v-duann-msft_0-1617766010872.png

     

    My flow overview:

    v-duann-msft_1-1617766010880.png

     

    Flow in detail:

    v-duann-msft_2-1617766010886.png

     

    v-duann-msft_3-1617766010894.png

    Pay attention to red-circled part. The semicolon is necessary to separate emails.

     

    v-duann-msft_4-1617766010899.png

     

    Once tested, I’m able to get only one emails sent to several users.

    v-duann-msft_5-1617766010902.png

     

    v-duann-msft_6-1617766010903.png

     

     

    Hope the content above may help you.

     

    Best regards,

    Anna

  • theBrianL Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    Thank you for explanation.  But it's just one email address that I put in statically.  It was sending the email multiple times to same users.  Will that change the flow you made?   Also I realized the Create HTML table was unnecessary, so I removed that part.  

  • theBrianL Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    Also I need the condition, because the condition to insert rows is based on whether the Modified field is equal to today's date.  formatDateTime(utcNow(),'yyyy-MM-dd').  

  • Verified answer
    v-duann-msft Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    Hi @theBrianL 

     

    Thank you for your further explanation. Sorry for the misunderstanding.

     

    If the email address is static with grab 'send email' outside of loop. We will receive one email. But it's weird from your end. Thus, I recommend you can change flow from the beginning.

    v-duann-msft_0-1617781887699.png

     

    Flow details:

    v-duann-msft_1-1617781887712.png

    formatDateTime(utcNow(),'yyyy-MM-dd')
    formatDateTime(addDays(utcNow(),1),'yyyy-MM-dd')

     

    Filter query is used to reduce returned items based on modified date. It will make a query between today and today +1 with the ge and lt. It functions as condition.

     

    v-duann-msft_2-1617781887718.png

     

    The delay action is used to spare some time for flow to write data into excel. For how long we need to configure, it depends on the actual data from ‘get items’. I set up a 5 minutes delay here. If you have plenty of data needs to copy, you can set up it longer.

     

    Once tested, only items modified today are filtered and wrote to excel. Meanwhile I only receive one email as you required.

    v-duann-msft_3-1617781887721.png

     

    Hope it helps.

     

    Thanks

    Anna

  • theBrianL Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    Anna Thank you for walk through of flow.   I'm using flow with Dynamic Content now, but when I get to the section of add rows into table, the only dynamic content available to put into the fields are the ones with 'ID' on the end of each name.  E.g. Address ID.

    If I put this in its just going to add the field with the ID and not the physical address.   Seems like I initially tried this flow using Dynamic Content, and that was the problem I ran into.  How to proceed?   

  • theBrianL Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    theBrianL_0-1617818870279.png

     

  • theBrianL Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    I got the dynamic content loaded by doing a search for each field.   Now I'm getting this error on the Get Items section.  

    theBrianL_1-1617823386615.png

    theBrianL_2-1617823463700.png

     

  • theBrianL Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    I got it to run after correcting my formatting errors.  However,  the records that get added to the SP Excel file contain all of this extra string odata information:    {"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":20,"Value":"MS"}

    How would I just get the value to populate in all of the fields?

  • theBrianL Profile Picture
    on at
    Re: Flow to Send One Email instead of Multiple Emails

    I put in an expression to extract only the values from the lookup fields.  Thanks for all the help!  

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 560 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 347 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 262 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow