Hi,
I am really struggling to get this to work and hoping someone can help me.
I have a list of items grouped by (let's say) Customer. Each customer receives a unique ID, and each item belonging to that customer receives a unique ID based on the customer's ID. Example: Customer ID = A2022. Items belonging to that customer, ID = A2022-I01, A2022-I02 etc. I have a person/group column that allows multiple selections. For each item (A2022-I01 etc.) one or more persons can be assigned.
What I want to do is to be able to send a single email to all persons connected to a certain customer, i.e. all persons listed in the person/group column, for each item belonging to a specific customer.
I have seen many solutions for how to send an email to all persons from a person/group column that allows multiple selections, but those solutions only take into account that you look at one item at a time. When I try to do this for multiple items, the result is a lot of duplicate email addresses (if the same person is assigned to several items for the same customer). In other words, I manage to get email addresses for all relevant persons (via Get items, filtered for starting with the customer ID), but I can't find any way to combine these into one string where there are no duplicates. The flow I created is a manually triggered flow, if that matters.
Greatful for any tips and pointers. Let me know if you need more info.
BR,
Sofia
Here is one Idea of how it can be done: Remove Duplicates from a Power Automate Array with One Action - FlowJoe.io
Thank you. Unfortunately, this doesn't work for the my problem, seeing as I want to join email addresses from multiple items which each has multiple persons' email addresses. In other words, I have to find some way to merge the arrays I get for each item and then remove duplicates.
Hi @sofiaelvira ,
Do you want to combine the person fields that allow multiple selection in a table and get the email address strings separated by ; after deduplication?
If so , I've made a test for your reference:
1\My SP list:
2\My flow:
The Result:
Best Regards,
Bof
Hi,
Thank you for the reply, that sounds about right! However, when I try this, I receive the error message that the action Select failed because the input was 'null'. It makes sense, since the input is from Compose, which in turn has input from the Email variable, which is empty from the start (no initial value added). Maybe I'm missing something?
BR,
Sofia
Please show where you get the error.
User | Count |
---|---|
92 | |
45 | |
20 | |
19 | |
17 |
User | Count |
---|---|
143 | |
51 | |
42 | |
40 | |
31 |