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

Community site session details

Session Id : IHZzVnxghKHg64Cc7iy/jE
Power Automate - Building Flows
Answered

Create Sharepoint List Item when a file is added to OneDrive

Like (0) ShareShare
ReportReport
Posted on 3 Jun 2020 19:34:57 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!!

 

 

I have the same question (0)
  • efialttes Profile Picture
    14,756 on 04 Jun 2020 at 16:50:14
    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 04 Jun 2020 at 15:50:34
    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 03 Jun 2020 at 19:44:22
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete