web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need Help Developing E...
Power Automate
Answered

Need Help Developing Enquiry Re-Opening Workflow

(0) ShareShare
ReportReport
Posted on by 4
I have been trying to develop a workflow to reopen archived enquiries. When enquiries are received at my workplace, a folder is created to store files, which is named based on a code (e.g. 14000 - Location Name). When an enquiry is completed, they are moved from the 'Enquiriesfromserver' site to an 'Enquiries Archive' site. 
 
To improve efficiency in the case of an enquiry needing to be reopened, and save people trawling through hundreds of folders, I want to automate it so that when a user inputs this issue number into a microsoft form, Power Automate searches through the document library for the relevant folder, and then moves it to the original location in SharePoint from before the issue was archived. 
 
I am struggling to get this to work, and have managed to get the below workflow to work but it is incredibly slow and unreliable as it seems to search through every single folder in the document library. This is on top of me trying to refine the workflow by introducing arrays and compose actions in order to narrow down the folder name (now removed because when I did so it broke the flow, but this may be because I wasn't using it correctly as I am relatively new to Power Automate). So, I am hoping to get help in refining the workflow so that it works far more efficiently in terms of a) finding the correct folder in a timely manner, and b) correctly moving the folder to a different SharePoint site. 
 
 
And here are the specifics for the condition in the Apply to Each loop, which is based on the output from the 'get files' action:
 
Folder to Move:
Destination Folder:
 
Do I need to include a data query in the Get Files action in order to improve the efficiency of this flow? From what I was reading online this seemed to be the case but whenever I tried to use a data query, it did not work (it failed to create any outputs from what I remember, as it was around two weeks ago when I tried to use the data query in particular).  
 
Many thanks!
 
 
Categories:
I have the same question (0)
  • Verified answer
    Vish WR Profile Picture
    3,110 on at
     

    You can try concurrency in Apply to Each would speed things up a bit, but you're still looping through hundreds of folders . You're just doing it faster. It doesn't fix the root problem.

    Since your folders already follow a predictable naming pattern (14000 - Location Name), you know exactly what you're looking for before the flow even starts why dont you try filter with top 1 

     

    startswith(FileLeafRef,'@{variables('IssueNumber')}')

     

    Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
  • David_MA Profile Picture
    14,595 Super User 2026 Season 1 on at
    I have never done what you are attempting, but I would add a filter query to only return folders, which you can do by adding FSObjType eq 1 to the filter query. If you changed it to 0/zero, it would return files only. I assume you already have a filter query that searches for the folder name? 
     
    Once you find the folder instead of the files, I think the move folder action will work since you are getting folders and moving folders. Again, I've never needed this, but if I had to and ran into this issue, it is what I would try.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard