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 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
    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

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard