cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Weekly Power automate email or teams post of list of Sharepoint Library subfolder folders created

Hello all,

So at present I have a teams message sent every time a new folder is created in the top folder called Incoming in Sharepoint Library.

The folders are named with date backwards and title of what is inside.

My flow only runs on condition that it is a folder and the folder name starts with the number of the year i.e. 230901 Test folder.

So there isn't hundreds of messages sent out if a folder contains lots of files.

 

Given the amount of folders we create at work, I found a way once to create a HTML table in an email which lists the columns NAME, FROM as a hyperlink, so it takes a person to the folder. I can't remember how to do it, but recently I create a new test flow to try and get my flow to work, I have it sent to my email address to test, see below:

 

buro2020_0-1694787223115.png

This flow only sent an email of one folder being created all week, but I don't know if there is anyway of getting the flow to look into all the subfolders

 

buro2020_1-1694787437317.pngburo2020_2-1694787459955.png

The timestamp is look back over 7 days from the day the flow runs, I thought it would have returned lots of folders, but the email didn't.

buro2020_3-1694787554053.png

it showed one subfolder which isn't correct, and the columns From and Assets are blank (this is correct since it picked up a subfolder which wasn't date stamped in the title, but it didn't pick up any other subfolders in the sharepoint library folder of Incoming.

 

Our folder structure is set up

Top folder: Incoming

Subfolder: Name of sender

- subfolders of the name of sender will be the date stamped titled folders: 230901 folder name

 

We can't change it at this point.

I don't have any conditions in this flow at the moment, so it ran as the flow above.

 

any help would be appreciated

3 REPLIES 3

@buro2020 The Get Files (properties only) action returns files and folders. In this YT Short I show how to use a Filter Query to return files only. 

 

In your case, since you want to return folders only, set the number to 1. Before you even add the Send an email action to your flow, I would recommend building and testing it out first. 

Get Files (properties only) – Return Folders

Add a filter query to your action and include a Compose action below to count the number of folders returned.

creativeopinion_0-1694793425776.png

Run a test to confirm the number of items returned.

 

You shouldn't need the Get folder metadata action as the Get files (properties only) action will return the metadata. Take a look at the outputs. 

 

Create a Dynamic Date

I would recommend using a few actions to create a dynamic date which you can use to check against the Folder Name (eg. 230901 Test folder). The Scope action is optional, however I find it can come in handy if you need to quickly copy these actions to use in different flows.

 

creativeopinion_0-1695046538323.png

 

Add a Convert time zone action to convert the current time to your local time zone. In the Base time field, insert the utcNow() function. Select (UTC) Coordinated Universal Time as the Source Time Zone. For the Destination Time Zone, you can select your local time zone. For the Format String select Round-Trip

creativeopinion_2-1694793615542.png

 

Next add a Compose action to store the number of days you'd like to add/remove from the current date. A positive number will add days, a negative number will subtract days. In your case, enter -7. This Compose action is optional as this number can be entered directly into the addDays() function if you prefer. 

 

However, by using a Compose action to store the number of days to add/remove you can easily alter this expression by editing the Compose action with the number of days. 

creativeopinion_1-1695046589970.png

 

Add another Compose action to store today's date. This is optional, but it can help with troubleshooting and it also allows you to format today's date to be used elsewhere in your flow.

Use an expression and insert the Converted time dynamic content from the Convert Time Zone Action. 

formatDateTime(body('Convert_time_zone'), 'yyyy-MM-dd')

creativeopinion_4-1694793615549.png

 

Add one more Compose action to store the dynamic date. This will be the date that was 7 days ago. You'll need another expression. Use the addDays() function. It takes 3 parameters.

addDays([date to add/remove days from], [number of days to add/remove], [date format] )

I've used the dynamic content from the Compose actions above in my expression. This is what my expression looks like:

addDays(outputs('Compose_-_Today''s_Month_and_Day'), outputs('Compose_-_Days_to_Add_or_Remove'), 'yyMMdd')

Important: The date format should match the date format in your folder name.

creativeopinion_2-1695046726477.png

 

Run a test to confirm the outputs of the the Compose action above. 

My output looks like this.

creativeopinion_3-1695046887674.png

Filter Array

Add a Filter Array action to your flow. You'll use this action to check for any folders that start with the dynamic date stored in the Compose action above.

 

In the From field, insert the value dynamic content from the Get Items action. 

creativeopinion_4-1695046981015.png

 

In the first value field insert the Name dynamic content from the Get Items action. Change the operator to starts with and in the second value field insert the outputs from the Compose action that is storing the dynamic date.

creativeopinion_5-1695047014247.png

 

Compose Filtered Count

Add a Compose action to store the number of folders returned. This Compose action is optional however, it does help when it comes to troubleshooting and you can also use the number returned in a condition action. 

 

Insert an expression and use the length() function to store the body dynamic content from the Filter Array action. 

creativeopinion_7-1695047223323.png

 

Hope this helps!

If I helped you solve your problem—please mark my post as a solution .
Consider giving me a 👍 if you liked my response!

👉 Watch my tutorials on YouTube
👉 Tips and Tricks on TikTok

 

Hi,

Thank you, it work for getting the list of folders but the flow did not return a list of anything modified recently, it returned a list of folders created last year. so I am not sure what to modify in the flow to change that, so it is and it isn't a solution.

I still have to get the list to show folders only and starting with the year digits only as the flow returned other folders and files within them, the asset column metadata and make the title a hyperlink to the folder, did not perform as I expected as it didn't do the hyperlinks, but the asset column is blank but that is fine for these folders since there was no data for them anyway.

Any help on that would be appreciated.

Wayne

@buro2020 I may have missed something in your original post. I was under the impression that you were checking for the modified date on the folder and not the date in the folder name. I have adjusted the instructions from my original post. 

 

You'll have to adjust the dynamic date action and add a Filter Array action to your flow. Hope this helps!

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (756)