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 / Emailing several files...
Power Automate
Answered

Emailing several files from a loop

(0) ShareShare
ReportReport
Posted on by 380
Hello!
 
I have a working flow that creates a file (or files) according to a SP list filter.
 
How many files are created each time, is never the same, so I create each file through a loop.
After this, through an array variable, I get all paths from those created files and I email them.
 
But I can only email each file separately inside the final loop
 
This is my flow:
 
 
Is there a way to email all created files in just one email after the loop??
Categories:
I have the same question (0)
  • Verified answer
    Sayan Profile Picture
    818 Super User 2025 Season 2 on at
     
    You can use the below approach - 
     
    • Append Each File Path to the Array Variable (Inside the Loop):

      Inside your loop (where you create files), add an Append to Array Variable action. Use the file path or file content from the created file and append it to the array.
     
    • Send Email After the Loop:
      • After the loop, on Send an Email) action.
      • In the attachments section, dynamically reference the array variable where all file paths are stored.
      • For each file path in the array, Power Automate will include it as an attachment in a single email.
     
     

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    If my suggestion helps you, please gives it a Like and Marks as a Solution. Which motivates to solve more problems.

    Thanks,

    Sayan Patra

    RPA Developer

     
  • Fernanda Profile Picture
    380 on at
    @Sayan Hello!
     
    thank you, but I think I did something wrong
     
    As mentioned, I did the append to array variable, in my example, for all 5 documents
     
    I parsed a JSON so I could get the items
     
     
    And i tried the email, but it failed
     
     
     
    If I use an integer index, it will only give me one file, not all.
     
    What did I do wrong?
  • Fernanda Profile Picture
    380 on at
    @Sayan nevermind me!! I found my mistake!
     
    works perfectly now!! thank you so much!
  • Suggested answer
    Sayan Profile Picture
    818 Super User 2025 Season 2 on at
    Hey @Fernanda  
     
    congratulations!
     
    Is your issue fully resolved now? If so, please mark it as a solution. 
     
     
     
     
    Thanks,
    Sayan Patra
    RPA Developer
     
  • Fernanda Profile Picture
    380 on at
    @Sayan I have been trying since yesterday to mark it, but it is just not working. I will keep trying though
  • Suggested answer
    Sayan Profile Picture
    818 Super User 2025 Season 2 on at
    @Fernanda No worries. 
     
    Thanks,
    Sayan Patra
    RPA Developer

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard