0

I have a List Group Members action to get the members of a security group >> then I am trying to build semicolon separated string for the members emails inside a compose action, as follow:-

johnjohn123_1-1698880893372.png

but i got this error;-

'The template language expression 'join(outputs('List_group_members_2')?['body/value']?['mail'],';')' cannot be evaluated because property 'mail' cannot be selected. Array elements can only be selected using an integer index.

Any advice?

Thanks

1 Answer 1

1

It is not possible to do in your way. To do:

  • declare a new variable of type array

variable array

  • use Apply to each to iterate of each users part of the group
  • check if the user has an mail, if true, append it to the array
  • use compose and join if you want to join the values with a comma:

join(variables('Emails'), ',')

You can also use a string variable and concatenate emails with a comma on each iteration.

Workflow: worklow

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.