cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nishadhac
Regular Visitor

Assistance Needed for Daily Email Report

Hello,

Can anyone help me? I want to extract the most recently added data from an Excel file, generate a report from it, and send it as an email daily after 4 pm to a couple of email addresses.

3 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @nishadhac ,

 

Here's a sample flow for you to build on and make it your own.  In this example, I am sending out a daily report that contains all new rows for TODAY's DATE and then emailing to some people.

 

trice602_0-1697301172230.png

 

The first part of the flow has a trigger, when an email arrives (the complete report), I save it to OneDrive and then list rows in the table.

 

trice602_1-1697301255818.png

 

 

Include attachments is important in the trigger.

 

trice602_2-1697301304511.png

 

I have a variable we will use later, just initialize here

 

trice602_3-1697301340285.png

 

Next, I am saving the file I receive by attachment, the dynamic content is from the trigger, attachment name and attachment content bytes.

 

trice602_4-1697301394223.png

 

 

Next I list rows present in the table of the file I just saved.  I assume the table name is named Table1 and enter that as a custom value.  The file name is the dynamic content from the trigger Attachment Name, shown below.

 

trice602_5-1697301477837.png

 

The next two actions select the data and put in an html table.  When you create your map in the select, even though they show up like this before after saving/running, the way to enter in the map values is in the following format as an expression:

 

item()?['Attendance Days']

item()?['Class']

item()?['IMS_Marked']

item()?['Notes']

 

trice602_6-1697301533048.png

 

The create HTML table action uses the output of the Select action, shown above.

 

Next, I will format the html table a little with borders and cell spacing, using a set variable action.

 

replace(body('Create_HTML_table'),'<table>','<table border="1" style="padding:10px">')
 
trice602_7-1697301725900.png

 

Last step is to send the email out.  I use a dynamic subject line for today's date:

 

formatDateTime(utcNow(),'MM/dd/yyyy')

 

trice602_8-1697301795029.png

 

 

Here's a sample report by email with today's entries.  I didn't spend a lot of time formatting but you have the flow to make this your own.

 

trice602_9-1697301848275.png

 

This is the excel table I am using for the test.

 

trice602_10-1697301891216.png

 

Please mark one or more of my replies as a solution if they were helpful!

 

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

View solution in original post

Hi @nishadhac ,

 

I was posting the flow example when you replied.  So assuming your form results are already getting saved to a OneDrive excel table, you would modify accordingly:

 

1)  Change the trigger to a recurrence to run once a day a 4 PM.

 

2)  Since the file is already created, you can skip creating the file and just list rows present in the table. 

 

trice602_0-1697302305390.png

 

 

Again, please consider marking one of more of these replies as a solution.  I enjoyed working on this post.

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

View solution in original post

Hi @nishadhac ,

 

Here's the details on the Select values, again I know this part can be confusing so clarifying.  These are entered as expressions but again, after saving and running, they will look like this but you enter them in as an expression.

 

trice602_0-1697302571075.png

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

View solution in original post

9 REPLIES 9

Hi @nishadhac ,

 

I'm sure there are a bunch of people glad to help with this!  If you can share your excel workbook by pasting in a screenshot (not attaching) and indicate if the data is in a table, how you want to filter it by specific columns, etc, etc and how you want to share it -- those details are critically important to getting someone to response and help.

 

So think about providing the entire scope of work and share all the details.

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

Also include where the Excel file is stored:  OneDrive, SharePoint, File System, etc 😊

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

Hi @trice602 ,

I would like to retrieve the most recently updated data from the IMS Marked Date column and the Excel file stored in OneDrive for Business.



Screenshot 2023-10-14 at 8.35.15 PM.png

Hi @nishadhac ,

 

Perfect!  Thanks for adding - very helpful.  So to clarify, you want to add any rows that contained yesterday's date as an example?  I think I can put that together pretty quickly over coffee this morning

 

 

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

Hi @trice602,

Yes, you are correct. It will update on a daily basis as a result of filling out the Microsoft form. I just want to receive the day-by-day results, not all the previous date records, as a report sent every day after 4 pm to selected email addresses.

Hi @nishadhac ,

 

Here's a sample flow for you to build on and make it your own.  In this example, I am sending out a daily report that contains all new rows for TODAY's DATE and then emailing to some people.

 

trice602_0-1697301172230.png

 

The first part of the flow has a trigger, when an email arrives (the complete report), I save it to OneDrive and then list rows in the table.

 

trice602_1-1697301255818.png

 

 

Include attachments is important in the trigger.

 

trice602_2-1697301304511.png

 

I have a variable we will use later, just initialize here

 

trice602_3-1697301340285.png

 

Next, I am saving the file I receive by attachment, the dynamic content is from the trigger, attachment name and attachment content bytes.

 

trice602_4-1697301394223.png

 

 

Next I list rows present in the table of the file I just saved.  I assume the table name is named Table1 and enter that as a custom value.  The file name is the dynamic content from the trigger Attachment Name, shown below.

 

trice602_5-1697301477837.png

 

The next two actions select the data and put in an html table.  When you create your map in the select, even though they show up like this before after saving/running, the way to enter in the map values is in the following format as an expression:

 

item()?['Attendance Days']

item()?['Class']

item()?['IMS_Marked']

item()?['Notes']

 

trice602_6-1697301533048.png

 

The create HTML table action uses the output of the Select action, shown above.

 

Next, I will format the html table a little with borders and cell spacing, using a set variable action.

 

replace(body('Create_HTML_table'),'<table>','<table border="1" style="padding:10px">')
 
trice602_7-1697301725900.png

 

Last step is to send the email out.  I use a dynamic subject line for today's date:

 

formatDateTime(utcNow(),'MM/dd/yyyy')

 

trice602_8-1697301795029.png

 

 

Here's a sample report by email with today's entries.  I didn't spend a lot of time formatting but you have the flow to make this your own.

 

trice602_9-1697301848275.png

 

This is the excel table I am using for the test.

 

trice602_10-1697301891216.png

 

Please mark one or more of my replies as a solution if they were helpful!

 

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

Hi @nishadhac ,

 

I was posting the flow example when you replied.  So assuming your form results are already getting saved to a OneDrive excel table, you would modify accordingly:

 

1)  Change the trigger to a recurrence to run once a day a 4 PM.

 

2)  Since the file is already created, you can skip creating the file and just list rows present in the table. 

 

trice602_0-1697302305390.png

 

 

Again, please consider marking one of more of these replies as a solution.  I enjoyed working on this post.

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn

Hi @nishadhac ,

 

Here's the details on the Select values, again I know this part can be confusing so clarifying.  These are entered as expressions but again, after saving and running, they will look like this but you enter them in as an expression.

 

trice602_0-1697302571075.png

 

 

If this was helpful: Please mark as a solution Give me a thumbs up Always glad to help, Tom! Connect on LinkedIn
nishadhac
Regular Visitor

Hi @trice602 ,

Could you please share the created floor with me.

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,213)