cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jleystral
Helper II
Helper II

Generate a table entry from an HTTP request

Hi guys,

In a SharePoint list we have multiple site addresses and SharePoint group names. With an automated workflow we would like to have a regular report about the members of each group.

I am not getting anywhere with the point where I play the Title object from the JSON for all listed members into an Excel table. Can anyone help me? I feel I need to work with Apply for each here, but I don't know what to do.

 

JSON: 

jleystral_0-1669889820833.png

 

HTTP:

jleystral_1-1669889840594.png

 

 

Thanks in advance for your kind support.

1 ACCEPTED SOLUTION

Accepted Solutions
jleystral
Helper II
Helper II

I did a quick workaround that suits for me:

jleystral_0-1670496435949.png

jleystral_1-1670496444607.png

 

Not beautiful but it works

 

Thanks again so much for your help Expiscornovus . This forum is great.

View solution in original post

13 REPLIES 13
Expiscornovus
Super User
Super User

Hi @jleystral,

 

Would a csv file also be ok? Or does it have to be an Excel?

 

Below is an example with a csv

If you want to create an Excel you could potentially replace the Create CSV table by a Select and loop through the results of that Select to add rows to a Excel file instead.

 

1. The Create CSV uses the expression below in the From

outputs('HTTP-Anforderung_an_SharePoint_senden')?['body']['d']['results']

 

2. In the Columns select custom and map/use the columns you want. Use the item()?['nameoffield'] format

 

createcsvtable_users.png 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Thats great. CSV is fine.

 

But I am not sure about doing this with multiple website adresses and multiple groups per site adresse. Because my HTTP request is in a "apply for each" and therefore i would get one csv file per sp group. I would like to have one overview with column 1 is website adresse, column 2 is group name and in column 3 there are all the group member titles. So I get one file and can search for a specific user and see, in which groups he/she is.

Expiscornovus
Super User
Super User

Hi @jleystral,

 

Instead of creating a csv from the response of each group result you could append it to an array variable.

 

You could use the array variable as input for the create csv table action after you finished looping through all the groups.

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


I've already tried that. But I dont know how to append the titles and how to create the csv in the end.

 

jleystral
Helper II
Helper II

jleystral_0-1669897050440.png

 

jleystral
Helper II
Helper II

So no one knows how to deal with it?

Expiscornovus
Super User
Super User

Hi @jleystral,

 

Apologies that I missed your replies. I get a lot of notifications on these forums 😅

 

Below is an example of using a variable of type array to store the results of each group and use it in a csv.

 

1. Per Group the members are retrieved

 

2. A Select uses the same outputs function as before

 

3. A Compose combines the results from a previous loop

 

4. A Set variable updates the varArray variable with the outputs of the Compose action

 

5. Outside the loop you should be able to use the varArray variable in the Create CSV table action

 

select_union_set.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Thank you so much for your effort to help me.

 

I did what you wrote and got this error message:
 

jleystral_2-1670415886276.png

 

 

 

I am a little bit confused because both should be an array, right? The Variable and the  results from the http request. 

 

Expiscornovus
Super User
Super User

Hi @jleystral,

 

That action with the name Select? Is that an actual Select action?

 

It looks a lot like it is a Create CSV Table action which you renamed to Select? 😁 

 

The reason I am asking this is because I see a Format field (with a CSV value) in the Inputs (Eingaben) section of that action with the name Select.

 

Which is not a configuration which is available in the standard Select action 😉

 

Selectaction_choose.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Haha you are so right. 😄 That was an create csv action indeed.

 

I changed that and now I am getting this error message. Is the output of the compose a string or an array?

jleystral_0-1670427382661.png

 

Expiscornovus
Super User
Super User

Hi @jleystral,

 

The output of the union function within the compose should be an array.

 

What expression did you use in the compose?

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi Expiscornovus,

I used this: 

jleystral_0-1670481626117.png

Auswählen = Select 

jleystral
Helper II
Helper II

I did a quick workaround that suits for me:

jleystral_0-1670496435949.png

jleystral_1-1670496444607.png

 

Not beautiful but it works

 

Thanks again so much for your help Expiscornovus . This forum is great.

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (1,746)