cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ppl111
New Member

Teams message to JSON items

The input is a JSON object, inside of which there is a data set and an array of objects:

{
"approvalTheme":"Upgrade Win 10 to Win11",
"approvalComment":"Additional information",
"approvalUrl":"https://localhost.com",
"approvalRequesterEmail":"mail@test.ru",
"requestNum":123,
"approvalDateTime":"2022-12-10T00:00:00.000Z",
"approvalSource":"Windows center",
"approvalCallbackUrl":"https://localhost.ru",
"approversList":[
{
"approverEmail":"mail1@test.ru",
"approvedOrder":1,
"approvalMode":"all"
},
{
"approverEmail":"mail2@test.ru",
"approvalOrder":2,
"approvalMode":"atLeastOne"
},
{
"approverEmail":"mail3@test.ru",
"approvalOrder":2,
"approvalMode":"atLeastOne"
},
{
"approverEmail":"mail4@test.ru",
"approvalOrder":3,
"approvalMode":"all"
}
]
}

How to build a flow to go through all the steps in turn and send a message to the team to all users on the step.

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Super User
Super User

Hi @ppl111 

 

The following expressions below should help you loop through the approvers List and send an email:

Snag_1346eaed.png

Snag_134cf281.png

The expressions used are:

variables('varTeamsJSON')?['approversList']
items('Apply_to_each')?['approverEmail']

 

Hope help helps:


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
ekarim2020
Super User
Super User

Hi @ppl111 

 

The following expressions below should help you loop through the approvers List and send an email:

Snag_1346eaed.png

Snag_134cf281.png

The expressions used are:

variables('varTeamsJSON')?['approversList']
items('Apply_to_each')?['approverEmail']

 

Hope help helps:


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,126)