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

Using "apply to each" to compose a single HTML table and email?

Hi All,

 

I'm trying to create a flow to run on a schedule which gets a list of records from Dynamics, finds records with a null value and then builds a HTML table and emails this out.

 

I have the vast majority of the flow working fine but I can't seem to get around the "apply to each" step. I only want a single HTML table and email to be sent out with a list of all records, but I seem to only be able to have multiple emails sent out (as the "send an email" step repeats on the "apply to each" step).

 

I have attached a picture of the flow. Is it possible to have a "create HTML table" and "send an email" step? I don't want multiple emails, just 1 with a list of records on.

 

If I move the "send an email" step outside of the "apply to each" my condition no longer applies so I just get a list of all (unfiltered) records.

 

https://imgur.com/a/iKbgGkR

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Using "apply to each" to compose a single HTML table and email?

Hi @dnewton,

 

Please don't add a send an email action inside of the apply to each if you want to send single email, and please take a try to create the flow with odata filter in the "List records" action as below:

Capture.PNG

 

 

 

Please let me know if your problem could be solved.

 

Best regards,

Alice

View solution in original post

3 REPLIES 3
Highlighted

Re: Using "apply to each" to compose a single HTML table and email?

Hi @dnewton,

 

Rather than using the Apply to each on each item in your list. You should look at converting the list into HTML and then pull your send email below the Apply to each. You might want ot investigate the select action instead.

Highlighted
Community Support
Community Support

Re: Using "apply to each" to compose a single HTML table and email?

Hi @dnewton,

 

Please don't add a send an email action inside of the apply to each if you want to send single email, and please take a try to create the flow with odata filter in the "List records" action as below:

Capture.PNG

 

 

 

Please let me know if your problem could be solved.

 

Best regards,

Alice

View solution in original post

Highlighted
Regular Visitor

Re: Using "apply to each" to compose a single HTML table and email?

Thank you - incredibly simple solution but works perfectly!

 

I had tried doing this without sucess as could not work out the correct way to only filter on null but your explanation was excellent.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (4,561)