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 / send an email with onl...
Power Automate
Answered

send an email with only part of a sharepoint file

(1) ShareShare
ReportReport
Posted on by 12
i have a flow where i get a sharepoint file and attach it to an email and send the email.  the sharepoint file is a table that is updated with a new row every time an email comes in with given criteria.  when sending the email, i want to filter the table to only include current day rows before sending.  is this possible?  so in the below screenshot, i would only want to send the rows with 8/1/2024 in the Date column.
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
    Hi,
     
    we have to use office script to do the filter operations
     
    see below
     
    I am assuming that excel data is present in table.
     
    Office script used here
     
    function main(workbook: ExcelScript.Workbook) {
    	let currentDate = new Date();
    
    	// Get year, month, and day
    	let year = currentDate.getFullYear();
    	let month = (currentDate.getMonth() + 1).toString().padStart(2, '0'); // Months are zero-based
    	let day = currentDate.getDate().toString().padStart(2, '0');
    
    	// Format date as yyyy-MM-dd
    	let formattedDate = `${year}-${month}-${day}`;
    
    	let table1 = workbook.getTable("Table1");
    	// Apply checked items filter on table table1 column Date
    	table1.getColumnByName("Date").getFilter().applyValuesFilter([{ date: formattedDate, specificity: ExcelScript.FilterDatetimeSpecificity.month }]);
    }
     
     
    Now let's see how the flow looks like -
    1. Use Run script where it is used to Run script by selecting the file and then the script 
     
    2. Now use get file content to get content of excel file
     
    3. use send email action to send email like below
     
     
     
    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

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 124 Super User 2026 Season 1

#2
Ellis Karim Profile Picture

Ellis Karim 52 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 50

Last 30 days Overall leaderboard