cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
melf123
Helper III
Helper III

Creating a different HTML Table only containing the Excel rows related to the each time.

Hello everyone,

 

I'm currently grabbing rows from an Excel sheet from today's date, creating a HTML table using certain columns from the Excel sheet and sending this table out in an email. My issue here is that although these rows have the same date, they have different times recorded in the 'Scheduled Time' column. You can see in the below example under the 'Scheduled Time' value in the arrays. Two are at 18:00 and two are at 20:00. 

Ex array:

[
  {
 "@odata.etag""",
    "ItemInternalId""#####",
    "ScheduledDate""2023-08-01T00:00:00.000Z",
    "Scheduled Time""1899-12-30T18:00:00.000Z",
    "Pipeline""MS",
    "Defect / Enhancement [D/E]""D",
    "API""example1",
    "Area of Service ""example",
    "Tag""example",
    "Project""example",
    "Meeting Invitees""exuser@example.com; exuser2@example.com",
  },
  {
   
 "@odata.etag""",
    "ItemInternalId""#####",
    "ScheduledDate""2023-08-01T00:00:00.000Z",
    "Release Time""1899-12-30T18:00:00.000Z",
    "Pipeline""MS",
    "Defect / Enhancement [D/E]""D",
    "API""example2",
    "Area of Service ""example",
    "Tag""example",
    "Project""example",
    "Meeting Invitees""exuser@example.com; exuser2@example.com",
  },
  {
 "@odata.etag""",
    "ItemInternalId""#####",
    "ScheduledDate""2023-08-01T00:00:00.000Z",
    "Release Time""1899-12-30T20:00:00.000Z",
    "Pipeline""MS",
    "Defect / Enhancement [D/E]""D",
    "API""example3",
    "Area of Service ""example",
    "Tag""example",
    "Project""example",
    "Meeting Invitees""exuser@example.com; exuser2@example.com",
  },
  {
    "@odata.etag""",
    "ItemInternalId""#####",
    "ScheduledDate""2023-08-01T00:00:00.000Z",
    "Release Time""1899-12-30T20:00:00.000Z",
    "Pipeline""MS",
    "Defect / Enhancement [D/E]""D",
    "API""example4",
    "Area of Service ""example",
    "Tag""example",
    "Project""example",
    "Meeting Invitees""exuser@example.com; exuser2@example.com",
  }
]

I've filtered out the scheduled times and have an "Apply for each" action around my "send outlook email v2" action so that way an email is sent for each time detected in the rows for today's date, but I can't get my HTML table to only contain values related to that time, instead all of the values are included in this case, the 6PM and 8PM emails.

 

Can someone please help? I've been stuck on this for a while and would appreciate any helps or tips!

melf123_0-1690925523935.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

No worries. The one issue I see with with your Select action is that you are selecting from the outputs of the List Rows Present in a Table action and not the Filtered Array

 

Ideally, you'd want to be selecting the Meeting invitee's from the Filter Array results—unless I've missed something. However, I'm unclear on why you would be pulling out the email addresses in this way. Are you sending each invitee an email with both the 6PM and 8PM table? Or are the invitees only supposed to get the items that pertain to them?

creativeopinion_7-1690987517292.png

I would then recommend using a variable to store the meeting invitees and use a condition to adjust the variable as needed. 

 

Select Scheduled Time

You need to use a Select action on the Scheduled Time column of your Excel table. This will pull all your scheduled times into an array. You can format the time in this action as well.

creativeopinion_5-1690985749554.png

 

 

Then you need to use a Compose action to combine the times and give you a list of unique times with the union() function. You can also sort the array if you'd like.

creativeopinion_3-1690985588015.png

I've put all my actions into a Scope action, to keep things organized.

 

creativeopinion_4-1690985736520.png

 

Apply to Each – Scheduled Time

Add an Apply to Each action to loop through each Scheduled Time

Add a Filter Array action to Filter through your first Filtered Array (on Deployed items). For the first value, you'll need an expression:

item()?['ScheduledTime']

Note: The text between the single quotes needs to match whatever the Filter Array output is displaying in red between double-quotes next to your Scheduled Time. From your original post, it may be Released Time. You will need to verify this.

The second value will be the current Item of the Apply to Each action. Since the Apply to Each action is looping through all the times, this is what you'll use to compare with the values you are filtering through.

 

RUN A TEST. I would run a test at this point before moving on to confirm that the Filter Array is returning the correct items.

 

After you've confirmed the Filter Array action is returning the correct items, add a Create HTML Table action with the outputs from the Filter Array. This will give you a table for each time you are looping through.

creativeopinion_6-1690985844676.png

 

Send an Email

Again, I'm unclear on whether you are sending one email or multiple, but anyway, you can use the meeting invitee variable in the To field of the Send an Email action. 

 

If you are sending an email per time, then you'll need to put the Send an Email action into the Apply to Each action. 

creativeopinion_8-1690987633520.png

 

Hope this helps.

 

 

 

 

View solution in original post

12 REPLIES 12

Can you upload a screenshot of what your current flow looks like?

melf123
Helper III
Helper III

Hi @creativeopinion I just updated my post with a screenshot of this section of my flow

Can i see the top part of your flow? What's the trigger? It looks like all of your actions are in a condition. It would help me understand what you are trying to do. Thx.

melf123
Helper III
Helper III

@creativeopinion Here is how I'm getting my array, I hope I'm providing enough information it's just a long flow

melf123_0-1690928169620.png

 

No worries. You just had a lot of apply to each actions which is why I wanted to get a better understanding of what you are trying to do. Nesting that many apply to each actions isn't really ideal. 

 

Where does the condition come in to play? I didn't see it in your recently attached screenshot.

 

Also, can you provide some insights on why you are selecting the Meeting Invitees from the List rows present in a table values instead of the outputs from the Filter Array action?

melf123
Helper III
Helper III

@creativeopinion If it makes it easier this is my current email, I have two emails so far since I have two scheduled times of 6:00 and 8:00 for these rows in my excel sheet. I want each email to only have rows related to that time in it's email, so for this 6PM email I only want the first two rows with the 18:00:00 timestamp.

melf123_1-1690928800661.png

This is my 8PM email, I only want the bottom two rows related to the 20:00:00 timestamp to be sent along with this email. 

melf123_3-1690928974165.png

Thank you

 

 

melf123
Helper III
Helper III

@creativeopinion my condition is just to add additional invitees to the email only if the rows meet a certain criteria

Can you provide a bit of insights on that, I might have a different way to approach it.

melf123
Helper III
Helper III

Thanks @creativeopinion! Well I think I'm set on that part for the meeting invitees, I'm able to grab them automatically via 'Select' but I'm hoping to get this HTML table issue taken care of, I'm new to Power Automate and have spent almost two weeks trying to figure this out :/.

No worries. The one issue I see with with your Select action is that you are selecting from the outputs of the List Rows Present in a Table action and not the Filtered Array

 

Ideally, you'd want to be selecting the Meeting invitee's from the Filter Array results—unless I've missed something. However, I'm unclear on why you would be pulling out the email addresses in this way. Are you sending each invitee an email with both the 6PM and 8PM table? Or are the invitees only supposed to get the items that pertain to them?

creativeopinion_7-1690987517292.png

I would then recommend using a variable to store the meeting invitees and use a condition to adjust the variable as needed. 

 

Select Scheduled Time

You need to use a Select action on the Scheduled Time column of your Excel table. This will pull all your scheduled times into an array. You can format the time in this action as well.

creativeopinion_5-1690985749554.png

 

 

Then you need to use a Compose action to combine the times and give you a list of unique times with the union() function. You can also sort the array if you'd like.

creativeopinion_3-1690985588015.png

I've put all my actions into a Scope action, to keep things organized.

 

creativeopinion_4-1690985736520.png

 

Apply to Each – Scheduled Time

Add an Apply to Each action to loop through each Scheduled Time

Add a Filter Array action to Filter through your first Filtered Array (on Deployed items). For the first value, you'll need an expression:

item()?['ScheduledTime']

Note: The text between the single quotes needs to match whatever the Filter Array output is displaying in red between double-quotes next to your Scheduled Time. From your original post, it may be Released Time. You will need to verify this.

The second value will be the current Item of the Apply to Each action. Since the Apply to Each action is looping through all the times, this is what you'll use to compare with the values you are filtering through.

 

RUN A TEST. I would run a test at this point before moving on to confirm that the Filter Array is returning the correct items.

 

After you've confirmed the Filter Array action is returning the correct items, add a Create HTML Table action with the outputs from the Filter Array. This will give you a table for each time you are looping through.

creativeopinion_6-1690985844676.png

 

Send an Email

Again, I'm unclear on whether you are sending one email or multiple, but anyway, you can use the meeting invitee variable in the To field of the Send an Email action. 

 

If you are sending an email per time, then you'll need to put the Send an Email action into the Apply to Each action. 

creativeopinion_8-1690987633520.png

 

Hope this helps.

 

 

 

 

melf123
Helper III
Helper III

Thank you so much @creativeopinion! This worked just how I was hoping it would, I really appreciate your help I feel so much better having this figured out!

No worries! Glad it worked out.

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 (968)