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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / send an email with onl...
Power Automate
Unanswered

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,129 Super User 2025 Season 2 on at
    send an email with only part of a sharepoint file
    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

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
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard