Hello Microsoft Community
I'm very new to Power Automate and I'm enjoying learning it a lot. I'm currently trying to wrap my head around using data operations to manipulate values in an array.
In my current project, I'm attempting to use the 'UserPrincipleName' (mail) values from 'Get Group members' to email all users from that group.
- The process I'm using is:
- Get data from 'Get Group Members',
- (join) From 'Group Members';
- (select) 'Get Group Members', Map - 'Group Members UserPrincipleName'
- Create CSV table - Ouput from select data operation
I am able to use the output of the CSV data to email users
but this does not work for creating an approval process. This is because the output is not clean data.
(As seen below)
I'm wondering if there's away to structure this output so that it can be used in a format to email an approval work flow
Any help is appreciated
thank you
Solved! Go to Solution.
Okay,
My mistake.. You need to use Append to string variable. Not Set variable.
Proud to be a Flownaut!
Hello @w0rmsp17
Instead of using data manipulation actions.
use a String variable and append each email from the Get group members to the variable,
It should go like this:
First Initialize a string variable and leave blank for now.
Next, add an Apply to each loop. Put Group Members in the input.
Next use a Set Variable action and put the Group memberUPN with a ; at the end.
now outside your loop you can add a Compose action. Put the variable inside Compose.
now the compose action will have all the emails from that group that can be used to send an email
Proud to be a Flownaut!
Hello@Jcook,
thank you for the response. I like the look of this solution, I'm gonna set it up and give it a go. I'll let you know how it goes.
Thank you again
So it should look like this?
The only issue I'm having is the compose function only captures the first value in the apply to each loop. I may be missing a step in the apply to each loop
Hi @w0rmsp17
Could you share a picture of the run from the Flow,
I would like to see what the values are that are being passed into the loop
Proud to be a Flownaut!
Hey @Jcook , thank you for the response
steps:
- i initialise a black string variable
- Create an apply to each loop (with Group members value)
- Compose with Group Member User Prinicple name
- FInally I 'set variable' to the compose output
this is what the run looks like
Okay,
My mistake.. You need to use Append to string variable. Not Set variable.
Proud to be a Flownaut!
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
128 | |
53 | |
38 | |
26 | |
21 |