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 :
Power Automate - Building Flows
Unanswered

Append new row to SharePoint list

(0) ShareShare
ReportReport
Posted on by 2

I have a SharePoint list called A and a folder in SharePoint. Whenever a new file is added to the folder, I want to automatically add a new row to list A with the name of the Excel file. Additionally, I need to extract the last number from the file name, for example, if the file name is FirstFile_V002.xlsx, I need to extract '2'. If the file name is SecondFile_V011.xlsx, I need to extract '11'. Can you please guide me on how to achieve this using Power Automate? Thank you for your assistance

I have the same question (0)
  • grantjenkins Profile Picture
    11,059 Moderator on at
    Re: Append new row to SharePoint list

    Assuming the filenames will always include Name then _V then a number, you can try the following.

     

    For the trigger I would use When a file is created (properties only) and specify the folder you want to look at.

    grantjenkins_0-1681090458537.png

     

    Then Create item using the File name with extension for Title and the following expression to get the number. It will get the name of the file (excluding the file extension), split on _V and get the last item, then convert to an integer (which will remove the leading zeros).

    int(last(split(triggerOutputs()?['body/{Name}'], '_V')))

    grantjenkins_1-1681090553603.png

  • Andy_2 Profile Picture
    2 on at
    Re: Append new row to SharePoint list

    Thank you a lot, I will check this. I have another question can I add new column to an existing list that have the max of :  int(last(split(triggerOutputs()?['body/{Name}'], '_V')))

    each time I aded new row to the list that column should be changed with the max value. 

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 666 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 382 Moderator

#3
developerAJ Profile Picture

developerAJ 254

Last 30 days Overall leaderboard