I am going nuts with this absolutely not user friendly Automate. I am using Get File Properties Only to get list of files(their properties) to further check if file with a declared name is present in a folder BUT IS SHOWS ME DELETED FILES as well (crazy)(and the deleted one is the one I would like to check). This is jus madness. Can't do a simple task, always some mine. How to get list of file which are really in a folder?
@Marcin88888 Welcome to the forum. it's always useful for us if you can include a screenshot of your flow. In my flow (and I normally use the classic designer) there are only 2 files in the folder:
The flow loops through the library and brings back both files but then there is a condition to check for a specific filename, and if it exists, take some action, otherwise take some other action.
If you want a list of the files then after the get files action you could use a Select control followed by a Create an html table action. This removes the need for an apply to each and is usually better for performance of the flow.
Rob
Los Gallardos
Principal Consultant, SharePoint, Forms and Power Platform, WSP Global (and classic 1967 Morris Traveller driver)
This part in my flow is pretty simple. It should be. TBH I had never worked with such bad tool as Automate flows.
Part of my flow : I just use
1/ get files properties from a folder then
2/filter through array by a file name (after testing the output shows me the file which is not there!).
3/ Then I check the lenght of filtered array which is 1! So for automate the file is there even it is not there.
It is made for further conditional flow for http requests etc
@Marcin88888 I will have a look at what your flow is doing, but I and many other users who have used Power Automate for quite a few years (me since 2018) do not find it a bad tool in any way. Yes it occasionally has its quirks, particularly the new designer, but it and Power Apps totally transformed my career and has saved my company hundreds of thousands of dollars because we don't need to use external developers for most apps & flows.
Rob
Los Gallardos
Principal Consultant, SharePoint, Forms and Power Platform, WSP Global (and classic 1967 Morris Traveller driver)
I did a new flow with Get properties and list folder to check. Same result. It shows file which is not there. Here are 2 screenshots. The 3rd file which is in the output array is not in this folder.
What is more interesting is that I see this file on list under "Delete file" option. But I do not see it in SharePoint folder.
@Marcin88888 The List Folder action isn't necessary in your case as (if I'm understanding your requirement correctly) you are looking to filter out specific files and return their properties. If you could show a screenshot of your Get Files (properties only) action—it would be helpful and provide more insight as to what the issue could be.
First, I would recommend using the Classic Designer—the New Designer is still buggy.
The Get Files (properties only) action actually returns files and folders. Without filtering for files only, the action will return files and folders. I'd recommend going through these steps to test it out and review the outputs.
First, turn on the totals column in your document library. This will display a total number of files and folders.
Unless you want to return all files from your selected document library—it's always best practice to limit entires to a specific folder. This way you are only returning items from the selected folder.
The default number of files and folders returned in a single Get Files (properties only) call is 100. Depending on how many files and folders you have in your document library you will need to toggle on pagination and set a threshold. The maximum number of items SP Online allows per call is 5,000 items. However, when you keep this number low, it can avoid performance issues.
Press done at the bottom of the dialog to save your changes.
Without defining a filter query, return an item count. I do this with all my flows to help with troubleshooting. It is also helpful especially when using a filter query with a Get files (properties only) action to confirm that the filter query is filtering out the items as expected.
Insert a Compose action. Add an Expression. Use the length() function.
Select the Dynamic content tab and insert the value dynamic content from the Get Items action into the length() function.
Run a test. Review the outputs. Because the Get Files (properties only) action returns files and folders—the total item count is 6 which matches my screenshot at the start of this post.
To return files only—you need a filter query.
FSObjType eq 0
Run a test. Review the Output.
If you want to only return folders—change the 0 to a 1 (try it out and run a test!)
To filter out files by a file name you can use the following filter query.
For example, I'll add this to my filter query to filter out this single file. In this particular case, the string of text is not case sensitive.
Run a test. A single file has returned.
Unfortunately, you cannot use a contains operator in the Filter Query. Let's say I want to filter out files that contain the word "document".
This isn't valid. You'll get an error when you run the flow.
This is:
substringof ('document', FileLeafRef)
Run a test. It's returned two items.
Add a Condition action to your flow. If items have returned (aka there is number stored in the Compose action—that is not equal to 0), add the rest of your actions to the Yes branch. If not, do nothing.
For more flow troubleshooting tips—check out this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows
In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!
IN THIS VIDEO:
✅ How to troubleshoot a false Condition action result
✅ How to get dynamic content when it isn’t selectable from the list of dynamic content
✅ How to troubleshoot an Apply to Each action that isn’t looping through
✅ How to troubleshoot a skipped Apply to Each action
✅ How to troubleshoot a Filter Query
✅ How to use a SharePoint yes/no column in a Filter Query
✅ How to use Compose actions to troubleshoot a Power Automate flow
✅ How to troubleshoot multiple emails being sent
✅ How to troubleshoot multiple Teams messages being sent
First of all - thank You for your effort and very detailed instructions. I studied and tried a lot of things (studied from YouTube and this Forum and I have some basic experience) You have mentioned in Your post and I tried most of them by my own before.
This ,main file will contain maximum 12 .csv files so pagination is not necessary, I guess. (The final flow should add a .csv file from current month and replace it every day. Other files should be added by other flow which need HTTP request and some more complicated iteration through API pagination (due to API limitations) but the general picture is not the case at this moment). I am stuck on this particular step - the most basic.
Here is the problem (I did totals according to your suggestion and indeed it shows total 3 files in this folder where there are 2 files):
Here is the classic view and GET PROPERTIES step:
I see 3 items in JSON output and 3 as a result of lenght "fuction", 3 as Total in Sherepoint but the real count of files there is 2.
@Marcin88888 It's really odd that your file count is displaying 3 files when it looks like there are only 2 files. Are you currently viewing your files in a filtered view—or the default All Files view? Also could you try (not sure if it'll have the same result—but worth a try). Can you try to add a total for the Name column?
Can you provide more insights to your workflow? Where are the files coming from when you say:
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!
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
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.
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