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 / Combine Filter Array o...
Power Automate
Answered

Combine Filter Array outputs into a single email

(0) ShareShare
ReportReport
Posted on by 28

Hello, 

 

I have a workflow where I'm trying to find all files within a folder older than 360 days and then list them all collectively into a single email. I'm running into an issue where my Filter Array outputs each file individually and then proceeds to sends out a separate email for each file found. 

This is my Filter Array step which appears correct. 

 

webdude_guy10_0-1700519612846.png

 

I then tried adding a Compose step using the "join" function pictured below.

 

webdude_guy10_2-1700520369416.png

 

But then in the final step where the email is sent, it's still sending each file as a separate email. 

 

webdude_guy10_3-1700520440121.png

 

 

 

 

 

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    on at

    Hi @webdude_guy10 ,

    Do you want to find files in a specific folder that are older than 360 days and send those file names as an email?

    If so, I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1700528041289.png

    vyetonggumsft_4-1700528450195.png

     

    addDays(utcNow(), -360, 'yyyy-MM-dd')

     

    vyetonggumsft_2-1700528323577.png

     

    item()?['{FilenameWithExtension}']

     

    My Outlook Inbox:

    vyetonggumsft_3-1700528372795.png

    Best Regards,

    Sunshine Gu

     

     

  • webdude_guy10 Profile Picture
    28 on at

    Let me try this and get back to you. To answer your initial question, yes, I'm looking to generate a list of all files older than 360 days in a specific SharePoint folder. Instead of the "Created" filter query, I was planning to use "Modified" instead which should work the same. 

  • webdude_guy10 Profile Picture
    28 on at

    My Select step requires another value here. Without anything there, the workflow fails at this step.

     

    webdude_guy10_0-1700529279735.png

     

  • webdude_guy10 Profile Picture
    28 on at

    Here's the specific error if that helps. 

    webdude_guy10_1-1700529420500.png

     

  • v-yetonggu-msft Profile Picture
    on at

    Hi @webdude_guy10 ,

    Please clear the content in the Map, click on the place I circled, and convert it to a different format.

    vyetonggumsft_0-1700532408861.png

    This is not dynamic content, it is a written formula.

    I gave you the formula, please check it carefully.

    vyetonggumsft_0-1700530563753.png

     

    item()?['{FilenameWithExtension}']

     

    No need for 'Apply to each' loop, just put the output of the 'join' action into the email body.

    vyetonggumsft_5-1700530000993.png

    Best Regards,

    Sunshine Gu

  • v-yetonggu-msft Profile Picture
    on at

    Hi @webdude_guy10 ,

    1)First fill in the dynamic content of 'value'. then fill in the dynamic content of 'Created', select 'is less than', and then write the formula to avoid unnecessary loops.

    vyetonggumsft_0-1700533628736.png

    2)Fill in the "Modified" dynamic content and select "is less than".

    vyetonggumsft_1-1700533670542.png

    3)Write a formula.

    vyetonggumsft_2-1700533713507.png

    4)Clear the content in the 'Select' control Map, click on the place I circled, convert the format, and then write the formula.

    vyetonggumsft_3-1700533794202.png

    vyetonggumsft_4-1700533883180.png

    Best Regards,

    Sunshine Gu

  • webdude_guy10 Profile Picture
    28 on at

    I got this working by switching back to the classic UI and following your instructions. The Select step wasn't picking up the map field as a function in the new UI. Thank you!

     

    Is there a way to list each file per line instead of side by side with a comma? The output from this workflow ends up just dumping everything into an ugly block of text. I can probably parse it out with Excel using the comma as the separator but it would be slightly more convenient just having it listed in the email body from top to bottom. 

  • v-yetonggu-msft Profile Picture
    on at

    Hi @webdude_guy10 ,

    If I understand correctly, do you want each filename in the email to be on its own line? like this?

    vyetonggumsft_0-1700535498185.png

    If so, please change the comma in the 'Join' control to <br>.

    vyetonggumsft_1-1700535638506.png

    Best Regards,

    Sunshine Gu

     

     

  • webdude_guy10 Profile Picture
    28 on at

    That worked thank you. Last question, how can I add the following file information to each file?

     

    So for example, each line will list the filename, last modified date, and the name of the user who last modified that file. I attempted to use the concat function but it didn't do anything different. 

    webdude_guy10_0-1700537595987.png

     

  • Verified answer
    v-yetonggu-msft Profile Picture
    on at

    Hi @webdude_guy10 ,

    I created a table in html format.

    My complete flow:

    vyetonggumsft_2-1700538966740.png

    vyetonggumsft_4-1700539164448.png

     

     

    item()?['{FilenameWithExtension}']
    item()?['Modified']
    item()?['Editor/DisplayName']

     

     

    vyetonggumsft_7-1700539348491.png

    My Outlook Inbox:

    vyetonggumsft_9-1700539570480.png

    Best Regards,

    Sunshine Gu

     

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard