Hi,
I am trying to build a flow that selects all rows in an Excel table relating to one To email address, then sends one consolidated email to the recipient. I also need to include a CC field.
I'm very new to flows but have managed to compile the below based on what I've found online - it works perfectly to group the rows and sends only one email, however the CC field is duplicated many times in the output (once per row of data that the CC email is included on).
to: email correct
cc: email; email; email; (same email for every row)
I have tried using the Union expression to bring only one CC value forward, however as I am already using this for the To email, it throws up an error.
Does anyone know how I can correct my flow?
Thanks
Solved! Go to Solution.
Hi!
I would suggest the following:
make CC variable of type array.
Now, inside the true branch condition of 'Apply to each 3' add an 'Append to Array' action block, name 'CC', value CC excel column
Finally, let's focus on 'Send an email' action block, I guess you can assign the following expression as the value for to 'CC' input:
join(union(variables('CC'),variables('CC')),';')
Just after 'Send an email' remember to reset 'CC' variable value, so it starts as an empty array for the next iteration
Hope this helps
Proud to be a Flownaut!
Hi!
I would suggest the following:
make CC variable of type array.
Now, inside the true branch condition of 'Apply to each 3' add an 'Append to Array' action block, name 'CC', value CC excel column
Finally, let's focus on 'Send an email' action block, I guess you can assign the following expression as the value for to 'CC' input:
join(union(variables('CC'),variables('CC')),';')
Just after 'Send an email' remember to reset 'CC' variable value, so it starts as an empty array for the next iteration
Hope this helps
Proud to be a Flownaut!
Thank you so much!
Hi @efialttes ,
I'm trying to do a very similar workflow, only difference would be that I want to send a single email to each TO group and CC'ing a single time the manager. I used the steps described above and I got the error which can be seen in picture. I don't want to have the "apply to each" row in my excel file, but consolidated per responsible person in the TO field.
I did posted a query as well on community and didn't got a response yet, wondered if you could help would be really much appreciated.
Can you please advise where to correct?
Many thanks,
Manuela
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
88 | |
58 | |
42 | |
37 | |
36 |
User | Count |
---|---|
85 | |
72 | |
61 | |
56 | |
40 |