
Announcements
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.
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.
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.
And here is the flow to attach the files:
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.