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 / Append new row to Shar...
Power Automate
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

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    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

    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

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard