cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Eugene-CHN
Helper II
Helper II

How to split HTTP body

Hello, need your hepl, guys!

 

I try to create a flow which send HTTP request to Graph, get Group members and send it to powerapps.

But I cant split my HTTP body and get only user mails.

When I split it got an error:

Unable to process template language expressions for action 'Apply_to_each_2' at line '1' and column '9406': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#split for usage details.'.

 

My HTTP body:

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
  "value": [
    {
      "@odata.type": "#microsoft.graph.user",
      "id": "xxxx",
      "businessPhones": [],
      "displayName": "xxxx",
      "givenName": "xxxx",
      "jobTitle": "xxxx",
      "mail": "xxxx",
      "mobilePhone": "xxxx",
      "officeLocation": "xxxx",
      "preferredLanguage": null,
      "surname": "xxxx",
      "userPrincipalName": "xxxx"
    },
    {
    "@odata.type": "#microsoft.graph.user",
      "id": "xxxxx",
      "businessPhones": [],
      "displayName": "xxxx",
      "givenName": "xxxx",
      "jobTitle": "xxxx",
      "mail": "xxxx",
      "mobilePhone": "xxxx",
      "officeLocation": "xxxx",
      "preferredLanguage": null,
      "surname": "xxxx",
      "userPrincipalName": "xxxx"
  }
  ]
}

How to split it? Or How to get string of all mails for PowerApps Gallery?

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Eugene-CHN,

 

We could use the expression to get the mail, for example:

body('HTTP')['value']
item()?['mail']

Annotation 2020-09-08 104647.jpg

 

Best Regards,
Community Support Team _ Lin Tu
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

2 REPLIES 2
v-litu-msft
Community Support
Community Support

Hi @Eugene-CHN,

 

We could use the expression to get the mail, for example:

body('HTTP')['value']
item()?['mail']

Annotation 2020-09-08 104647.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Nice! Thanks a lot!

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 (4,461)