cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

For each group by item send email with approval

Hi,

 

we are using a Travel application Form with powerapps and flow and right now for each particpant an email to the supervisor will be send out which means if 5 of his workers are participating he will get 5 emails.

 

To bypass this problem i now did group every participant by his supervisor

ClearCollect(travelerByManager,GroupBy(traveler,"vg","travelerInformation")) and now i need to send each supervisor an email with options for his workes. But i cant use a ForAll method.

Also i i created a flow triggered by powerapps and i now need to send the email with option each supervisor.


Anyone can help my out on this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: For each group by item send email with approval

Hi @Anonymous 

 

There is a new function in Flow called JSON

 

After ClearCollect(travelerByManager,GroupBy(traveler,"vg","travelerInformation"))

Trigger flow and send the collection as a JSON to Flow

JSON(travelerByManager,JSONFormat.IgnoreUnsupportedTypes)

 

Then in Flow, use json(variablepassed) to get the json value of the collection and traverse through the collection to send your emails for each manager

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: For each group by item send email with approval

Hi thank you for helping me out, i tried to parse the json to only give me the "vg" items which contains the supervisor's, but couldn't figure it out. Any idea how to do that?

 

[  
   {  
      "travelerInformation":[  
         {  
            "assignment":"asf",
            "checkup":null,
            "costlocation":"fdasfd",
            "deputy":null,
            "emplid":"asdfas",
            "participant":{  
            .....
            },
            "titel":"TA10333"
         }
      ],
      "vg":"blabla@blabla.com"
   },
   {  
      "travelerInformation":[  
         {  
            "assignment":"asdf",
            "checkup":null,
            "costlocation":"asfsaf",
            "deputy":null,
            "emplid":"sdf",
            "participant":{  
             ....
            },
            "titel":"TA10333"
         }
      ],
      "vg":"blabla@blabla.com"
   }
]

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User II
Dual Super User II

Re: For each group by item send email with approval

Hi @Anonymous 

 

There is a new function in Flow called JSON

 

After ClearCollect(travelerByManager,GroupBy(traveler,"vg","travelerInformation"))

Trigger flow and send the collection as a JSON to Flow

JSON(travelerByManager,JSONFormat.IgnoreUnsupportedTypes)

 

Then in Flow, use json(variablepassed) to get the json value of the collection and traverse through the collection to send your emails for each manager

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: For each group by item send email with approval

Hi thank you for helping me out, i tried to parse the json to only give me the "vg" items which contains the supervisor's, but couldn't figure it out. Any idea how to do that?

 

[  
   {  
      "travelerInformation":[  
         {  
            "assignment":"asf",
            "checkup":null,
            "costlocation":"fdasfd",
            "deputy":null,
            "emplid":"asdfas",
            "participant":{  
            .....
            },
            "titel":"TA10333"
         }
      ],
      "vg":"blabla@blabla.com"
   },
   {  
      "travelerInformation":[  
         {  
            "assignment":"asdf",
            "checkup":null,
            "costlocation":"asfsaf",
            "deputy":null,
            "emplid":"sdf",
            "participant":{  
             ....
            },
            "titel":"TA10333"
         }
      ],
      "vg":"blabla@blabla.com"
   }
]

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,286)