Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

When an excel file is created in a folder - it's data should get updated in SharePoint list

(0) ShareShare
ReportReport
Posted on by
When an excel file is created in a specific folder of a document library folder in a SharePoint. It's data should get updated in the SharePoint list automatically if the column name " issue id " is having a unique value . Also if the any existing issue id of the SharePoint list items is not available in the new excel file then in the SharePoint list that particular item column "issue status" should update as issue closed.
  • narayan225 Profile Picture
    narayan225 2,390 on at
    When an excel file is created in a folder - it's data should get updated in SharePoint list
    I have done this and tested myself.
     
    Below is the flow:

    FULL FLOW:

    Trigger:

    Here you select the document library and the folder that you want to trigger the flow.


     

    Get file metadata using path

    Here you select the same site address as the trigger.
    And on file path, use the dynamic content that has the file path.

    Get tables

    Here you select the site address as location and the document library. You can use the  body/Name dynamic content from last action.

    List rows present in a table

    Here you select the same site address and document library. Use the field dynamic content from trigger and the formula to get the table name. We are using first expression as our file will only have one table.

    Get items

    Here we select the site address where our SharePoint list is. And select the list that we need.
    And use the filter query to check if our id number column matches the values in excel file. Because we don’t have the column name as dynamic content for excel, we use the expression that I have in note. Basically, the same expression but instead of ID Number, you must enter your column name.
    Here we are searching our SP list for a match for all the items in Excel.

    Condition

    Here we check if the filter that we did on previous action returned any items.
    We check using the length function as you would. If you don’t know how to use it, you can use the expression that I have in the note. Make sure that the action name is changed if your action name is different.

    Update item

    This is if the above condition is true. Meaning we have found a match and want to update our SP list.
    Here you map each column in SP to the item in excel.
    Use following expression for all the values of Excel:
    Items(‘For_each’)?[‘columnnameinexcel’]

     

    Create item

    Use this action in the no branch of the condition. Basically, we want to create a new item if the filter returns no result meaning there are no items matching the id that is in excel.
    Use the same expression and mapping as Update item action.
     
    Hope this helps.
    Cheers!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard