Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

delete a SharePoint list item when the corresponding excel row is deleted using power automate

(1) ShareShare
ReportReport
Posted on by 2
 delete a SharePoint list item when the corresponding excel row is deleted using power automate, can you help
  • Suggested answer
    FLMike Profile Picture
    FLMike 27,710 on at
    delete a SharePoint list item when the corresponding excel row is deleted using power automate
    Hi,
     
    While there is no specific Trigger for Excel, there is a Trigger for when a File is changed in SharePoint or OneDrive
     
    But you would still need to verify that something got deleted, as Nived as mentioned.
     
    So you either need too use SharePoint, or create a copy from the file and compare the unmodified file to the modified one.
    Then also delete it from the master copy or add to the master copy to keep them in sync.
     
  • Suggested answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,024 on at
    delete a SharePoint list item when the corresponding excel row is deleted using power automate
    Hi,
     
    There is no trigger to trigger a flow when excel row is deleted. So workaround would be to create a scheduled flow which runs every specified interval, checks the items in sharepoint list and then check whether same item exists in excel or not, if not > delete that item from SP list.
     
    Also we need a unique id column that can acts as unique identifier for sp list and excel data so that data can be easily looked up.
     
    For demo purposes- i have created a sp list having 2 columns - Title and Office where title column is unique identifier.
     
    Now same data is found in an excel file enclosed in table

     
     
    Now let's see how flow can be designed.
     
     
    So a scheduled flow has to be created which should run in specific interval of time.
    Following steps need to be followed under scheduled flow
     
    1. Get items from the sharepoint list. enable pagination if needed.
     
    2. Now loop through each item in get items action output and do the following steps
     
    Follow the steps to be done when inside the loop
     
    2.1- use list rows in table action and use a filter query to filter only the rows whose title equal to title of current iterating item details as shown below
     
    2.2- use a condition to check whether the number of items/rows returned by list rows in table action is zero or not. if zero- it means row in the excel is deleted and thus need to be deleted from excel as well. see below for the code
    Expression - 
    length(outputs('List_rows_present_in_a_table')?['body/value'])
     
    In yes branch - use delete item action to delete that sp list item
     
    Hope this helps !
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
     
     

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

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard