Dear all,
Use Case:
I am building a flow to send an email 2 weeks before expiration of a certificate to the contact person of that item.
The table is a SharePoint List with 3 columns: Identification No, Valid Until, Contact Person.
Issue:
The html table always contains all items during that reporting time. So different contact persons always get all certificates expiring even they are not responsible for it.
Here is what I created:
Email Body contains: Outputs of HTMLTableStyling (CSS) and CleanHTML (to have a proper HTML table)
It would be great to have one email by contact person (containing all items expiring), but not containing these items which are not related to that contact person.
Could anyone tell me what I forgot to consider?
Thank you!
Even after recreating the column without blank space in between and using _x0020_ i run into the same issue. Thats how my column is configured. Anything different to yours?
This is the overall overview of my flow:
Similar to yours:
Thanks
Hi @Anonymous
I tested it on my side and can get the name of the user. Please check if the internal name of your ‘Contact Person’ column is ‘ContactPerson’.
Best Regards.
Hi @v-lilyw1-msft / @v-LilyW-msft,
thank you for this suggestion, but even this did not fix it:
Any other idea?
Hi @Anonymous
Ok this is far to complex for me to build it on my own without your guidance. I am still going through it step by step to understand every action done.
I was able to copy what you did with success. Many thanks for this detailed instruction!
The only open question I have is, how to include the Name of the Contact Person in the HTML table.
I managed to add a link to the item:
But item()?['ContactPerson'] or item()?['Contact_x0020_Person'] or item()?['Contact_x0020_Person']?['Value'] did not work. Any suggestions?
Thanks
Hi @Anonymous
If you want to send an email to Person(containing all items expiring), but not containing these items which are not related to that contact person. You can take a try with the following screenshots.
This is my test list.
Flow in details:
Expression:items('Apply_to_each')['ContactPerson/Email']
You can add HTMLTableStyling, I'm ignoring it here.
After flow runs, Test2 and Litest will receive the following emails separately.
Hope the content above may help you.
Best Regards
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear @PrasadAthalye ,
thank you for your suggestions, but I am not sure if I got what you explained in your post and how to reflect it properly. I am pretty new to this.
According to your first paragraph I did this:
Since I did not get the second paragraph at all I was just guessing:
Could you please guide me through your suggestion based on these screenshots?
Thank you
Create a Array variable and run a loop on output from GetItems. Then add a condition to check if Person name has been already added to array variable or not using exist condition. If not, Add it. This way, you can collect all unique contact people.
Then run a loop on this array variable for each item and use filter array condition to filter GetItems output for that person which will give you rows related to that person. Then you can build your HTML and send email notification.
David_MA
135
Super User 2025 Season 1
stampcoin
125
Michael E. Gernaey
114
Super User 2025 Season 1