web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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
    15,404 Super User 2025 Season 2 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

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard