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 : Ieje+blHQ2IVl3uSCf0nPj
Power Automate - Building Flows
Unanswered

Pull Org codes from excel file and email everyone present

Like (0) ShareShare
ReportReport
Posted on 13 Feb 2024 19:09:09 by 41

I have an excel file with different Org codes in it within a column and I want to pull those out of the excel file and match it to a Sharepoint list with emails I have corresponding to each Org code.

 

This is working fine, except it's sending the email separately to each Org and I want it to send one email with the multiple emails for each Org in it.

 

This is my current flow:

acondie_2-1707851270250.png

 

I know it has something to do with my for each loops but not sure how to fix it.

 

I have the same question (0)
  • acondie Profile Picture
    41 on 13 Feb 2024 at 20:19:47
    Re: Pull Org codes from excel file and email everyone present

    I think I'm close, just not sure on the reset null part.

     

    acondie_0-1707855554430.png

    I'm pulling the emails into that variable from sharepoint and then using concat to combine them into one.

    It looks like it's working.

  • ivan_apps Profile Picture
    2,187 Moderator on 13 Feb 2024 at 19:44:13
    Re: Pull Org codes from excel file and email everyone present

    I’ll try to pull something up in a bit. Basically the idea is if you want to send one email to a variable group of people, collect the emails in a variable, then use the variable in the ‘send to’ field. Then you reset the variable, gather the next group of email, and send again.

     

  • acondie Profile Picture
    41 on 13 Feb 2024 at 19:40:17
    Re: Pull Org codes from excel file and email everyone present

    Hi,

     

    Sorry, I'm new to power automate and a bit confused. Could you provide a sample flow?

     

    I'm trying to pull the emails from a Sharepoint list where I have the Org code matched with a specific email, so I don't want to list them out in a variable. 

  • ivan_apps Profile Picture
    2,187 Moderator on 13 Feb 2024 at 19:27:23
    Re: Pull Org codes from excel file and email everyone present

    Set up a variable at the top, call it EmailList.

    Instead of sending an email at your innermost loop, do an Append To String Variable action. Make sure you add a semicolon to the end of every email, but create your email list here.

    Remember to reset your Email list via the Set Variable action, set it to null after you send the email outside your inner loop. This is important so you don’t keep adding more emails after you’ve sent it to one group.

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…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 786 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 724 Super User 2025 Season 2

#3
stampcoin Profile Picture

stampcoin 290 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete