cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shaz009
Level: Power Up

I was wondering,if someone could help me in creating item from the JSON data obtained from HTTP response.

i am getting groups from  sharepoint using graph rest endpoint in http as below:

{
"value": [
{
"id": "a3fd81dc-30e9-48a7-8ed5-fbc8936a4567",
"businessPhones": [
"56982365555"
],
"displayName": "shaz s",
"givenName": "Shaz",
"jobTitle": null,
"mail": "shaz@xyz.onmicrosoft.com",
"mobilePhone": null,
"officeLocation": null,
"preferredLanguage": "en",
"surname": "s",
"userPrincipalName": "shaz@xyz.onmicrosoft.com"
}
]
}

But i want to pass this Json loop it and store in sharePoint list using Flow

each property in different columns in SharePoint list

 

Can anyone help me in this?

 

Thanks.

3 REPLIES 3
Harry_G
Level 10

Re: I was wondering,if someone could help me in creating item from the JSON data obtained from HTTP response.

@Shaz009 ,

Can you try this?

 

triggerBody()?['actionName']?['value']?['mail']

try to add this code in expression section of dynamic pane.

Capture.JPG

 

 

 

Thanks,

Harry_G

Shaz009
Level: Power Up

Re: I was wondering,if someone could help me in creating item from the JSON data obtained from HTTP response.

Thanks for the reply.

But I am unable to understand how to loop through the below result after HTTP result which we obtain in flow. 

flow.JPG

HTTP result is as below:

 

 

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
  "value": [
    {
      "@odata.type": "#microsoft.graph.user",
      "id": "a3fd81dc-30e9-48a7-8ed5-fbc4937a6b92",
      "businessPhones": [
        "8277655071"
      ],
      "displayName": "Test1",
      "givenName": "Test1",
      "jobTitle": null,
      "mail": "Test1@testsite.onmicrosoft.com",
      "mobilePhone": null,
      "officeLocation": null,
      "preferredLanguage": "en",
      "surname": "t",
      "userPrincipalName": "Test1@testsite.onmicrosoft.com"
    },
    {
      "@odata.type": "#microsoft.graph.user",
      "id": "5311d8e0-773c-43d5-9d56-3124cfee8cdf",
      "businessPhones": [],
      "displayName": "Annie J",
      "givenName": "Annie",
      "jobTitle": null,
      "mail": null,
      "mobilePhone": null,
      "officeLocation": null,
      "preferredLanguage": null,
      "surname": "K",
      "userPrincipalName": "Test2@testsite.onmicrosoft.com"
    },
    {
      "@odata.type": "#microsoft.graph.user",
      "id": "06947d52-c279-4ffc-a712-f4e86c019177",
      "businessPhones": [],
      "displayName": "Test3",
      "givenName": "Test3",
      "jobTitle": null,
      "mail": "Test3@testsite.onmicrosoft.com",
      "mobilePhone": null,
      "officeLocation": null,
      "preferredLanguage": null,
      "surname": "T",
      "userPrincipalName": "Test3@testsite.onmicrosoft.com"
    },
    {
      "@odata.type": "#microsoft.graph.user",
      "id": "26aadcf8-6130-4c7b-bd6c-a82560d77ccb",
      "businessPhones": [],
      "displayName": "Test4",
      "givenName": "Test4",
      "jobTitle": null,
      "mail": "Test4@testsite.onmicrosoft.com",
      "mobilePhone": null,
      "officeLocation": null,
      "preferredLanguage": null,
      "surname": "L",
      "userPrincipalName": "Test4@testsite.onmicrosoft.com"
    }
  ]
}

 

Harry_G
Level 10

Re: I was wondering,if someone could help me in creating item from the JSON data obtained from HTTP response.

Hi @Shaz009 ,

Please see following threads which is similar to your problem and trying to figure out your solution.

JSON Object to Array

How to do a foreach in an json array and append some variable for each item?

 

Hopefully these threads help you out.

 

Thanks,

Harry_G  

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,410)