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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an attachment and...
Power Automate
Unanswered

Send an attachment and an HTML to specific users

(0) ShareShare
ReportReport
Posted on by 17

Hello Community, I have been trying to solve this problem for a few days now without success.

 

I have a database in Excel from which I want to send each user the corresponding information. Additionally, I have created unique files for each user and I want the corresponding file to be sent along with the table in the email. I created separate flows for each task and they both work, but I don't know how to filter or match the information from the files in Sharepoint with the table information.

 

First, I will show the flow that generates the table, and then the flow that attaches the files:

 

Here is my flow:

First, I select all the information I want to work on.

AlzDemian2891_0-1704755110656.png

Then I converted the selection into a JSON format, in step 3, I converted the information in the JSON into an XML.

In Steps 3 and 4 I extracted Emails and Directors from the JSON. 

The Step 5, counts elements in rows and extract director's email and name. 

AlzDemian2891_1-1704755144375.png

 

Then, I use an "Apply to each" loop to create an HTML table per director, grouping by managers and status. There was a "Send an email" action after "concatStyleandID," but I deleted that step as I was trying to create the Excel file.

AlzDemian2891_2-1704755311207.png

 

 

And here is the flow to attach the files:

AlzDemian2891_3-1704755351502.png

 

  1. I get the properties of the files.
  2. I Get the content of each file using the "Apply to each" loop.
  3. I use a "Compose" action to convert it into an object.

AlzDemian2891_4-1704755412226.png

I transform the result of that "Compose" using the expression "outputs."

I get items from a list with user information such as their name and email

I apply an "Apply to each" loop to filter for each file, filtering by the user's name using "item()?[‘Name’]" as the comparison element.

I send the email with the attachment.

 

Separately, both flows work, but I want the table and the attachment to be included in the same email for each user.

Thank you.

Categories:
I have the same question (0)

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard