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 / Update and send an Exc...
Power Automate
Answered

Update and send an Excel file as an attachment

(1) ShareShare
ReportReport
Posted on by 14
Hello,

I am working on an automated cloud flow, which should do the following:
  1. Get an Excel document from a Sharepoint library;
  2. Update a row in the Excel document (using a key column), in particular update 4 fields using variables (which are being set in previous steps in the same cloud flow)
  3. Get the file contents of the modified document (using the path).
  4. Add the file as an attachment to an e-mail.

The first 2 steps are going smoothly. The document is modified in the Sharepoint library via the cloud flow.
However, when I get the file content of the (modified) Excel-file and email the document (after a 1-minute delay), the changes to the Excel file are not included. Invariably, a blank Excel document is added as an attachment, but not with the latest modifications (added earlier in the cloud flow).
I have already tried using a longer delay, as well as checking out the file, but nothing seems to work. I always get a blank Excel as an attachment in the mail.

Thx for your advice,
Filip
Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    16,053 Super User 2026 Season 1 on at
    Hi,
     
    Yes, this is a known issue and capturing the updated version has always been unstable in my opinion.  My easy fix for this is the create a copy of the file between steps 2 and 3.  For whatever reason, this always captures the most recent version.  Then in step #3 you will always have the current file contents.
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     
  • Verified answer
    Meekou Profile Picture
    200 Moderator on at
    For your issue, it is caused by that get file content did not get the latest version of Excel file.
     
    In general, you can add delay before getting the file content. There is another way is to refresh the excel content by office script.
    • Open any Excel online file and add new script
    • Update the script content with below
    
    function main(workbook: ExcelScript.Workbook) {
        workbook.refreshAllDataConnections();
    }
    
    • Add Run script option before calling get file content
    Regards,
    Meekou

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