Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Create Sharepoint List Item when a file is added to OneDrive

(0) ShareShare
ReportReport
Posted on by 8

I don't know why I'm having such a hard time with this one.

 

We have files that are added to a OneDrive for Business shared folder.  They are named in a particular naming convention.  What we'd like to do is have a flow where once a file is added to this folder, a new SharePoint item is created in a list whose columns are filled out by parsing the name of the file.

 

The files are all named in this convention

Doe, John - 145236 - 20200101 - Anytown, AS - Jane SMITH

 

The column names in the SharePoint List

Name (LN, FN) - File No. - Date (yyyymmdd) - City and State - Customer

 

Anyone wanna give me a virtual headslap as to how I can accomplish this task?  Pointer in the right direction?  Anyhelp would be greatly appreciated!!

 

 

  • efialttes Profile Picture
    14,756 on at
    Re: Create Sharepoint List Item when a file is added to OneDrive

    You and the Emperor...? OMG!

     

    Please note the dark side requires the following:

    1.-Mark this topic as "Solved" by clicking "Accept as a solution". THis way others facing a similar problem can find a solution faster. Please also note you can even select several responses as solution, even from different community members!

     

    Flow_AcceptSolution.png

     

    2.- (OPTIONAL) Click on 'Thumbs up' in any answer you found valuable... or even in all of them 😉

     
     

    Flow_thumbsUp.png

     

    Even though this 2nd step is OPTIONAL, please remember it is the cheapest, easiest way to say thanks to somebody that spent its time simply trying to help. And just between you and me, everytime an inspiring answer receive a kudo in this community, a loyal stormtrooper escapes from the Jedis menace 

     

    Thanx for your help making this community great!

  • jenro74 Profile Picture
    8 on at
    Re: Create Sharepoint List Item when a file is added to OneDrive
    Thank you, you rebel scum! (I align with the dark side) 🙂 I appreciate the response and the help, my head was spinning trying to figure this out.
  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Re: Create Sharepoint List Item when a file is added to OneDrive

    Hi!

    you can add a 'Initialize variable' action block, let's call it myInputArray, type Array, assign as its value the following split() based WDL expression:

    split('Doe, John - 145236 - 20200101 - Anytown, AS - Jane SMITH',' - ')

    Just replace 'Doe, John - 145236 - 20200101 - Anytown, AS - Jane SMITH' and add the dynamic content value representing the filename without extension instead

    Once you reexecute the flow and inspect Initialize variable output you will realize it is an array with 5 elements

    [
    "Doe, John",
    "145236",
    "20200101",
    "Anytown, AS",
    "Jane SMITH"
    ]

    Now, you can grab each element from your array by means of the following WDL expressions:

    variables('myInputArray')[0]
    variables('myInputArray')[1]
    ...
    variables('myInputArray')[4]
    

     Hope this helps

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1