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 / create a flow that whe...
Power Automate
Answered

create a flow that when a document is added to the folder, it autofills a list

(0) ShareShare
ReportReport
Posted on by 26

exactly as the title states. im new to power automate and it looks like it could be super useful, but lordy if i can work out how to use it. 

i have a page with a vacant document folder - drag an email from outlook to that folder and then it should update the list - i know the details in the list wont be perfect, but it would be a start. 

Categories:
I have the same question (0)
  • Verified answer
    rzaneti Profile Picture
    4,249 Super User 2025 Season 2 on at

    Hi @JesseTaylor ,

     

    Welcome to the Community 🙂

     

    Here are some quick instructions about how to add a new List item whenever a new file is added to a SharePoint folder.

     

    Overview on Folder and List

    I've just created a SharePoint folder called "Landing Folder" to receive the new documents/files that will be inserted in the list. 

    rzaneti_0-1705161923282.png

     

    The list will store the file name (title column), the creation date and the file extension (.pdf, .xlsx...):

    rzaneti_1-1705162069930.png

     

     

    Step 1 - Creating your flow

    In Power Automate, create a new automated cloud flow and choose "When a file is created (properties only)" as trigger (eventually you will have two triggers, one of them deprecated): 

    rzaneti_2-1705164905606.png

     

    After clicking 'Create', you will navigate to the 'Flow edit' page. click in the trigger and a left pane will appear, containing some settings, and there you will enter the details about the SharePoint folder that you want to monitor (Site Address, Library Name and the Folder path):

    rzaneti_3-1705164983659.png

     

    Step 2 - Adding item to List

    Now it's time to insert a new action to add a new item into the List. Click in the '+' below the trigger (highlighted in yellow) and a new pane will be displayed, containing the list of actions to be included in your flow. Search for 'create item' (highlighted in green), and select 'Crete Item' from SharePoint connector (highlighted in blue): 

    rzaneti_4-1705165133847.png

     

    Again, a settings pane will appear, where you must enter data about the list that you want to populate. After populating it, click in the 'Advanced parameters' dropdown and check the items corresponding to the List columns (highlighted in yellow):

    rzaneti_5-1705165292170.png

     

    Step 3 - Populating the 'Create item' action:

    Click in one of the column inputs and then in the highlighted icon, which will give you access to the dynamic content selection:

    rzaneti_6-1705165418999.png

     

    Here you will find all properties from the previous steps (in this case, the trigger only), where you can find the 'Name' property:

    rzaneti_7-1705165553550.png

     

    Populate all fields with the relevant dynamic content. For the 'File Extension', we're using the 

    last(split(item()?['{FilenameWithExtension}'], '.')) expression, which applies some text transformation methods to extract the file extension from the file name:  

    rzaneti_8-1705165718499.png

     

    To add an expression in Power Automate, click in the 'Fx' icon, right below the dynamic content one:

    rzaneti_9-1705165864630.png

     

    After that, your flow is ready to run. Save it and add a new file to the desired folder.

     

    Note: at this point, it is possible that Power Automate added a 'For each' loop automatically to your flow. It happens because one of the properties accessed by the dynamic content must be allocated inside an array. You don't need to make any change in this 'For each'. 

    rzaneti_13-1705166134173.png

     

     

    Testing the flow

    After adding a file to the folder, it may take some seconds to the flow run. I've added an empty Excel file called 'Book.xlsx':

    rzaneti_11-1705166026686.png

     

     

    You can find all the recent flow runs in your flow page, in the table below:

    rzaneti_10-1705166001871.png

     

    The List is automatically populated after the flow run, capturing the relevant data from the file added to the folder:

    rzaneti_12-1705166061416.png

     

    The example above is pretty simple and probably won't be matching perfectly to your specific use case. If you need help in capturing some other metadata from the file added to the SharePoint folder, let me know and I will be glad in guiding you 🙂

     

    Further reading

    Since you are new to Power Automate, I'm sharing some blog posts that I've wrote in the past and are related to the topics discussed here:

    - Dynamic contents: http://digitalmill.net/2023/07/31/using-dynamic-content-in-power-automate/ 

    - Arrays and loops: http://digitalmill.net/2023/07/12/using-loops-and-accessing-array-elements-in-power-automate/ 

    - Text operations: http://digitalmill.net/2023/08/12/how-to-extract-and-clean-texts-with-power-automate/  

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/ 
    https://www.linkedin.com/in/raphael-haus-zaneti/ 

  • JesseTaylor Profile Picture
    26 on at

    Hi when i originally made this the FOR EACH thingy didnt show up and i had no problems. recently the flow started to fail and the FOR EACH thing is there now. 

     

     

  • rzaneti Profile Picture
    4,249 Super User 2025 Season 2 on at

    Hi @JesseTaylor ,

     

    Are you using the "New designer"? If yes, try to change to the old one and retake the Create Item/For Each step: there are some bugs related to this new UI and the "For each" inputs is a frequent one.

     

    To change to the old designed, you just need to disable this option on the top right corner of the screen:

    rzaneti_0-1707911517874.png

     

     

    Let me know if it works!

  • JesseTaylor Profile Picture
    26 on at
    didnt work. i changed to the old UI and now it gets "Apply to Each" instead. which wasnt appearing before back when it worked.
  • JesseTaylor Profile Picture
    26 on at

    which is failing tests. forget to say. so not working. 

  • JesseTaylor Profile Picture
    26 on at

    okay i deleted it and remade it, it still failed but i didnt get "Apply to each" this time

  • JesseTaylor Profile Picture
    26 on at

    i worked it out - i had the column set as URL link as opposed to mutliple lines of text so it failed whenver the link was over the 250 limit. why on earth would you have a character limit on urls. theyre huge. anyway i found a link suggesting on the right hand side solution.

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard