Hi everyone, I am trying to build a flow where I need to send recurrent emails depending on one specific column in the SP list. There is a column named "origin" and I need to send one email for unique values in that column. For example, if there are 6 items with 2 different origins, it should send 2 emails with origin in the subject and a table of all those items relevant to that unique origin. Below is my example, I cannot seem to figure out how to have the origin in the subject of the email.
1
2
3
Solved! Go to Solution.
Hi @Anonymous
Ah good. You’re using union and with the union being your input, the origin would be equal to dynamic value current item.
but first, remove string from your first expression and then there is no need to split in the 2nd. To be honest you don’t need the variable for your splitting unique origins as the compose will do. Equally, you could just pass the union express to the input of your apply to each 2, but that’s just efficiency and saving on actions. Your solution will still work.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
Hi @Anonymous
Would this origin be part of your apply to each 2 input array? Can you see it in the history of the splitting unique origins array? If you know the key name, you can build an expression for your subject item()?[‘Origin’].
but I am struggling to see where you define the unique origins. If you have an array of all 6, you can use union(array,array) and it will return the 2 unique values.
hope this is of help.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
Hi @DamoBird365 , thank you for your message. yes it is part of the apply to each 2 input array. Thank you for proposing the expression, I will try the expression and share update on this thread.
But so far I am able to get unique origins but finding problem in returning them in the subject of the email.I am using this expression to make make them unique
then I am splitting the unique origins from the compose output
As you can see, the flow is sending two emails but in the subject I see the first unique origin as the compose output
and the second unique origin as the output as shown here. I wanted to see them with just the texts and not like an array code
Hi @Anonymous
Ah good. You’re using union and with the union being your input, the origin would be equal to dynamic value current item.
but first, remove string from your first expression and then there is no need to split in the 2nd. To be honest you don’t need the variable for your splitting unique origins as the compose will do. Equally, you could just pass the union express to the input of your apply to each 2, but that’s just efficiency and saving on actions. Your solution will still work.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
Thank you @DamoBird365 , it worked. It was simple and thank you for your help. Yes you are right, I could use with the union expression in the apply to each, but I used the variables because I find it easy to recall when I have to modify it in future 🙂
below is how it worked.
used union in compose and then used its output in the variable
use current item in the compose and used its output in the email subject line
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!
User | Count |
---|---|
32 | |
32 | |
22 | |
22 | |
19 |
User | Count |
---|---|
56 | |
56 | |
41 | |
37 | |
29 |