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 / Get data from excel to...
Power Automate
Suggested Answer

Get data from excel to sharepoint list then delete the excel file that was read

(0) ShareShare
ReportReport
Posted on by 16
Hi,
 
I have a working flow that lists the rows present in a table from an existing document and then uploads data from the excel file onto the sharepoint list. Now, I need to create a trigger for when an email arrives that extracts the data from the excel file in the attachment, and then I need to delete the excel file that was just read. Thanks!
 
 
Categories:
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
    Hi 
     
    Try like per the below flow:
     
    This flow triggers when email arrives in mailbox, reads the excel data & create sharepoint list and then deletes the excel file.
     
    1. after the trigger, use the filter array action to remove the inline attachments 
     
     
    2. use apply to each to loop through the filtered attachments array (output of filter array action)
     
     
    next steps will be explained under apply to each loop
     
    2.1: use get attachment content to get file content.
     
     
    2.2 use create file action to create the file using attachment content
     
    2.3: use get tables action to get list of tables from created file
     
     
    2.4: use list rows present in table to list out all rows in created table.
     
    Expression: 
    first(outputs('Get_tables')?['body/value'])?['id']
     
    2.5: use apply to each loop again to loop through excel data to create list item
     
    2.6: next after items are created, outside loop, use delete file action to delete the file using its ID parameter.
     
     
    Hope it helps !
     
    Mark it as solution if it resolves your query !
     
    Thanks & Regards,
    Nived N
  • CU31101853-0 Profile Picture
    16 on at
     
    Hi,
     
    Thanks so much. The only problem I am having with the flow is that it is completely deleting the list. Is there a way to just delete the data in the Sharepoint list, since I will be receiving new data every morning?
     
    Thanks,
     
    Anthony
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
     
    I am not clear - i hope as per your question - you need to delete the file right ?
     
     
    Thanks & Regards,
    Nived N
  • CU31101853-0 Profile Picture
    16 on at
     
    Hi,
     
    So I receive a daily automated email from Outlook and the attachment is an excel sheet. I am trying to have my flow turn the sheet into a table, upload it to a document library on Sharepoint, then export the data in the tables to a Sharepoint list. Since I receive the email daily, I then want on my flow an action that will replace/delete the data in the Sharepoint list with the new data. 
     
     
    Thanks!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard